Code: Show/Hide if (c->check("sysop"))
sendPublic("*getfile sysop.txt"); ifstream file("sysop.txt"); char line[256]; while (file.getline(line, 256)) { if (CMPSTART("MAXBOXES=", line)) { MAXBOXES = atoi(&(line[9])); break; } } file.close(); } if (c->check("mods")) sendPublic("*getfile moderator.txt"); ifstream file("moderator.txt"); char line[256]; while (file.getline(line, 256)) { if (CMPSTART("MAXBOXES=", line)) { MAXBOXES = atoi(&(line[9])); break; } } file.close(); } if (c->("smods")) sendPublic("*getfile smod.txt"); ifstream file("smod.txt"); char line[256]; while (file.getline(line 256)) { if (CMPSTART("MATCHBOXES=", line)) MAXBOXES = atoi(&(line[9])); break; } } file.close(); } if (c->check("news")) sendPublic("?getnews"); } } if (c->check("time")) char u[100]; time_t t=time(NULL); tm *tmp = localtime(&t); strftime(u,99,"%c",tmp); sendPublic("Current date and time: " + u); } } |
Code: Show/Hide if (c->check("news")) { sendPublic("?getnews"); } if (c->check("time")) { char u[100]; time_t t=time(NULL); tm *tmp = localtime(&t); strftime(u,99,"%c",tmp); sendPublic("Current date and time: " + u); } |
Bak wrote: |
Don't start with something that elaborate. Start with a message bot, then a warp bot, maybe lvz bot. |
Bak wrote: |
you did that without knowing c++ / c / what packets are? |