summaryrefslogtreecommitdiff
path: root/src/modules/m_globalload.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_globalload.cpp')
-rw-r--r--src/modules/m_globalload.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/modules/m_globalload.cpp b/src/modules/m_globalload.cpp
index dfd518cf2..e65f90b64 100644
--- a/src/modules/m_globalload.cpp
+++ b/src/modules/m_globalload.cpp
@@ -34,16 +34,18 @@ class cmd_gloadmodule : public command_t
syntax = "<modulename>";
}
- void Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, userrec *user)
{
if (ServerInstance->LoadModule(parameters[0]))
{
ServerInstance->WriteOpers("*** NEW MODULE '%s' GLOBALLY LOADED BY '%s'",parameters[0],user->nick);
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;
}
}
};
@@ -57,16 +59,18 @@ class cmd_gunloadmodule : public command_t
syntax = "<modulename>";
}
- void Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, userrec *user)
{
if (ServerInstance->UnloadModule(parameters[0]))
{
ServerInstance->WriteOpers("*** MODULE '%s' GLOBALLY UNLOADED BY '%s'",parameters[0],user->nick);
user->WriteServ("973 %s %s :Module successfully unloaded.",user->nick, parameters[0]);
+ return CMD_SUCCESS;
}
else
{
user->WriteServ("972 %s %s :Failed to unload module: %s",user->nick, parameters[0],ServerInstance->ModuleError());
+ return CMD_FAILURE;
}
}
};