diff options
Diffstat (limited to 'src/cmd_loadmodule.cpp')
-rw-r--r-- | src/cmd_loadmodule.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cmd_loadmodule.cpp b/src/cmd_loadmodule.cpp index 2f1dc75d3..5e0c7ab6f 100644 --- a/src/cmd_loadmodule.cpp +++ b/src/cmd_loadmodule.cpp @@ -25,15 +25,18 @@ extern "C" command_t* init_command(InspIRCd* Instance) return new cmd_loadmodule(Instance); } -void cmd_loadmodule::Handle (const char** parameters, int pcnt, userrec *user) +CmdResult cmd_loadmodule::Handle (const char** parameters, int pcnt, userrec *user) { if (ServerInstance->LoadModule(parameters[0])) { ServerInstance->WriteOpers("*** NEW MODULE: %s",parameters[0]); user->WriteServ("975 %s %s :Module successfully loaded.",user->nick, parameters[0]); + return CMD_SUCCESS; } else { user->WriteServ("974 %s %s :Failed to load module: %s",user->nick, parameters[0],ServerInstance->ModuleError()); + return CMD_FAILURE; } } + |