diff options
Diffstat (limited to 'src/modes/cmode_k.cpp')
-rw-r--r-- | src/modes/cmode_k.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/modes/cmode_k.cpp b/src/modes/cmode_k.cpp index 9e69ed13b..2f06ba55c 100644 --- a/src/modes/cmode_k.cpp +++ b/src/modes/cmode_k.cpp @@ -8,6 +8,19 @@ ModeChannelKey::ModeChannelKey() : ModeHandler('k', 1, 1, false, MODETYPE_CHANNE { } +std::pair<bool,std::string> ModeChannelKey::ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string ¶meter) +{ + if (channel->modes[CM_KEY]) + { + return std::make_pair(true, channel->key); + } + else + { + return std::make_pair(false, parameter); + } +} + + ModeAction ModeChannelKey::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string ¶meter, bool adding) { if (channel->modes[CM_KEY] != adding) |