From 0f4caa76984ab4f15f8e69b4a396eb38f3a7fd4d Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 11 Aug 2007 11:34:32 +0000 Subject: 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 --- src/command_parse.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.3