1 From d363ebd841ea7e1db3c62730023759d69520e0d8 Mon Sep 17 00:00:00 2001
2 From: Alexander Barton <alex@barton.de>
3 Date: Tue, 27 Sep 2011 15:08:09 +0200
4 Subject: [PATCH 08/16] ngircd: Allow setting modes by clients on burst
6 This change is required by commit 43201ead9575a for the ngIRCd protocol
9 modules/protocol/ngircd.cpp | 7 +++++--
10 1 files changed, 5 insertions(+), 2 deletions(-)
12 diff --git a/modules/protocol/ngircd.cpp b/modules/protocol/ngircd.cpp
13 index 3024fdd..2774168 100644
14 --- a/modules/protocol/ngircd.cpp
15 +++ b/modules/protocol/ngircd.cpp
16 @@ -57,14 +57,17 @@ class ngIRCdProto : public IRCDProto
17 send_cmd(source ? source->nick : Config->ServerName, "WALLOPS :%s", buf.c_str());
20 - void SendJoin(User *user, Channel *c, const ChannelStatus *status)
21 + void SendJoin(User *user, Channel *c, ChannelStatus *status)
23 send_cmd(user->nick, "JOIN %s", c->name.c_str());
26 + ChannelStatus cs = *status;
27 + status->ClearFlags();
29 BotInfo *setter = findbot(user->nick);
30 for (unsigned i = 0; i < ModeManager::ChannelModes.size(); ++i)
31 - if (status->HasFlag(ModeManager::ChannelModes[i]->Name))
32 + if (cs.HasFlag(ModeManager::ChannelModes[i]->Name))
33 c->SetMode(setter, ModeManager::ChannelModes[i], user->nick, false);