diff --git a/src/chat/main/client.c b/src/chat/main/client.c index ed10704..ff070cc 100644 --- a/src/chat/main/client.c +++ b/src/chat/main/client.c @@ -110,7 +110,7 @@ int main(void) why2_send_socket(line, NULL, listen_socket); //NULL IS SENT BECAUSE IT IS USELESS TO SEND USER FROM CLIENT - SERVER WON'T USE IT - if (strcmp(line, "!exit\n") == 0) //USER REQUESTED PROGRAM EXIT + if (strcmp(line, WHY2_CHAT_COMMAND_PREFIX WHY2_CHAT_COMMAND_EXIT "\n") == 0) //USER REQUESTED PROGRAM EXIT { printf("Exiting...\n"); break; diff --git a/src/chat/main/server.c b/src/chat/main/server.c index 3b8ac85..287e3f2 100644 --- a/src/chat/main/server.c +++ b/src/chat/main/server.c @@ -63,7 +63,7 @@ int main(void) { if (getline(&line_buffer, &line_length_buffer, stdin) == -1) why2_die("Reading input failed."); - if (strcmp(line_buffer, "!exit\n") == 0) //USER REQUESTED PROGRAM EXIT + if (strcmp(line_buffer, WHY2_CHAT_COMMAND_PREFIX WHY2_CHAT_COMMAND_EXIT "\n") == 0) //USER REQUESTED PROGRAM EXIT { printf("Exiting...\n"); break; diff --git a/src/chat/misc.c b/src/chat/misc.c index 3d259a4..17596ce 100644 --- a/src/chat/misc.c +++ b/src/chat/misc.c @@ -655,7 +655,7 @@ void *why2_communicate_thread(void *arg) { if (decoded_buffer[0] == '!') //COMMANDS { - if (strcmp(decoded_buffer, "!exit") == 0) //USER REQUESTED EXIT + if (strcmp(decoded_buffer, WHY2_CHAT_COMMAND_PREFIX WHY2_CHAT_COMMAND_EXIT) == 0) //USER REQUESTED EXIT { exiting = 1; } else