summaryrefslogtreecommitdiff
path: root/src/modules/m_showwhois.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_showwhois.cpp')
-rw-r--r--src/modules/m_showwhois.cpp26
1 files changed, 2 insertions, 24 deletions
diff --git a/src/modules/m_showwhois.cpp b/src/modules/m_showwhois.cpp
index 6eec64bd5..d81dd553d 100644
--- a/src/modules/m_showwhois.cpp
+++ b/src/modules/m_showwhois.cpp
@@ -27,35 +27,13 @@
/** Handle user mode +W
*/
-class SeeWhois : public ModeHandler
+class SeeWhois : public SimpleUserModeHandler
{
public:
- SeeWhois(Module* Creator, bool IsOpersOnly) : ModeHandler(Creator, "showwhois", 'W', PARAM_NONE, MODETYPE_USER)
+ SeeWhois(Module* Creator, bool IsOpersOnly) : SimpleUserModeHandler(Creator, "showwhois", 'W')
{
oper = IsOpersOnly;
}
-
- ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding)
- {
- if (adding)
- {
- if (!dest->IsModeSet('W'))
- {
- dest->SetMode('W',true);
- return MODEACTION_ALLOW;
- }
- }
- else
- {
- if (dest->IsModeSet('W'))
- {
- dest->SetMode('W',false);
- return MODEACTION_ALLOW;
- }
- }
-
- return MODEACTION_DENY;
- }
};
class WhoisNoticeCmd : public Command