class HideOper : public ModeHandler
{
public:
- HideOper(InspIRCd* Instance, Module* Creator) : ModeHandler(Creator, 'H', PARAM_NONE, MODETYPE_USER)
+ HideOper(Module* Creator) : ModeHandler(Creator, "hideoper", 'H', PARAM_NONE, MODETYPE_USER)
{
oper = true;
}
{
HideOper hm;
public:
- ModuleHideOper(InspIRCd* Me)
- : Module(Me), hm(Me, this)
+ ModuleHideOper()
+ : hm(this)
{
-
if (!ServerInstance->Modes->AddMode(&hm))
throw ModuleException("Could not add new modes!");
- Implementation eventlist[] = { I_OnWhoisLine };
- ServerInstance->Modules->Attach(eventlist, this, 1);
+ Implementation eventlist[] = { I_OnWhoisLine, I_OnSendWhoLine };
+ ServerInstance->Modules->Attach(eventlist, this, 2);
}
virtual ~ModuleHideOper()
{
- ServerInstance->Modes->DelMode(&hm);
}
virtual Version GetVersion()
{
- return Version("Provides support for hiding oper status with user mode +H", VF_COMMON | VF_VENDOR, API_VERSION);
+ return Version("Provides support for hiding oper status with user mode +H", VF_COMMON | VF_VENDOR);
}
ModResult OnWhoisLine(User* user, User* dest, int &numeric, std::string &text)