From c30f0ef741528231aefaa3b284f3ac161b1ca86c Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 7 Sep 2006 20:56:10 +0000 Subject: userrec::ForceNickChange was broken (not the entire nickchange system as i'd suspected at first) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5156 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/cmd_nick.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/cmd_nick.cpp') diff --git a/src/cmd_nick.cpp b/src/cmd_nick.cpp index 10d95ed46..a2337ba08 100644 --- a/src/cmd_nick.cpp +++ b/src/cmd_nick.cpp @@ -32,7 +32,7 @@ CmdResult cmd_nick::Handle (const char** parameters, int pcnt, userrec *user) { char oldnick[NICKMAX]; - if (!*parameters[0]) + if (!parameters[0][0]) { ServerInstance->Log(DEBUG,"zero length new nick passed to handle_nick"); return CMD_FAILURE; @@ -42,11 +42,13 @@ CmdResult cmd_nick::Handle (const char** parameters, int pcnt, userrec *user) ServerInstance->Log(DEBUG,"invalid old nick passed to handle_nick"); return CMD_FAILURE; } + ServerInstance->Log(DEBUG,"Fall through"); if (irc::string(user->nick) == irc::string(parameters[0])) { /* If its exactly the same, even case, dont do anything. */ if (!strcmp(user->nick,parameters[0])) return CMD_SUCCESS; + /* Its a change of case. People insisted that they should be * able to do silly things like this even though the RFC says * the nick AAA is the same as the nick aaa. @@ -65,10 +67,6 @@ CmdResult cmd_nick::Handle (const char** parameters, int pcnt, userrec *user) } else { - if ((*parameters[0] == ':') && (*(parameters[0]+1) != 0)) - { - parameters[0]++; - } char* mq = ServerInstance->XLines->matches_qline(parameters[0]); if (mq) { -- cgit v1.3.1-10-gc9f91