diff options
Diffstat (limited to 'src/modes/cmode_h.cpp')
-rw-r--r-- | src/modes/cmode_h.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/modes/cmode_h.cpp b/src/modes/cmode_h.cpp index 2c96b4224..4a2c5fa69 100644 --- a/src/modes/cmode_h.cpp +++ b/src/modes/cmode_h.cpp @@ -26,6 +26,23 @@ ModeChannelHalfOp::ModeChannelHalfOp() : ModeHandler('h', 1, 1, true, MODETYPE_C { } +std::pair<bool,std::string> ModeChannelHalfOp::ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string ¶meter) +{ + userrec* x = Find(parameter); + if (x) + { + if (cstatus(x, channel) == STATUS_HOP) + { + return std::make_pair(true, x->nick); + } + else + { + return std::make_pair(false, parameter); + } + } + return std::make_pair(false, parameter); +} + ModeAction ModeChannelHalfOp::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string ¶meter, bool adding) { /* If halfops are not enabled in the conf, we don't execute |