From 6c2edc2c5ab07a1fa8c32d3fa9abd6b9149b804c Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Fri, 6 Jul 2012 02:53:40 +0200 Subject: m_swhois Switch to OnPostOper hook instead of using OnPostCommand --- src/modules/m_swhois.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/modules/m_swhois.cpp b/src/modules/m_swhois.cpp index dc53f2f0c..a98c06c75 100644 --- a/src/modules/m_swhois.cpp +++ b/src/modules/m_swhois.cpp @@ -90,7 +90,7 @@ class ModuleSWhois : public Module ModuleSWhois() : cmd(this) { ServerInstance->AddCommand(&cmd); - Implementation eventlist[] = { I_OnWhoisLine, I_OnPostCommand }; + Implementation eventlist[] = { I_OnWhoisLine, I_OnPostOper }; ServerInstance->Modules->Attach(eventlist, this, 2); } @@ -112,11 +112,10 @@ class ModuleSWhois : public Module return MOD_RES_PASSTHRU; } - void OnPostCommand(const std::string &command, const std::vector ¶ms, LocalUser *user, CmdResult result, const std::string &original_line) + void OnPostOper(User* user, const std::string &opertype, const std::string &opername) { - if ((command != "OPER") || (result != CMD_SUCCESS)) + if (!IS_LOCAL(user)) return; - ConfigReader Conf; std::string swhois = user->oper->getConfig("swhois"); -- cgit v1.2.3