From: Alexander Barton Date: Wed, 4 Feb 2004 20:04:54 +0000 (+0000) Subject: The info text ("real name") of users is set to "-" if none has been specified X-Git-Tag: rel-0-7-7~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=024c58435e0613ed098aa211fa686d9e1a94eb1f;p=ngircd 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. (from HEAD) --- diff --git a/ChangeLog b/ChangeLog index d8fc30e6..0b6d5848 100644 --- 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 ! - 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 $ diff --git a/src/ngircd/irc-login.c b/src/ngircd/irc-login.c index 77dae9f8..026f87ff 100644 --- a/src/ngircd/irc-login.c +++ b/src/ngircd/irc-login.c @@ -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 @@ -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 );