From 43201ead9575a74e350710bc191f4ac67366aca7 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 19 Sep 2011 18:35:40 -0400 Subject: Fixed /os reload doing weird things to service channels, and allow setting modes by clients on burst --- modules/protocol/inspircd-ts6.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'modules/protocol/inspircd-ts6.h') diff --git a/modules/protocol/inspircd-ts6.h b/modules/protocol/inspircd-ts6.h index 3603555c4..2eab151cf 100644 --- a/modules/protocol/inspircd-ts6.h +++ b/modules/protocol/inspircd-ts6.h @@ -124,7 +124,7 @@ class InspIRCdTS6Proto : public IRCDProto } /* JOIN */ - void SendJoin(User *user, Channel *c, const ChannelStatus *status) + void SendJoin(User *user, Channel *c, ChannelStatus *status) { send_cmd(Config->Numeric, "FJOIN %s %ld +%s :,%s", c->name.c_str(), static_cast(c->creation_time), c->GetModes(true, true).c_str(), user->GetUID().c_str()); /* Note that we can send this with the FJOIN but choose not to @@ -133,9 +133,12 @@ class InspIRCdTS6Proto : public IRCDProto */ if (status) { + ChannelStatus cs = *status; + status->ClearFlags(); + BotInfo *setter = findbot(user->nick); for (unsigned i = 0; i < ModeManager::ChannelModes.size(); ++i) - if (status->HasFlag(ModeManager::ChannelModes[i]->Name)) + if (cs.HasFlag(ModeManager::ChannelModes[i]->Name)) c->SetMode(setter, ModeManager::ChannelModes[i], user->nick, false); } } -- cgit