summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordz <dz@e03df62e-2008-0410-955e-edbf42e46eb7>2009-03-27 22:32:38 +0000
committerdz <dz@e03df62e-2008-0410-955e-edbf42e46eb7>2009-03-27 22:32:38 +0000
commit408d516f781b77f66929ce3e5ca58b88888b1ede (patch)
tree854b2628a520136a4519304fba521a77d5a41dab
parent6e1f90b505c6081c8b5c4d3327a3b8627a17b770 (diff)
Make the message when reloading a command fails more accurate, and fix reloading commands after a failed reload. Fixes bug #776 reported by Taros, and bug #785.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11270 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/command_parse.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp
index e5eef4499..409444e0c 100644
--- a/src/command_parse.cpp
+++ b/src/command_parse.cpp
@@ -506,11 +506,11 @@ bool CommandParser::ReloadCommand(std::string cmd, User* user)
cmdlist.erase(cmdlist.find(cmd));
RFCCommands.erase(cmd);
- std::transform(cmd.begin(), cmd.end(), cmd.begin(), ::tolower);
delete cmdptr;
dlclose(command->second);
}
+ std::transform(cmd.begin(), cmd.end(), cmd.begin(), ::tolower);
snprintf(filename, MAXBUF, "cmd_%s.so", cmd.c_str());
const char* err = this->LoadCommand(filename);
if (err)
@@ -536,7 +536,7 @@ CmdResult CommandReload::Handle(const std::vector<std::string>& parameters, User
}
else
{
- user->WriteServ("NOTICE %s :*** Could not reload command '%s' -- fix this problem, then /REHASH as soon as possible!", user->nick.c_str(), parameters[0].c_str());
+ user->WriteServ("NOTICE %s :*** Could not reload command '%s'. The command will not work until reloaded successfully.", user->nick.c_str(), parameters[0].c_str());
return CMD_FAILURE;
}
}