DarkBlizz

DarkBlizz => Enigma => DarkBlizz Products => Suggestions => Topic started by: sit0 on January 09, 2011, 12:28:29 PM

Title: mandate.cpp
Post by: sit0 on January 09, 2011, 12:28:29 PM
#include "bot.h"

void Bot::Mandate(char* USER, char DATA[], bool CMDED)
{
char cmdvar[255];
char ooo[255];

if(CMDED == true)
DATA=strtok(DATA, "/");
else
DATA=strtok(DATA, CMD);

printf("DATA: %s\n",DATA);

if (DATA == NULL)
{
printf("ERROR NULL COMMAND DATA\n");
return;
}

strcpy(ooo, "/");
strcat(ooo, DATA);

DATA=strtok(DATA, " ");

if (DATA == NULL)
{
printf("ERROR NULL COMMAND CMDVAR\n");
return;
}

printf("cmd: %s\n",DATA);

int x = strcspn(DATA," ");
strcpy(cmdvar, DATA + x+1);

printf("cmdvar: %s\n",cmdvar);

if(!strcmp(DATA,"join"))
Mandate2(00, USER,cmdvar,CMDED);
else if(!strcmp(DATA,"game") )
Mandate2(01, USER,cmdvar,CMDED);
else
{
printf("ooo: %s\n",ooo);
if(!strcmp(Client,"TAHC"))
APACKET0("%s\r\n", ooo);
else
SP_0x0E(ooo);
}

}

void Bot::Mandate2(int num, char* USER, char DATA[], bool CMDED)
{
switch (num)
{
case 00: SP_0x0C(2,DATA); return;
case 01: SP_0x09(); return;
default: break;
}
}
Title: Re: mandate.cpp
Post by: sit0 on January 23, 2011, 10:05:37 PM
if anyone wants to add commands to this... please code away...
Title: Re: mandate.cpp
Post by: brew on January 30, 2011, 07:52:08 PM
........what?
You must be confused. This is not how open source works, if that's what you're trying to get at with this thread. You don't just post a source file with absolutely nothing else and then expect people to code away for you, and then when they don't, post a "well, c'mon people, i'm waiting... code away..." That's what's wrong here, and it blows my mind that you can't see this yourself.
Title: Re: mandate.cpp
Post by: sit0 on January 30, 2011, 08:42:30 PM
actually if you use the other threads in conjunction with this thread in the suggestions sub forum. You can easily contribute code and all you would have to do is open 5 other tabs on firefox/iexplorer.

Maybe you didn't look at the other posts...

PS: Sortve made this code adding thing into a plugin of sorts. People plugin code into forum as posts. I take those posts and compile. I am to busy to do more work on this program but have no problem taking time out to compile and post output.
Title: Re: mandate.cpp
Post by: Batman on January 30, 2011, 09:30:20 PM
o_o dunananana Batman