X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_helpop.cpp;h=60c23f45bd44820c39b5e01496a804551c535a1c;hb=2ab2de1dda8f2043898b9df8004ba5b6c4df7349;hp=a7bd4a8c56969addd51d5bb8b80c940c21186939;hpb=a66b5a7b8f10a876970230cd087352d3bda5ef3e;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_helpop.cpp b/src/modules/m_helpop.cpp index a7bd4a8c5..60c23f45b 100644 --- a/src/modules/m_helpop.cpp +++ b/src/modules/m_helpop.cpp @@ -21,7 +21,7 @@ */ -/* $ModDesc: Provides the /HELPOP command, works like UnrealIRCd's helpop */ +/* $ModDesc: Provides the /HELPOP command for useful information */ #include "inspircd.h" @@ -29,35 +29,13 @@ 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 @@ -188,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); } };