1
0
mirror of https://github.com/anope/anope.git synced 2026-07-09 08:43:14 +02:00

Don't send SXLines until after we start bursting with our uplink

This commit is contained in:
Adam
2010-12-18 19:41:13 -05:00
parent 75098739e6
commit e54cffd9b7
3 changed files with 84 additions and 17 deletions
+39 -6
View File
@@ -252,6 +252,17 @@ std::pair<XLineManager *, XLine *> XLineManager::CheckAll(User *u)
return ret;
}
void XLineManager::Burst()
{
for (std::list<XLineManager *>::iterator it = XLineManagers.begin(), it_end = XLineManagers.end(); it != it_end; ++it)
{
XLineManager *xlm = *it;
for (std::vector<XLine *>::const_iterator it2 = xlm->GetList().begin(), it2_end = xlm->GetList().end(); it2 != it2_end; ++it2)
xlm->Send(*it2);
}
}
/** Get the number of XLines in this XLineManager
* @return The number of XLines
*/
@@ -508,8 +519,8 @@ XLine *SGLineManager::Add(BotInfo *bi, User *u, const Anope::string &mask, time_
this->AddXLine(x);
if (Config->AkillOnAdd)
ircdproto->SendAkill(x);
if (UplinkSock && Config->AkillOnAdd)
this->Send(x);
return x;
}
@@ -530,6 +541,11 @@ void SGLineManager::OnExpire(XLine *x)
ircdproto->SendGlobops(OperServ, "AKILL on %s has expired", x->Mask.c_str());
}
void SGLineManager::Send(XLine *x)
{
ircdproto->SendAkill(x);
}
XLine *SNLineManager::Add(BotInfo *bi, User *u, const Anope::string &mask, time_t expires, const Anope::string &reason)
{
if (!mask.empty() && mask.find_first_not_of("*?") == Anope::string::npos)
@@ -591,8 +607,7 @@ void SNLineManager::Del(XLine *x)
void SNLineManager::OnMatch(User *u, XLine *x)
{
ircdproto->SendSGLine(x);
this->Send(x);
Anope::string reason = "G-Lined: " + x->Reason;
kill_user(Config->s_OperServ, u->nick, reason);
}
@@ -603,6 +618,11 @@ void SNLineManager::OnExpire(XLine *x)
ircdproto->SendGlobops(OperServ, "SNLINE on \2%s\2 has expired", x->Mask.c_str());
}
void SNLineManager::Send(XLine *x)
{
ircdproto->SendSGLine(x);
}
XLine *SQLineManager::Add(BotInfo *bi, User *u, const Anope::string &mask, time_t expires, const Anope::string &reason)
{
if (mask.find_first_not_of("*") == Anope::string::npos)
@@ -683,7 +703,8 @@ XLine *SQLineManager::Add(BotInfo *bi, User *u, const Anope::string &mask, time_
}
}
ircdproto->SendSQLine(x);
if (UplinkSock)
this->Send(x);
return x;
}
@@ -707,6 +728,11 @@ void SQLineManager::OnExpire(XLine *x)
ircdproto->SendGlobops(OperServ, "SQLINE on \2%s\2 has expired", x->Mask.c_str());
}
void SQLineManager::Send(XLine *x)
{
ircdproto->SendSQLine(x);
}
bool SQLineManager::Check(Channel *c)
{
if (ircd->chansqline && SQLine)
@@ -765,7 +791,8 @@ XLine *SZLineManager::Add(BotInfo *bi, User *u, const Anope::string &mask, time_
this->AddXLine(x);
ircdproto->SendSZLine(x);
if (UplinkSock)
this->Send(x);
return x;
}
@@ -785,3 +812,9 @@ void SZLineManager::OnExpire(XLine *x)
if (Config->WallSZLineExpire)
ircdproto->SendGlobops(OperServ, "SZLINE on \2%s\2 has expired", x->Mask.c_str());
}
void SZLineManager::Send(XLine *x)
{
ircdproto->SendSZLine(x);
}