From 17fd32bf7492aa40ce531b64c81754f039907ca7 Mon Sep 17 00:00:00 2001 From: danieldg Date: Thu, 3 Sep 2009 21:06:44 +0000 Subject: Remove HandleInternal and HandleServer, they are duplicated by Request* and FakeUser git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11672 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/stats.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'src/stats.cpp') diff --git a/src/stats.cpp b/src/stats.cpp index d385112c2..40ee40b18 100644 --- a/src/stats.cpp +++ b/src/stats.cpp @@ -157,19 +157,13 @@ void InspIRCd::DoStats(char statschar, User* user, string_list &results) if (!this->Config->WhoWasGroupSize == 0 && !this->Config->WhoWasMaxGroups == 0) { - Command* whowas_command = this->Parser->GetHandler("WHOWAS"); - if (whowas_command) + Module* whowas = Modules->Find("cmd_whowas.so"); + if (whowas) { - std::deque params; - Extensible whowas_stats; - params.push_back(&whowas_stats); - whowas_command->HandleInternal(WHOWAS_STATS, params); - if (whowas_stats.GetExt("stats")) - { - char* statc; - whowas_stats.GetExt("stats", statc); - results.push_back(sn+" 249 "+user->nick+" :"+ConvToStr(statc)); - } + WhowasRequest req(NULL, whowas, WhowasRequest::WHOWAS_STATS); + req.user = user; + req.Send(); + results.push_back(sn+" 249 "+user->nick+" :"+req.value); } } -- cgit v1.3.1-10-gc9f91