summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/coremods/core_channel/cmode_k.cpp1
-rw-r--r--src/coremods/core_channel/core_channel.h3
2 files changed, 3 insertions, 1 deletions
diff --git a/src/coremods/core_channel/cmode_k.cpp b/src/coremods/core_channel/cmode_k.cpp
index ea4b5241d..495af3650 100644
--- a/src/coremods/core_channel/cmode_k.cpp
+++ b/src/coremods/core_channel/cmode_k.cpp
@@ -46,6 +46,7 @@ ModeAction ModeChannelKey::OnModeChange(User* source, User*, Channel* channel, s
if (exists && (parameter != *key))
{
/* Key is currently set and the correct key wasn't given */
+ source->WriteNumeric(ERR_KEYSET, channel->name, "Channel key already set");
return MODEACTION_DENY;
}
} else {
diff --git a/src/coremods/core_channel/core_channel.h b/src/coremods/core_channel/core_channel.h
index 3701b9a71..26b23c3ea 100644
--- a/src/coremods/core_channel/core_channel.h
+++ b/src/coremods/core_channel/core_channel.h
@@ -54,7 +54,8 @@ enum
{
// From RFC 1459.
RPL_BANLIST = 367,
- RPL_ENDOFBANLIST = 368
+ RPL_ENDOFBANLIST = 368,
+ ERR_KEYSET = 467
};
/** Handle /INVITE.