summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/regchannel.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/regchannel.cpp b/src/regchannel.cpp
index b4cded05b..3279a80a3 100644
--- a/src/regchannel.cpp
+++ b/src/regchannel.cpp
@@ -400,8 +400,13 @@ void ChannelInfo::LoadMLock()
this->c = new Channel(this->name, this->time_registered);
if (!this->bi && ChanServ && ModeManager::FindChannelModeByName(CMODE_PERM) == NULL)
ChanServ->Assign(NULL, this);
- else if (this->bi)
- this->bi->Join(c);
+ else
+ {
+ if (!this->bi)
+ whosends(this)->Assign(NULL, this);
+ if (this->c->FindUser(this->bi) == NULL)
+ this->bi->Join(this->c);
+ }
check_modes(this->c);
this->CheckTopic();
}