]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/client.c
Merge branch 'newconfig'
[ngircd-alex.git] / src / ngircd / client.c
index 0bfe73d383d399e3903b78b540c382242e65bdb5..e01c424091dc274b559cedd95d87f6275e895ead 100644 (file)
@@ -319,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 */
 
 
@@ -331,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 */
@@ -344,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 {