summaryrefslogtreecommitdiff
path: root/src/modules/m_helpop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_helpop.cpp')
-rw-r--r--src/modules/m_helpop.cpp30
1 files changed, 4 insertions, 26 deletions
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<irc::string, std::string> 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 &parameter, 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);
}
};