summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-07-31 07:00:27 -0400
committerAdam <Adam@anope.org>2011-07-31 07:00:27 -0400
commita18e3f33802d282a227d20aabfd8f6425b5e40d0 (patch)
tree8142a7b0213cc9295d0f9c8fdd3aca176bdafb74
parent63a4201d15b041edf0dc029b46684a2ec01ff75b (diff)
Bugs 1297-1299 and made /os stats work like the help describes it does
-rw-r--r--data/commands.example.conf2
-rw-r--r--modules/core/cs_set_topiclock.cpp3
-rw-r--r--modules/core/ns_set_secure.cpp3
-rw-r--r--modules/core/os_stats.cpp30
4 files changed, 21 insertions, 17 deletions
diff --git a/data/commands.example.conf b/data/commands.example.conf
index 4385ae6de..2e04ec9b1 100644
--- a/data/commands.example.conf
+++ b/data/commands.example.conf
@@ -264,7 +264,7 @@ command { service = "NickServ"; name = "SET PRIVATE"; command = "nickserv/set/pr
command { service = "NickServ"; name = "SASET PRIVATE"; command = "nickserv/set/private"; }
module { name = "ns_set_secure" }
command { service = "NickServ"; name = "SET SECURE"; command = "nickserv/set/secure"; }
-command { service = "NickServ"; name = "SASET SECURE"; command = "nickserv/set/secure"; }
+command { service = "NickServ"; name = "SASET SECURE"; command = "nickserv/saset/secure"; }
module { name = "ns_saset_noexpire" }
command { service = "NickServ"; name = "SASET NOEXPIRE"; command = "nickserv/saset/noexpire"; }
module { name = "ns_sendpass" }
diff --git a/modules/core/cs_set_topiclock.cpp b/modules/core/cs_set_topiclock.cpp
index a6f88460d..e03999df0 100644
--- a/modules/core/cs_set_topiclock.cpp
+++ b/modules/core/cs_set_topiclock.cpp
@@ -83,6 +83,9 @@ class CSSetTopicLock : public Module
commandcssettopiclock(this), commandcssasettopiclock(this)
{
this->SetAuthor("Anope");
+
+ ModuleManager::RegisterService(&commandcssettopiclock);
+ ModuleManager::RegisterService(&commandcssasettopiclock);
}
};
diff --git a/modules/core/ns_set_secure.cpp b/modules/core/ns_set_secure.cpp
index 8cf6590cf..35baeec3b 100644
--- a/modules/core/ns_set_secure.cpp
+++ b/modules/core/ns_set_secure.cpp
@@ -105,6 +105,9 @@ class NSSetSecure : public Module
commandnssetsecure(this), commandnssasetsecure(this)
{
this->SetAuthor("Anope");
+
+ ModuleManager::RegisterService(&commandnssetsecure);
+ ModuleManager::RegisterService(&commandnssasetsecure);
}
};
diff --git a/modules/core/os_stats.cpp b/modules/core/os_stats.cpp
index f8e57bee6..2627a4538 100644
--- a/modules/core/os_stats.cpp
+++ b/modules/core/os_stats.cpp
@@ -168,31 +168,29 @@ class CommandOSStats : public Command
{
Anope::string extra = !params.empty() ? params[0] : "";
- if (extra.equals_ci("ALL"))
- extra.clear();
-
- if (extra.empty() || extra.equals_ci("AKILL"))
- return this->DoStatsAkill(source);
- else if (extra.equals_ci("RESET"))
+ if (extra.equals_ci("RESET"))
return this->DoStatsReset(source);
- else if (extra.empty() || extra.equals_ci("UPTIME"))
+
+ if (extra.equals_ci("ALL") || extra.equals_ci("AKILL"))
+ this->DoStatsAkill(source);
+
+ if (extra.empty() || extra.equals_ci("ALL") || extra.equals_ci("UPTIME"))
this->DoStatsUptime(source);
- else if (extra.empty() || extra.equals_ci("UPLINK"))
+
+ if (extra.equals_ci("ALL") || extra.equals_ci("UPLINK"))
this->DoStatsUplink(source);
- else if (!extra.equals_ci("UPLINK"))
- source.Reply(_("Unknown STATS option \002%s\002."), extra.c_str());
- return;
+ if (!extra.empty() && !extra.equals_ci("ALL") && !extra.equals_ci("AKILL") && !extra.equals_ci("UPLINK"))
+ source.Reply(_("Unknown STATS option \002%s\002."), extra.c_str());
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
{
this->SendSyntax(source);
source.Reply(" ");
- source.Reply(_("Without any option, shows the current number of users and\n"
- "IRCops online (excluding Services), the highest number of\n"
- "users online since Services was started, and the length of\n"
- "time Services has been running.\n"
+ source.Reply(_("Without any option, shows the current number of users online,\n"
+ "and the highest number of users online since Services was\n"
+ "started, and the length of time Services has been running.\n"
" \n"
"With the \002AKILL\002 option, displays the current size of the\n"
"AKILL list and the current default expiry time.\n"
@@ -204,7 +202,7 @@ class CommandOSStats : public Command
"server Anope uses as an uplink to the network.\n"
" \n"
"The \002ALL\002 displays the user and uptime statistics, and\n"
- "everything you'd see with \002MEMORY\002 and \002UPLINK\002 options."));
+ "everything you'd see with the \002UPLINK\002 option."));
return true;
}
};