#include "inspircd.h"
-/* $ModDesc: Provides the SWHOIS command which allows setting of arbitary WHOIS lines */
+/* $ModDesc: Provides the SWHOIS command which allows setting of arbitrary WHOIS lines */
/** Handle /SWHOIS
*/
ModuleSWhois() : cmd(this)
{
ServerInstance->AddCommand(&cmd);
- Implementation eventlist[] = { I_OnWhoisLine, I_OnPostCommand };
+ Implementation eventlist[] = { I_OnWhoisLine, I_OnPostOper };
ServerInstance->Modules->Attach(eventlist, this, 2);
}
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");
Version GetVersion()
{
- return Version("Provides the SWHOIS command which allows setting of arbitary WHOIS lines", VF_OPTCOMMON | VF_VENDOR);
+ return Version("Provides the SWHOIS command which allows setting of arbitrary WHOIS lines", VF_OPTCOMMON | VF_VENDOR);
}
};