diff options
author | Robby- <robby@chat.be> | 2014-02-11 02:26:00 +0100 |
---|---|---|
committer | Robby- <robby@chat.be> | 2014-02-11 02:26:00 +0100 |
commit | fe80d2cdede46d82775dee492f96cb083f1a9071 (patch) | |
tree | d07a79e6e13b95eb9980cc87a62184569518f147 | |
parent | 16dac8784197abb4a94e1c22430137fe6525791f (diff) |
os_modinfo: Add ability to list only extra modules.
-rw-r--r-- | modules/commands/os_modinfo.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/modules/commands/os_modinfo.cpp b/modules/commands/os_modinfo.cpp index 5ea738dfd..a5cb04d2d 100644 --- a/modules/commands/os_modinfo.cpp +++ b/modules/commands/os_modinfo.cpp @@ -78,7 +78,7 @@ class CommandOSModList : public Command CommandOSModList(Module *creator) : Command(creator, "operserv/modlist", 0, 1) { this->SetDesc(_("List loaded modules")); - this->SetSyntax(_("[all|third|vendor|database|encryption|pseudoclient|protocol]")); + this->SetSyntax("[all|third|vendor|extra|database|encryption|pseudoclient|protocol]"); } void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override @@ -90,14 +90,16 @@ class CommandOSModList : public Command else Log(LOG_ADMIN, source, this); - bool third = false, extra = false, vendor = false, database = false, encryption = false, pseudoclient = false, protocol = false; + bool third = false, vendor = false, extra = false, database = false, encryption = false, pseudoclient = false, protocol = false; if (param.equals_ci("all")) - third = extra = vendor = database = encryption = pseudoclient = protocol = true; + third = vendor = extra = database = encryption = pseudoclient = protocol = true; else if (param.equals_ci("third")) third = true; else if (param.equals_ci("vendor")) vendor = true; + else if (param.equals_ci("extra")) + extra = true; else if (param.equals_ci("database")) database = true; else if (param.equals_ci("encryption")) @@ -108,7 +110,7 @@ class CommandOSModList : public Command protocol = true; else third = extra = database = encryption = protocol = true; - + Module *protomod = ModuleManager::FindFirstOf(PROTOCOL); source.Reply(_("Current module list:")); @@ -149,19 +151,19 @@ class CommandOSModList : public Command mtype += ", "; mtype += "Database"; } - if (m->type & VENDOR) + if (m->type & EXTRA) { - show |= vendor; + show |= extra; if (!mtype.empty()) mtype += ", "; - mtype += "Vendor"; + mtype += "Extra"; } - if (m->type & EXTRA) + if (m->type & VENDOR) { - show |= extra; + show |= vendor; if (!mtype.empty()) mtype += ", "; - mtype += "Extra"; + mtype += "Vendor"; } if (m->type & THIRD) { |