1
0
mirror of https://github.com/anope/anope.git synced 2026-06-27 04:26:38 +02:00

Fixed accidentally clearing botmodes when joins are sent

This commit is contained in:
Adam
2011-10-26 16:52:00 -04:00
parent bf66336e2c
commit b14f5ea884
7 changed files with 42 additions and 12 deletions
+8 -2
View File
@@ -123,13 +123,19 @@ class PlexusProto : public IRCDProto
send_cmd(Config->Numeric, "UNRESV * %s", x->Mask.c_str());
}
void SendJoin(User *user, Channel *c, ChannelStatus *status)
void SendJoin(User *user, Channel *c, const ChannelStatus *status)
{
send_cmd(Config->Numeric, "SJOIN %ld %s +%s :%s", static_cast<long>(c->creation_time), c->name.c_str(), c->GetModes(true, true).c_str(), user->GetUID().c_str());
if (status)
{
/* First save the channel status incase uc->Status == status */
ChannelStatus cs = *status;
status->ClearFlags();
/* If the user is internally on the channel with flags, kill them so that
* the stacker will allow this.
*/
UserContainer *uc = c->FindUser(user);
if (uc != NULL)
uc->Status->ClearFlags();
BotInfo *setter = findbot(user->nick);
for (unsigned i = 0; i < ModeManager::ChannelModes.size(); ++i)