diff options
author | Adam <Adam@anope.org> | 2011-02-25 21:40:43 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-02-25 21:40:43 -0500 |
commit | ee387569821b45581063f6bc349cccc643f9a293 (patch) | |
tree | 9f8a83e5e9a36304d06c75f2bdf351729ca9bb65 /src/channels.cpp | |
parent | eea7d2eb7715f875096641bae18250122078bd00 (diff) |
Fixed a lot of small problems
Diffstat (limited to 'src/channels.cpp')
-rw-r--r-- | src/channels.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/channels.cpp b/src/channels.cpp index 72b09ae1e..c68fd3ba0 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -126,7 +126,7 @@ void Channel::JoinUser(User *user) { Log(LOG_DEBUG) << "Changing TS of " << this->name << " from " << this->creation_time << " to " << this->ci->time_registered; this->creation_time = this->ci->time_registered; - ircdproto->SendChannel(this, ""); + ircdproto->SendChannel(this); this->Reset(); } @@ -147,7 +147,7 @@ void Channel::JoinUser(User *user) * legit users - Rob **/ if (this->users.size() >= Config->BSMinUsers && !this->FindUser(this->ci->bi)) - this->ci->bi->Join(this, false); + this->ci->bi->Join(this, &Config->BotModeList); /* Only display the greet if the main uplink we're connected * to has synced, or we'll get greet-floods when the net * recovers from a netsplit. -GD @@ -444,16 +444,17 @@ void Channel::RemoveModeInternal(ChannelMode *cm, const Anope::string ¶m, bo if (cc) cc->Status->UnsetFlag(cm->Name); - /* Reset modes on bots if we're supposed to */ - if (bi) + if (EnforceMLock) { - if (std::find(Config->BotModeList.begin(), Config->BotModeList.end(), cm) != Config->BotModeList.end()) - this->SetMode(bi, cm, bi->nick); - } + /* Reset modes on bots if we're supposed to */ + if (bi) + { + if (Config->BotModeList.HasFlag(cm->Name)) + this->SetMode(bi, cm, bi->nick); + } - /* Enforce secureops, etc */ - if (EnforceMLock) chan_set_correct_modes(u, this, 0); + } return; } @@ -726,7 +727,10 @@ void Channel::SetModesInternal(User *setter, const Anope::string &mode, bool Enf continue; cm = ModeManager::FindChannelModeByChar(m[i]); if (!cm) + { + Log(LOG_DEBUG) << "Channel::SetModeInternal: Unknown mode char " << m[i]; continue; + } modestring += cm->ModeChar; } |