1
0
mirror of https://github.com/anope/anope.git synced 2026-06-27 12:36:38 +02:00

Added cs_mode, rewrote the old list mode code, and added CIDR support

This commit is contained in:
Adam
2010-11-20 21:45:30 -05:00
parent a85112172d
commit 246f44b988
42 changed files with 1251 additions and 1291 deletions
+15 -19
View File
@@ -141,29 +141,25 @@ void BotInfo::Join(Channel *c, bool update_ts)
{
if (Config->BSSmartJoin)
{
std::pair<Channel::ModeList::iterator, Channel::ModeList::iterator> bans = c->GetModeList(CMODE_BAN);
/* We check for bans */
if (c->bans && c->bans->count)
for (; bans.first != bans.second; ++bans.first)
{
Entry *ban, *next;
for (ban = c->bans->entries; ban; ban = next)
{
next = ban->next;
if (entry_match(ban, this->nick, this->GetIdent(), this->host, 0))
c->RemoveMode(NULL, CMODE_BAN, ban->mask);
}
Anope::string Limit;
unsigned limit = 0;
if (c->GetParam(CMODE_LIMIT, Limit) && Limit.is_pos_number_only())
limit = convertTo<unsigned>(Limit);
/* Should we be invited? */
if (c->HasMode(CMODE_INVITE) || (limit && c->users.size() >= limit))
ircdproto->SendNoticeChanops(this, c, "%s invited %s into the channel.", this->nick.c_str(), this->nick.c_str());
Entry ban(bans.first->second);
if (ban.Matches(this))
c->RemoveMode(NULL, CMODE_BAN, ban.GetMask());
}
Anope::string Limit;
unsigned limit = 0;
if (c->GetParam(CMODE_LIMIT, Limit) && Limit.is_pos_number_only())
limit = convertTo<unsigned>(Limit);
/* Should we be invited? */
if (c->HasMode(CMODE_INVITE) || (limit && c->users.size() >= limit))
ircdproto->SendNoticeChanops(this, c, "%s invited %s into the channel.", this->nick.c_str(), this->nick.c_str());
ModeManager::ProcessModes();
}