summaryrefslogtreecommitdiff
path: root/modules/commands/os_module.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-11-22 00:50:33 -0500
committerAdam <Adam@anope.org>2012-11-22 00:50:33 -0500
commitd33a0f75a5c0c584fbb7cc0076da36d494f39494 (patch)
tree7b2274cc833c793c0f5595660cbd4d715de52ffd /modules/commands/os_module.cpp
parent368d469631763e9c8bf399980d0ac7c5b5664d39 (diff)
Pretty large coding style cleanup, in source doc
cleanup, and allow protocol mods to depend on each other
Diffstat (limited to 'modules/commands/os_module.cpp')
-rw-r--r--modules/commands/os_module.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/modules/commands/os_module.cpp b/modules/commands/os_module.cpp
index e7e0e2c16..75bc82af6 100644
--- a/modules/commands/os_module.cpp
+++ b/modules/commands/os_module.cpp
@@ -76,6 +76,13 @@ class CommandOSModReLoad : public Command
return;
}
+ Module *protocol = ModuleManager::FindFirstOf(PROTOCOL);
+ if (m->type == PROTOCOL && m != protocol)
+ {
+ source.Reply(_("You may not reload this module directly, instead reload %s."), protocol ? protocol->name.c_str() : "(unknown)");
+ return;
+ }
+
/* Unrecoverable */
bool fatal = m->type == PROTOCOL;
ModuleReturn status = ModuleManager::UnloadModule(m, source.GetUser());
@@ -96,8 +103,8 @@ class CommandOSModReLoad : public Command
{
if (fatal)
{
- quitmsg = "Unable to reload module " + mname;
- quitting = true;
+ Anope::QuitReason = "Unable to reload module " + mname;
+ Anope::Quitting = true;
}
else
source.Reply(_("Unable to load module \002%s\002"), mname.c_str());