diff options
| author | DukePyrolator <DukePyrolator@anope.org> | 2010-12-30 05:50:55 +0100 |
|---|---|---|
| committer | DukePyrolator <DukePyrolator@anope.org> | 2010-12-30 05:50:55 +0100 |
| commit | 2784cd17fc5e0ee4ad0571a6b9e131fa38a93a65 (patch) | |
| tree | 9978409f958f97d4932879c0d65363ec24b799d5 /src/regchannel.cpp | |
| parent | 292e1875246a6398cdc9f04ee91d7bb43dc40b45 (diff) | |
| parent | 03cc9eb5c597e37239debac25a7ed6ad4f4d9411 (diff) | |
Merge branch '1.9' of ssh://anope.git.sourceforge.net/gitroot/anope/anope into 1.9
Diffstat (limited to 'src/regchannel.cpp')
| -rw-r--r-- | src/regchannel.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/regchannel.cpp b/src/regchannel.cpp index 17c141ea7..7ff3e753a 100644 --- a/src/regchannel.cpp +++ b/src/regchannel.cpp @@ -563,10 +563,19 @@ void ChannelInfo::LoadMLock() if (this->HasFlag(CI_PERSIST) && !this->c) { 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); + if (ModeManager::FindChannelModeByName(CMODE_PERM) != NULL) + { + /* At this point, CMODE_PERM *must* be locked on the channel, so this is fine */ + ircdproto->SendChannel(this->c, get_mlock_modes(this, true)); + } + 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(); } |
