added why2_send_socket_code fn

This commit is contained in:
Václav Šmejkal 2025-01-31 12:39:55 +01:00
parent 2e63191085
commit 1f9df8363a
Signed by: ENGO150
GPG Key ID: 4A57E86482968843
2 changed files with 6 additions and 0 deletions

View File

@ -26,6 +26,7 @@ extern "C" {
#include <why2/flags.h> //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

View File

@ -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;