summaryrefslogtreecommitdiff
path: root/src/modules/m_hidechans.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_hidechans.cpp')
-rw-r--r--src/modules/m_hidechans.cpp26
1 files changed, 2 insertions, 24 deletions
diff --git a/src/modules/m_hidechans.cpp b/src/modules/m_hidechans.cpp
index 17e2e8605..9c582551b 100644
--- a/src/modules/m_hidechans.cpp
+++ b/src/modules/m_hidechans.cpp
@@ -24,32 +24,10 @@
/** Handles user mode +I
*/
-class HideChans : public ModeHandler
+class HideChans : public SimpleUserModeHandler
{
public:
- HideChans(Module* Creator) : ModeHandler(Creator, "hidechans", 'I', PARAM_NONE, MODETYPE_USER) { }
-
- ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
- {
- if (adding)
- {
- if (!dest->IsModeSet('I'))
- {
- dest->SetMode('I',true);
- return MODEACTION_ALLOW;
- }
- }
- else
- {
- if (dest->IsModeSet('I'))
- {
- dest->SetMode('I',false);
- return MODEACTION_ALLOW;
- }
- }
-
- return MODEACTION_DENY;
- }
+ HideChans(Module* Creator) : SimpleUserModeHandler(Creator, "hidechans", 'I') { }
};
class ModuleHideChans : public Module