summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-15 19:25:35 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-15 19:25:35 +0000
commit8bf40d57296b0775414f087f4c57a1c37bc9a58a (patch)
tree16308dfa365d96378631cd93ba66feac184d77d7 /src
parentfeaf72ecb48470114fbe3f3058b5f4b9622b88a5 (diff)
Sped up disabled commands check
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3222 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/command_parse.cpp8
1 files 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!