]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/conn.c
Implement WEBIRC command
[ngircd-alex.git] / src / ngircd / conn.c
index 1e4ba0abd7604397e3ad8fa2d2a8ba1b84343be8..cd350a8d619700a2ca89034b5a05b132df6cba36 100644 (file)
@@ -1999,10 +1999,14 @@ cb_Read_Resolver_Result( int r_fd, UNUSED short events )
        c = Conn_GetClient( i );
        assert( c != NULL );
 
-       /* Only update client information of unregistered clients */
-       if( Client_Type( c ) == CLIENT_UNKNOWN ) {
-               strlcpy(My_Connections[i].host, readbuf, sizeof( My_Connections[i].host));
-               Client_SetHostname( c, readbuf);
+       /* Only update client information of unregistered clients.
+        * Note: user commands (e. g. WEBIRC) are always read _after_ reading
+        * the resolver results, so we don't have to worry to override settings
+        * from these commands here. */
+       if(Client_Type(c) == CLIENT_UNKNOWN) {
+               strlcpy(My_Connections[i].host, readbuf,
+                       sizeof(My_Connections[i].host));
+               Client_SetHostname(c, readbuf);
 #ifdef IDENTAUTH
                ++identptr;
                if (*identptr) {