Re: Non case-sensitive chat commands? [message #367829 is a reply to message #367715] |
Sun, 18 January 2009 19:59 |
Genesis2001
Messages: 1397 Registered: August 2006
Karma:
|
General (1 Star) |
|
|
RoShamBo wrote on Sun, 18 January 2009 06:12 |
char Command[80], params[256];
*params = 0;
char msg[256];
strcpy(msg, "msg !test called with: ");
if (sscanf(Message, "%s %[^\n]", Command, params) != 0)
{
if (stricmp(Command, "!test") == 0)
{
if(*params != 0)
{
strcat(msg, params);
}
else
{
strcat(msg, "no params")
}
Console_Input(msg);
}
}
|
Thanks to you too for correcting me!
|
|
|