diff options
author | attilamolnar <attilamolnar@hush.com> | 2012-07-06 02:53:40 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2012-07-07 15:19:19 +0200 |
commit | 6c2edc2c5ab07a1fa8c32d3fa9abd6b9149b804c (patch) | |
tree | 7ec4e5444d8bbb6653360f8e7b4f30bd200a3530 /src/modules | |
parent | ce115e4f438b72abeb6a2af7b21331fb2b15842a (diff) |
m_swhois Switch to OnPostOper hook instead of using OnPostCommand
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_swhois.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
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<std::string> ¶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"); |