diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-04 20:11:52 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-04 20:11:52 +0000 |
commit | 26095e43d92aab898ca3df2f386837b5b674f668 (patch) | |
tree | cb93e3e29a89eff0fc86d3d9dff0f2965d70ed31 /src/command_parse.cpp | |
parent | 5da7043eb65aed52508322b6dbd1641c984e3637 (diff) |
Proper fix for clients that send a nickprefix on their commands (the rfc says they shouldnt but also says that the ircd should discard it if they do)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6881 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/command_parse.cpp')
-rw-r--r-- | src/command_parse.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp index f013e0cd5..0fa7c05b2 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -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(); |