summaryrefslogtreecommitdiff
path: root/src/modules/m_globalload.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-06 17:58:59 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-06 17:58:59 +0000
commit71ad308979d9c9129507fdf85d4305fd12e18bea (patch)
tree6aaebc6d1fb6e4c49a2adf474bf4592e2d89a5e8 /src/modules/m_globalload.cpp
parent4cf0ae1308fe98757de42ffbe391e61844ac9e0a (diff)
All commands now return results CMD_FAILURE or CMD_SUCCESS
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5150 e03df62e-2008-0410-955e-edbf42e46eb7
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;
}
}
};