summaryrefslogtreecommitdiff
path: root/src/modes
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-09-29 01:40:17 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-09-29 01:40:17 +0000
commitcbef292a6c4137bf99544e380b3a650237b2d9a7 (patch)
treec4b0defdd517f03fec9f6b08f46fc2ddad6d8b01 /src/modes
parentf7a563946c0f0f555440c30f91608880c9ebce89 (diff)
I think this fixes the mode +k weirdness. Keys were never being set correctly in the channel data. gcc doesnt warn on cast from char* to bool.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10606 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modes')
-rw-r--r--src/modes/cmode_k.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modes/cmode_k.cpp b/src/modes/cmode_k.cpp
index 8e7692efc..ec17a7468 100644
--- a/src/modes/cmode_k.cpp
+++ b/src/modes/cmode_k.cpp
@@ -80,7 +80,8 @@ ModeAction ModeChannelKey::OnModeChange(User* source, User*, Channel* channel, s
{
std::string ckey;
ckey.assign(parameter, 0, 32);
- channel->SetMode('k', ckey.c_str());
+ channel->SetModeParam('k', ckey.c_str(), adding);
+ channel->SetMode('k', adding);
parameter = ckey;
return MODEACTION_ALLOW;
}