X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fngircd%2Fclient.c;h=e01c424091dc274b559cedd95d87f6275e895ead;hb=3282c1325e491f2fbc7ee388c557f40e1f9eaed6;hp=7a6b275da5918ea0030a12f4aa97804d980cd6ee;hpb=03628dbeaf40a9de34b3eb6d5bf6dd34eed8248c;p=ngircd-alex.git diff --git a/src/ngircd/client.c b/src/ngircd/client.c index 7a6b275d..e01c4240 100644 --- a/src/ngircd/client.c +++ b/src/ngircd/client.c @@ -9,10 +9,8 @@ * Please read the file COPYING, README and AUTHORS for more information. */ - #define __client_c__ - #include "portab.h" /** @@ -46,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]; @@ -323,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_CloakHost)) { + strlcpy( Client->host, Conf_CloakHost, sizeof( Client->host )); + } else { + strlcpy( Client->host, Hostname, sizeof( Client->host )); + } } /* Client_SetHostname */ @@ -335,6 +335,9 @@ Client_SetID( CLIENT *Client, const char *ID ) strlcpy( Client->id, ID, sizeof( Client->id )); + if (Conf_CloakUserToNick) + strlcpy( Client->user, ID, sizeof( Client->user )); + /* Hash */ Client->hash = Hash( Client->id ); } /* Client_SetID */ @@ -348,6 +351,8 @@ Client_SetUser( CLIENT *Client, const char *User, bool Idented ) assert( Client != NULL ); assert( User != NULL ); + if (Conf_CloakUserToNick) return; + if (Idented) { strlcpy(Client->user, User, sizeof(Client->user)); } else {