*/
-/* $ModDesc: Provides the /HELPOP command for useful information */
-
#include "inspircd.h"
static std::map<irc::string, std::string> helpop_map;
class ModuleHelpop : public Module
{
- private:
std::string h_file;
CommandHelpop cmd;
Helpop ho;
{
}
- void init()
+ void init() CXX11_OVERRIDE
{
- ReadConfig();
ServerInstance->Modules->AddService(ho);
ServerInstance->Modules->AddService(cmd);
- Implementation eventlist[] = { I_OnRehash, I_OnWhois };
- ServerInstance->Modules->Attach(eventlist, this, 2);
}
- void ReadConfig()
+ void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE
{
helpop_map.clear();
}
- void OnRehash(User* user)
- {
- ReadConfig();
- }
-
- void OnWhois(User* src, User* dst)
+ void OnWhois(User* src, User* dst) CXX11_OVERRIDE
{
- if (dst->IsModeSet('h'))
+ if (dst->IsModeSet(ho))
{
- ServerInstance->SendWhoisLine(src, dst, 310, std::string(src->nick)+" "+std::string(dst->nick)+" :is available for help.");
+ ServerInstance->SendWhoisLine(src, dst, 310, src->nick+" "+dst->nick+" :is available for help.");
}
}
- Version GetVersion()
+ Version GetVersion() CXX11_OVERRIDE
{
return Version("Provides the /HELPOP command for useful information", VF_VENDOR);
}