diff options
| author | Adam <Adam@anope.org> | 2011-10-26 16:52:00 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2011-10-26 16:52:00 -0400 |
| commit | b14f5ea884e17500d5a08e3ca18957a8fb2a79f6 (patch) | |
| tree | 77be632813b2c4d428cf40b907ac0eb542031a5f /modules/protocol/inspircd11.cpp | |
| parent | bf66336e2c7a34aa62f86681f2d20078b2be99a8 (diff) | |
Fixed accidentally clearing botmodes when joins are sent
Diffstat (limited to 'modules/protocol/inspircd11.cpp')
| -rw-r--r-- | modules/protocol/inspircd11.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/protocol/inspircd11.cpp b/modules/protocol/inspircd11.cpp index 4c1776097..77b619f64 100644 --- a/modules/protocol/inspircd11.cpp +++ b/modules/protocol/inspircd11.cpp @@ -157,13 +157,19 @@ class InspIRCdProto : public IRCDProto } /* JOIN */ - void SendJoin(User *user, Channel *c, ChannelStatus *status) + void SendJoin(User *user, Channel *c, const ChannelStatus *status) { send_cmd(user->nick, "JOIN %s %ld", c->name.c_str(), static_cast<long>(c->creation_time)); 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) |
