]> arthur.barton.de Git - ngircd.git/commitdiff
The info text ("real name") of users is set to "-" if none has been specified
authorAlexander Barton <alex@barton.de>
Wed, 4 Feb 2004 20:04:54 +0000 (20:04 +0000)
committerAlexander Barton <alex@barton.de>
Wed, 4 Feb 2004 20:04:54 +0000 (20:04 +0000)
using the USER command (e. g. "USER user * * :"). Reason: the original ircd
doesn't like empty ones and would KILL such users.  (from HEAD)

ChangeLog
src/ngircd/irc-login.c

index d8fc30e6224461247a54b9d91bf420b84bc66b8a..0b6d58487b7b7f8e24c40d3953fbd0f48b89df68 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,9 @@
 
 ngIRCd 0.7-CVS
 
+  - The info text ("real name") of users is set to "-" if none has been
+    specified using the USER command (e. g. "USER user * * :"). Reason:
+    the original ircd doesn't like empty ones and would KILL such users.
   - Fixed (optional) TCP Wrapper test which was broken and could result in
     false results. Thanks to Fuminori Tanizaki <tany@mcnet.ad.jp>!
   - Removed "USE_" prefixes of configuration #defines.
@@ -490,4 +493,4 @@ ngIRCd 0.0.1, 31.12.2001
 
 
 -- 
-$Id: ChangeLog,v 1.188.2.22 2004/02/03 16:01:29 alex Exp $
+$Id: ChangeLog,v 1.188.2.23 2004/02/04 20:04:54 alex Exp $
index 77dae9f868c75a730005622087381bf6323e667a..026f87ff34041f5226fff6848d3df70d237e2fa4 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: irc-login.c,v 1.34.2.2 2003/12/04 14:13:42 alex Exp $";
+static char UNUSED id[] = "$Id: irc-login.c,v 1.34.2.3 2004/02/04 20:04:54 alex Exp $";
 
 #include "imp.h"
 #include <assert.h>
@@ -294,11 +294,17 @@ IRC_USER( CLIENT *Client, REQUEST *Req )
        if( Client_Type( Client ) == CLIENT_GOTNICK || Client_Type( Client ) == CLIENT_GOTPASS )
 #endif
        {
-               /* Falsche Anzahl Parameter? */
+               /* Wrong number of parameters? */
                if( Req->argc != 4 ) return IRC_WriteStrClient( Client, ERR_NEEDMOREPARAMS_MSG, Client_ID( Client ), Req->command );
 
+               /* User name */
                Client_SetUser( Client, Req->argv[0], FALSE );
-               Client_SetInfo( Client, Req->argv[3] );
+
+               /* "Real name" or user info text: Don't set it to the empty
+                * string, the original ircd can't deal with such "real names"
+                * (e. g. "USER user * * :") ... */
+               if( *Req->argv[3] ) Client_SetInfo( Client, Req->argv[3] );
+               else Client_SetInfo( Client, "-" );
 
                Log( LOG_DEBUG, "Connection %d: got valid USER command ...", Client_Conn( Client ));
                if( Client_Type( Client ) == CLIENT_GOTNICK ) return Hello_User( Client );