summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorDaniel De Graaf <danieldg@inspircd.org>2010-08-03 12:14:19 -0400
committerDaniel De Graaf <danieldg@inspircd.org>2010-08-03 12:15:43 -0400
commit65d9999c006dc3d20439ecc0e9856b9990f9dce7 (patch)
treedc7acd75604dd37fbe3f4aaedaa7f0fb8d3e5c0a /src/modules
parent5b5ebc7fb7bf34c1c9878a570408f37dc29c86b8 (diff)
Allow halfops to remove their own halfop status
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_halfop.cpp7
1 files changed, 7 insertions, 0 deletions
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)