From 130f5c44d723db841444c9becd71464b81145c3d Mon Sep 17 00:00:00 2001 From: w00t Date: Tue, 15 Jan 2008 14:32:52 +0000 Subject: 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 --- src/command_parse.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/command_parse.cpp') 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; } -- cgit v1.2.3