diff options
Diffstat (limited to 'modules/protocol/bahamut.cpp')
-rw-r--r-- | modules/protocol/bahamut.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/protocol/bahamut.cpp b/modules/protocol/bahamut.cpp index aec200850..10c9a6454 100644 --- a/modules/protocol/bahamut.cpp +++ b/modules/protocol/bahamut.cpp @@ -162,13 +162,19 @@ class BahamutIRCdProto : public IRCDProto } /* JOIN - SJOIN */ - void SendJoin(User *user, Channel *c, ChannelStatus *status) + void SendJoin(User *user, Channel *c, const ChannelStatus *status) { send_cmd(user->nick, "SJOIN %ld %s", static_cast<long>(c->creation_time), c->name.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) |