From 9fd9a4b233e32981f476268815118fdae3e2aaff Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Fri, 30 Aug 2024 14:12:15 +0200 Subject: [PATCH] resolving self-pm at client-side :)) haha def no easteregg --- src/chat/misc.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/chat/misc.c b/src/chat/misc.c index 284487b..bacd886 100644 --- a/src/chat/misc.c +++ b/src/chat/misc.c @@ -967,7 +967,7 @@ void *why2_listen_server(void *socket) //DECODE for (unsigned long i = 0; i < strlen(received_pm); i++) { - if (received_pm[i] == ';') + if (received_pm[i] == ';') //FUTURE ME, THIS IS PRETTY MUCH split FUNCTION IMPLEMENTATION { //ALLOCATE INFO pm_info[n_buffer] = why2_malloc((i - i_buffer) + 1); @@ -984,7 +984,14 @@ void *why2_listen_server(void *socket) } } - printf("\n\n%s(%s -> %s): %s\n\n", WHY2_CLEAR_AND_GO_UP, pm_info[0], pm_info[1], pm_info[2]); + //OUTPUT + if (strcmp(pm_info[0], pm_info[1]) != 0 || strlen(pm_info[0]) != 13) + { + printf("\n\n%s(%s -> %s): %s\n\n", WHY2_CLEAR_AND_GO_UP, pm_info[0], pm_info[1], pm_info[2]); + } else + { + printf("\n\n%s(schizophrenia): %s\n\n", WHY2_CLEAR_AND_GO_UP, pm_info[2]); //:)) + } //DEALLOCATION for (int i = 0; i < 3; i++)