diff options
| author | 2007-08-11 11:34:57 +0000 | |
|---|---|---|
| committer | 2007-08-11 11:34:57 +0000 | |
| commit | 9b82d8cb96f40134ad3c4acfd553e548b7764e3e (patch) | |
| tree | c3a1de5806ce1e1ac6999a0dd896be5d7fc324db /src/command_parse.cpp | |
| parent | Backport: Provide error output on failure to load a core command; to console ... (diff) | |
bp: Make the return codes correct, and allow for LoadCommand without a user pointer
git-svn-id: http://svn.inspircd.org/repository/branches/1_1_stable@7711 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/command_parse.cpp')
| -rw-r--r-- | src/command_parse.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp index 6f96873d3..2c2e2361e 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -491,7 +491,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; } |
