From 8bf40d57296b0775414f087f4c57a1c37bc9a58a Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 15 Feb 2006 19:25:35 +0000 Subject: [PATCH] Sped up disabled commands check git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3222 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/command_parse.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/command_parse.cpp b/src/command_parse.cpp index 0c61fd8b1..7c9e5aa5c 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -596,14 +596,12 @@ void CommandParser::ProcessCommand(userrec *user, char* cmd) return; } } - if ((user->registered == 7) && (!*user->oper)) + if ((user->registered == 7) && (!*user->oper) && (*Config->DisabledCommands)) { std::stringstream dcmds(Config->DisabledCommands); - while (!dcmds.eof()) + std::string thiscmd; + while (dcmds >> thiscmd) { - std::string thiscmd; - dcmds >> thiscmd; - if (!strcasecmp(thiscmd.c_str(),command)) { // command is disabled! -- 2.39.5