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_modinfo.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'modules/commands/os_modinfo.cpp') diff --git a/modules/commands/os_modinfo.cpp b/modules/commands/os_modinfo.cpp index 88748a106..15e2d73a2 100644 --- a/modules/commands/os_modinfo.cpp +++ b/modules/commands/os_modinfo.cpp @@ -29,12 +29,12 @@ class CommandOSModInfo : public Command Module *m = ModuleManager::FindModule(file); if (m) { - source.Reply(_("Module: \002%s\002 Version: \002%s\002 Author: \002%s\002 loaded: \002%s\002"), m->name.c_str(), !m->version.empty() ? m->version.c_str() : "?", !m->author.empty() ? m->author.c_str() : "?", do_strftime(m->created).c_str()); + source.Reply(_("Module: \002%s\002 Version: \002%s\002 Author: \002%s\002 loaded: \002%s\002"), m->name.c_str(), !m->version.empty() ? m->version.c_str() : "?", !m->author.empty() ? m->author.c_str() : "?", Anope::strftime(m->created).c_str()); std::vector servicekeys = Service::GetServiceKeys("Command"); for (unsigned i = 0; i < servicekeys.size(); ++i) { - service_reference c("Command", servicekeys[i]); + ServiceReference c("Command", servicekeys[i]); if (!c || c->owner != m) continue; @@ -156,9 +156,11 @@ class CommandOSModList : public Command } } + Module *protocol = ModuleManager::FindFirstOf(PROTOCOL); + source.Reply(_("Current Module list:")); - for (std::list::iterator it = Modules.begin(), it_end = Modules.end(); it != it_end; ++it) + for (std::list::iterator it = ModuleManager::Modules.begin(), it_end = ModuleManager::Modules.end(); it != it_end; ++it) { Module *m = *it; @@ -179,6 +181,8 @@ class CommandOSModList : public Command } break; case PROTOCOL: + if (m != protocol) + break; if (showProto) { source.Reply(_("Module: \002%s\002 [%s] [%s]"), m->name.c_str(), m->version.c_str(), proto); -- cgit