From 1f9df8363a293053b7c1de9a207829cf9b926374 Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Fri, 31 Jan 2025 12:39:55 +0100 Subject: [PATCH] added why2_send_socket_code fn --- include/chat/misc.h | 1 + src/chat/misc.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/include/chat/misc.h b/include/chat/misc.h index d5db250..a20cb20 100644 --- a/include/chat/misc.h +++ b/include/chat/misc.h @@ -26,6 +26,7 @@ extern "C" { #include //TODO: fuck this void why2_send_socket(char *text, char *username, int socket); //send socket.... wtf did you expect +void why2_send_socket_code(char *params, char *username, int socket, char *code); //SEND SOCKET BUT WITH CODE void *why2_communicate_thread(void *arg); //COMMUNICATION THREAD void *why2_accept_thread(void *socket); //LOOP ACCEPTING CONNECTIONS void why2_clean_connections(void); //CLOSE EVERY CONNECTION diff --git a/src/chat/misc.c b/src/chat/misc.c index 8b516c2..f23f83e 100644 --- a/src/chat/misc.c +++ b/src/chat/misc.c @@ -497,6 +497,11 @@ void why2_send_socket(char *text, char *username, int socket) send_socket(text, username, socket, 0, NULL); } +void why2_send_socket_code(char *params, char *username, int socket, char *code) +{ + send_socket(params, username, socket, 0, code); +} + void *why2_communicate_thread(void *arg) { int connection = *(int*) arg;