]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_swhois.cpp
m_nokicks Remove u-line check, OnUserPreKick doesn't run in that case
[user/henk/code/inspircd.git] / src / modules / m_swhois.cpp
index dc53f2f0c22d74baa3584a1719108d747914c3e1..a98c06c7509d8dedd3904a7ef994a21744abe130 100644 (file)
@@ -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> &params, 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");