summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-01-15 14:32:52 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-01-15 14:32:52 +0000
commit130f5c44d723db841444c9becd71464b81145c3d (patch)
treeb420b7071065df64776cf2b23ee8da02afb70533 /src
parentd558e37d375abe8a625ba89754c59990b89cf33f (diff)
Fix a stupid crash on unknown commands caused by me blindly applying a 1.1 patch.. doesn't affect 1.1
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8710 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/command_parse.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp
index 788afcf3e..d82f523db 100644
--- a/src/command_parse.cpp
+++ b/src/command_parse.cpp
@@ -290,10 +290,13 @@ bool CommandParser::ProcessCommand(User *user, std::string &cmd)
/* find the command, check it exists */
Commandable::iterator cm = cmdlist.find(command);
- if (cm == cmdlist.end() && user->registered == REG_ALL)
+ if (cm == cmdlist.end())
{
+ if (user->registered == REG_ALL)
+ {
+ user->WriteServ("421 %s %s :Unknown command",user->nick,command.c_str());
+ }
ServerInstance->stats->statsUnknown++;
- user->WriteServ("421 %s %s :Unknown command",user->nick,command.c_str());
return true;
}