diff options
author | Adam <Adam@anope.org> | 2010-11-27 00:04:13 -0600 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-12-12 19:37:00 -0500 |
commit | 71c433cc502cc6073dd1e9d5cab3f49f8f6fd49e (patch) | |
tree | c9a463b9155471e11a067fd9306bfa152b189b51 /modules/core/os_stats.cpp | |
parent | 2b10cc84eab6cb9253611a090eb3ef67a6d3d0a7 (diff) |
The rest of the earlier command changes
Diffstat (limited to 'modules/core/os_stats.cpp')
-rw-r--r-- | modules/core/os_stats.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/modules/core/os_stats.cpp b/modules/core/os_stats.cpp index 0e425c8ae..f06c2acbb 100644 --- a/modules/core/os_stats.cpp +++ b/modules/core/os_stats.cpp @@ -122,19 +122,17 @@ class CommandOSStats : public Command CommandReturn DoStatsReset(CommandSource &source) { - User *u = source.u; maxusercnt = usercnt; - u->SendMessage(OperServ, OPER_STATS_RESET); + source.Reply(OPER_STATS_RESET); return MOD_CONT; } CommandReturn DoStatsUptime(CommandSource &source) { - User *u = source.u; time_t uptime = Anope::CurTime - start_time; int days = uptime / 86400, hours = (uptime / 3600) % 24, mins = (uptime / 60) % 60, secs = uptime % 60; - u->SendMessage(OperServ, OPER_STATS_CURRENT_USERS, usercnt, opcnt); - u->SendMessage(OperServ, OPER_STATS_MAX_USERS, maxusercnt, do_strftime(maxusertime).c_str()); + source.Reply(OPER_STATS_CURRENT_USERS, usercnt, opcnt); + source.Reply(OPER_STATS_MAX_USERS, maxusercnt, do_strftime(maxusertime).c_str()); if (days > 1) source.Reply(OPER_STATS_UPTIME_DHMS, days, hours, mins, secs); else if (days == 1) @@ -259,15 +257,15 @@ class CommandOSStats : public Command return MOD_CONT; } - bool OnHelp(User *u, const Anope::string &subcommand) + bool OnHelp(CommandSource &source, const Anope::string &subcommand) { - u->SendMessage(OperServ, OPER_HELP_STATS); + source.Reply(OPER_HELP_STATS); return true; } - void OnServHelp(User *u) + void OnServHelp(CommandSource &source) { - u->SendMessage(OperServ, OPER_HELP_CMD_STATS); + source.Reply(OPER_HELP_CMD_STATS); } }; |