summaryrefslogtreecommitdiff
path: root/src/cmd_rehash.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-11-13 00:56:07 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-11-13 00:56:07 +0000
commit9f0f8651f390bc5bd3a20aa88a05106ccbf69648 (patch)
tree2411b999eddf6afd4c81cad2c6e81b9f55c26787 /src/cmd_rehash.cpp
parent41f62a2a3badd6b7dbffb4fdb995c41ef709462c (diff)
Only re-initialize disabled commands if they've changed
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5732 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/cmd_rehash.cpp')
-rw-r--r--src/cmd_rehash.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cmd_rehash.cpp b/src/cmd_rehash.cpp
index 88ffd3aa7..7700d7f49 100644
--- a/src/cmd_rehash.cpp
+++ b/src/cmd_rehash.cpp
@@ -30,6 +30,7 @@ CmdResult cmd_rehash::Handle (const char** parameters, int pcnt, userrec *user)
{
user->WriteServ("382 %s %s :Rehashing",user->nick,ServerConfig::CleanFilename(CONFIG_FILE));
std::string parameter = "";
+ std::string old_disabled = ServerInstance->Config->DisabledCommands;
if (pcnt)
{
parameter = parameters[0];
@@ -39,7 +40,9 @@ CmdResult cmd_rehash::Handle (const char** parameters, int pcnt, userrec *user)
ServerInstance->WriteOpers("%s is rehashing config file %s",user->nick,ServerConfig::CleanFilename(CONFIG_FILE));
ServerInstance->Config->Read(false,user);
}
- InitializeDisabledCommands(ServerInstance->Config->DisabledCommands, ServerInstance);
+ if (old_disabled != ServerInstance->Config->DisabledCommands)
+ InitializeDisabledCommands(ServerInstance->Config->DisabledCommands, ServerInstance);
+
FOREACH_MOD(I_OnRehash,OnRehash(parameter));
return CMD_SUCCESS;