X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fngircd%2Fclient.c;h=11decc8689584e116b6505a3369f20cbcd59f073;hb=52f59149adf4dbbb7c917225a7c66ac4aa053700;hp=737c01841c7381ece36543ba7e203842118ac93a;hpb=1dca082fc6f0595d6bde431bf50132445340fb7f;p=ngircd-alex.git diff --git a/src/ngircd/client.c b/src/ngircd/client.c index 737c0184..11decc86 100644 --- a/src/ngircd/client.c +++ b/src/ngircd/client.c @@ -7,16 +7,17 @@ * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * Please read the file COPYING, README and AUTHORS for more information. - * - * Client management. */ - #define __client_c__ - #include "portab.h" +/** + * @file + * Client management. + */ + #include "imp.h" #include #include @@ -43,10 +44,8 @@ #include - #define GETID_LEN (CLIENT_NICK_LEN-1) + 1 + (CLIENT_USER_LEN-1) + 1 + (CLIENT_HOST_LEN-1) + 1 - static CLIENT *This_Server, *My_Clients; static WHOWAS My_Whowas[MAX_WHOWAS]; @@ -320,7 +319,11 @@ Client_SetHostname( CLIENT *Client, const char *Hostname ) assert( Client != NULL ); assert( Hostname != NULL ); - strlcpy( Client->host, Hostname, sizeof( Client->host )); + if (strlen(Conf_ClientHost)) { + strlcpy( Client->host, Conf_ClientHost, sizeof( Client->host )); + } else { + strlcpy( Client->host, Hostname, sizeof( Client->host )); + } } /* Client_SetHostname */