From: brain Date: Mon, 2 Apr 2007 22:13:20 +0000 (+0000) Subject: A quick glance at ircu indicates that when an empty gecos is given in USER, it is... X-Git-Tag: v2.0.23~5665 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=ffdd357e073819fd617af45c86c2499597380d50;hp=5870145ac255da65f5bf4ff0fae4715cbb930ec9;p=user%2Fhenk%2Fcode%2Finspircd.git A quick glance at ircu indicates that when an empty gecos is given in USER, it is replaced by 'No info', rather than our way of saying 'not enough parameters', so we'll do this as it seems to make sense. The RFC is unclear here. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6732 e03df62e-2008-0410-955e-edbf42e46eb7 --- diff --git a/src/cmd_user.cpp b/src/cmd_user.cpp index fc5ed7bb1..1a0e392c6 100644 --- a/src/cmd_user.cpp +++ b/src/cmd_user.cpp @@ -27,7 +27,7 @@ CmdResult cmd_user::Handle (const char** parameters, int pcnt, userrec *user) /* A user may only send the USER command once */ if (!(user->registered & REG_USER)) { - if (!*parameters[3] || !ServerInstance->IsIdent(parameters[0])) + if (!ServerInstance->IsIdent(parameters[0])) { // This kinda Sucks, According to the RFC thou, its either this, // or "You have already registered" :p -- Craig @@ -42,7 +42,7 @@ CmdResult cmd_user::Handle (const char** parameters, int pcnt, userrec *user) * IDENTMAX here. */ strlcpy(user->ident, parameters[0], IDENTMAX); - strlcpy(user->fullname,parameters[3],MAXGECOS); + strlcpy(user->fullname, *parameters[3] ? parameters[3] : "No info", MAXGECOS); user->registered = (user->registered | REG_USER); } }