]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Proper fix for clients that send a nickprefix on their commands (the rfc says they...
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 4 May 2007 20:11:52 +0000 (20:11 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 4 May 2007 20:11:52 +0000 (20:11 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6881 e03df62e-2008-0410-955e-edbf42e46eb7

src/command_parse.cpp

index f013e0cd5a052f35d9c12be6b0384416fcccdf45..0fa7c05b2783efefe9d9e6a2ebc3c5d19909ff42 100644 (file)
@@ -289,6 +289,14 @@ void CommandParser::ProcessCommand(userrec *user, std::string &cmd)
        std::string command;
        tokens.GetToken(command);
 
+       /* A client sent a nick prefix on their command (ick)
+        * rhapsody and some braindead bouncers do this --
+        * the rfc says they shouldnt but also says the ircd should
+        * discard it if they do.
+        */
+       if (*command.c_str() == ':')
+               tokens.GetToken(command);
+
        while (tokens.GetToken(para[items]) && (items < 127))
        {
                command_p[items] = para[items].c_str();