From 11bba6b94ec0e000b15c170139a1f47744b168c4 Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Wed, 17 Apr 2024 04:02:38 +0200 Subject: Reformatted process_new_connection() --- FICS/command.c | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/FICS/command.c b/FICS/command.c index fb10cdd..1063e92 100644 --- a/FICS/command.c +++ b/FICS/command.c @@ -910,20 +910,25 @@ PUBLIC int process_input(int fd, char *com_string) return retval; } -PUBLIC int process_new_connection(int fd, unsigned int fromHost) +PUBLIC int +process_new_connection(int fd, unsigned int fromHost) { - int p = player_new(); - - parray[p].status = PLAYER_LOGIN; - parray[p].socket = fd; - parray[p].thisHost = fromHost; - parray[p].logon_time = time(0); - psend_raw_file(p, mess_dir, MESS_WELCOME); - pprintf(p, "Head admin : %s Complaints to : %s\n", hadmin_handle, hadmin_email); - pprintf(p, "Server location: %s Server version : %s\n", fics_hostname, VERS_NUM); - psend_raw_file(p, mess_dir, MESS_LOGIN); - pprintf(p, "login: "); - return 0; + int p = player_new(); + + parray[p].status = PLAYER_LOGIN; + parray[p].socket = fd; + parray[p].thisHost = fromHost; + parray[p].logon_time = time(0); + + psend_raw_file(p, mess_dir, MESS_WELCOME); + pprintf(p, "Head admin : %s Complaints to : %s\n", + hadmin_handle, + hadmin_email); + pprintf(p, "Server location: %s Server version : %s\n", fics_hostname, + VERS_NUM); + psend_raw_file(p, mess_dir, MESS_LOGIN); + pprintf(p, "login: "); + return 0; } PUBLIC int -- cgit v1.2.3