From b14f5ea884e17500d5a08e3ca18957a8fb2a79f6 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 26 Oct 2011 16:52:00 -0400 Subject: Fixed accidentally clearing botmodes when joins are sent --- modules/protocol/unreal.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'modules/protocol/unreal.cpp') diff --git a/modules/protocol/unreal.cpp b/modules/protocol/unreal.cpp index aa806fe21..6b4d844d5 100644 --- a/modules/protocol/unreal.cpp +++ b/modules/protocol/unreal.cpp @@ -165,13 +165,19 @@ class UnrealIRCdProto : public IRCDProto } /* JOIN */ - void SendJoin(User *user, Channel *c, ChannelStatus *status) + void SendJoin(User *user, Channel *c, const ChannelStatus *status) { send_cmd(Config->ServerName, "~ %ld %s :%s", static_cast(c->creation_time), c->name.c_str(), user->nick.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) -- cgit