summaryrefslogtreecommitdiff
path: root/src/modes/cmode_k.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modes/cmode_k.cpp')
-rw-r--r--src/modes/cmode_k.cpp13
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 &parameter)
+{
+ 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 &parameter, bool adding)
{
if (channel->modes[CM_KEY] != adding)