]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/client.c
ClientHost setting
[ngircd-alex.git] / src / ngircd / client.c
index 7a6b275da5918ea0030a12f4aa97804d980cd6ee..11decc8689584e116b6505a3369f20cbcd59f073 100644 (file)
@@ -9,10 +9,8 @@
  * Please read the file COPYING, README and AUTHORS for more information.
  */
 
-
 #define __client_c__
 
-
 #include "portab.h"
 
 /**
 
 #include <exp.h>
 
-
 #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_ClientHost)) {
+               strlcpy( Client->host, Conf_ClientHost, sizeof( Client->host ));
+       } else {
+               strlcpy( Client->host, Hostname, sizeof( Client->host ));
+       }
 } /* Client_SetHostname */