From 65d9999c006dc3d20439ecc0e9856b9990f9dce7 Mon Sep 17 00:00:00 2001 From: Daniel De Graaf Date: Tue, 3 Aug 2010 12:14:19 -0400 Subject: Allow halfops to remove their own halfop status --- src/modules/m_halfop.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/modules/m_halfop.cpp') diff --git a/src/modules/m_halfop.cpp b/src/modules/m_halfop.cpp index d0ad44891..ef8cf8bf9 100644 --- a/src/modules/m_halfop.cpp +++ b/src/modules/m_halfop.cpp @@ -21,6 +21,13 @@ class ModeChannelHalfOp : public ModeHandler unsigned int GetPrefixRank(); void RemoveMode(Channel* channel, irc::modestacker* stack = NULL); void RemoveMode(User* user, irc::modestacker* stack = NULL); + + ModResult AccessCheck(User* src, Channel*, std::string& value, bool adding) + { + if (!adding && src->nick == value) + return MOD_RES_ALLOW; + return MOD_RES_PASSTHRU; + } }; ModeChannelHalfOp::ModeChannelHalfOp(Module* parent) : ModeHandler(parent, "halfop", 'h', PARAM_ALWAYS, MODETYPE_CHANNEL) -- cgit v1.2.3