optimized client command checking
This commit is contained in:
parent
26c5b4d831
commit
0150414d1b
@ -162,11 +162,14 @@ int main(void)
|
||||
|
||||
//TODO: Remove accents
|
||||
|
||||
if (strncmp(line, WHY2_CHAT_COMMAND_PREFIX, strlen(WHY2_CHAT_COMMAND_PREFIX)) == 0) //OPTIMIZE COMMANDS
|
||||
{
|
||||
//COMMANDS
|
||||
if (command(line, WHY2_CHAT_COMMAND_EXIT, &cmd_arg)) //USER REQUESTED PROGRAM EXIT
|
||||
{
|
||||
printf("Exiting...\n");
|
||||
exit_client(0);
|
||||
} else if (command(line, WHY2_CHAT_COMMAND_HELP, &cmd_arg))
|
||||
} else if (command(line, WHY2_CHAT_COMMAND_HELP, &cmd_arg)) //HELP CMD
|
||||
{
|
||||
printf
|
||||
(
|
||||
@ -177,6 +180,7 @@ int main(void)
|
||||
);
|
||||
|
||||
fflush(stdout);
|
||||
}
|
||||
} else
|
||||
{
|
||||
why2_send_socket(line, NULL, listen_socket); //NULL IS SENT BECAUSE IT IS USELESS TO SEND USER FROM CLIENT - SERVER WON'T USE IT
|
||||
|
Loading…
x
Reference in New Issue
Block a user