diff options
Diffstat (limited to 'src/modules/m_commonchans.cpp')
-rw-r--r-- | src/modules/m_commonchans.cpp | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/src/modules/m_commonchans.cpp b/src/modules/m_commonchans.cpp index ac8a7ba29..877ba87d7 100644 --- a/src/modules/m_commonchans.cpp +++ b/src/modules/m_commonchans.cpp @@ -23,32 +23,10 @@ /** Handles user mode +c */ -class PrivacyMode : public ModeHandler +class PrivacyMode : public SimpleUserModeHandler { public: - PrivacyMode(Module* Creator) : ModeHandler(Creator, "deaf_commonchan", 'c', PARAM_NONE, MODETYPE_USER) { } - - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) - { - if (adding) - { - if (!dest->IsModeSet('c')) - { - dest->SetMode('c',true); - return MODEACTION_ALLOW; - } - } - else - { - if (dest->IsModeSet('c')) - { - dest->SetMode('c',false); - return MODEACTION_ALLOW; - } - } - - return MODEACTION_DENY; - } + PrivacyMode(Module* Creator) : SimpleUserModeHandler(Creator, "deaf_commonchan", 'c') { } }; class ModulePrivacyMode : public Module |