From d33a0f75a5c0c584fbb7cc0076da36d494f39494 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 22 Nov 2012 00:50:33 -0500 Subject: Pretty large coding style cleanup, in source doc cleanup, and allow protocol mods to depend on each other --- modules/commands/os_module.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'modules/commands/os_module.cpp') 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()); -- cgit