diff options
Diffstat (limited to 'src/modules/m_globalload.cpp')
-rw-r--r-- | src/modules/m_globalload.cpp | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/src/modules/m_globalload.cpp b/src/modules/m_globalload.cpp index 4456a1352..1cb14ba83 100644 --- a/src/modules/m_globalload.cpp +++ b/src/modules/m_globalload.cpp @@ -16,12 +16,7 @@ using namespace std; -/* - * DEVOICE module for InspIRCd - * Syntax: /DEVOICE <#chan> - */ - -/* $ModDesc: Provides voiced users with the ability to devoice themselves. */ +/* $ModDesc: Allows global loading of a module. */ #include <stdio.h> #include "users.h" @@ -42,15 +37,15 @@ class cmd_gloadmodule : public command_t void Handle (char **parameters, int pcnt, userrec *user) { - if (ServerInstance->LoadModule(parameters[0])) - { - WriteOpers("*** NEW MODULE '%s' GLOBALLY LOADED BY '%s'",parameters[0],user->nick); - WriteServ(user->fd,"975 %s %s :Module successfully loaded.",user->nick, parameters[0]); - } - else - { - WriteServ(user->fd,"974 %s %s :Failed to load module: %s",user->nick, parameters[0],ServerInstance->ModuleError()); - } + if (ServerInstance->LoadModule(parameters[0])) + { + WriteOpers("*** NEW MODULE '%s' GLOBALLY LOADED BY '%s'",parameters[0],user->nick); + WriteServ(user->fd,"975 %s %s :Module successfully loaded.",user->nick, parameters[0]); + } + else + { + WriteServ(user->fd,"974 %s %s :Failed to load module: %s",user->nick, parameters[0],ServerInstance->ModuleError()); + } } }; @@ -64,14 +59,14 @@ class cmd_gunloadmodule : public command_t void Handle (char **parameters, int pcnt, userrec *user) { - if (ServerInstance->UnloadModule(parameters[0])) - { - WriteOpers("*** MODULE '%s' GLOBALLY UNLOADED BY '%s'",parameters[0],user->nick); - WriteServ(user->fd,"973 %s %s :Module successfully unloaded.",user->nick, parameters[0]); - } + if (ServerInstance->UnloadModule(parameters[0])) + { + WriteOpers("*** MODULE '%s' GLOBALLY UNLOADED BY '%s'",parameters[0],user->nick); + WriteServ(user->fd,"973 %s %s :Module successfully unloaded.",user->nick, parameters[0]); + } else { - WriteServ(user->fd,"972 %s %s :Failed to unload module: %s",user->nick, parameters[0],ServerInstance->ModuleError()); + WriteServ(user->fd,"972 %s %s :Failed to unload module: %s",user->nick, parameters[0],ServerInstance->ModuleError()); } } }; |