summaryrefslogtreecommitdiff
path: root/src/command_parse.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-11 11:34:32 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-11 11:34:32 +0000
commit0f4caa76984ab4f15f8e69b4a396eb38f3a7fd4d (patch)
tree6f58a40e9b1ac7ab35db7c3175a42947102f46f9 /src/command_parse.cpp
parent8683e1c80d9d37ee7ffae54c0d888195a5e8d1a7 (diff)
Make the return codes correct, and allow for LoadCommand without a user pointer
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7710 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/command_parse.cpp')
-rw-r--r--src/command_parse.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp
index a3b5b41c7..6be50dd96 100644
--- a/src/command_parse.cpp
+++ b/src/command_parse.cpp
@@ -489,7 +489,11 @@ bool CommandParser::ReloadCommand(const char* cmd, userrec* user)
snprintf(filename, MAXBUF, "cmd_%s.so", commandname);
const char* err = this->LoadCommand(filename);
if (err)
- user->WriteServ("NOTICE %s :*** Error loading 'cmd_%s.so': %s", user->nick, cmd, err);
+ {
+ if (user)
+ user->WriteServ("NOTICE %s :*** Error loading 'cmd_%s.so': %s", user->nick, cmd, err);
+ return false;
+ }
return true;
}