X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmodules%2Fm_helpop.cpp;h=60c23f45bd44820c39b5e01496a804551c535a1c;hb=2ab2de1dda8f2043898b9df8004ba5b6c4df7349;hp=dd2e77986c09453e4d53f684e62fff2240f16ed6;hpb=fcacc8e0306382bc3f938073092c3729d77e2b41;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_helpop.cpp b/src/modules/m_helpop.cpp index dd2e77986..60c23f45b 100644 --- a/src/modules/m_helpop.cpp +++ b/src/modules/m_helpop.cpp @@ -21,41 +21,21 @@ */ +/* $ModDesc: Provides the /HELPOP command for useful information */ + #include "inspircd.h" static std::map helpop_map; /** Handles user mode +h */ -class Helpop : public ModeHandler +class Helpop : public SimpleUserModeHandler { public: - Helpop(Module* Creator) : ModeHandler(Creator, "helpop", 'h', PARAM_NONE, MODETYPE_USER) + Helpop(Module* Creator) : SimpleUserModeHandler(Creator, "helpop", 'h') { oper = true; } - - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) - { - if (adding) - { - if (!dest->IsModeSet('h')) - { - dest->SetMode('h',true); - return MODEACTION_ALLOW; - } - } - else - { - if (dest->IsModeSet('h')) - { - dest->SetMode('h',false); - return MODEACTION_ALLOW; - } - } - - return MODEACTION_DENY; - } }; /** Handles /HELPOP @@ -186,7 +166,7 @@ class ModuleHelpop : public Module Version GetVersion() { - return Version("Provides the /HELPOP command, works like UnrealIRCd's helpop", VF_VENDOR); + return Version("Provides the /HELPOP command for useful information", VF_VENDOR); } };