summaryrefslogtreecommitdiff
path: root/src/operserv.cpp
diff options
context:
space:
mode:
authorDukePyrolator <DukePyrolator@anope.org>2010-12-19 08:56:31 +0100
committerDukePyrolator <DukePyrolator@anope.org>2010-12-19 08:56:31 +0100
commit184e14ea83412489921367614d63a7c24df3827d (patch)
tree152c0318684ec36375b55e3553b1f70e8734843e /src/operserv.cpp
parent02476332ea2f5ab3fd766e0ca9d83d67a9a9f122 (diff)
parent21125cf2cb0dc5f80f9f796fe4c222c36ba2fcc4 (diff)
Merge branch '1.9' of ssh://anope.git.sourceforge.net/gitroot/anope/anope into 1.9
Diffstat (limited to 'src/operserv.cpp')
-rw-r--r--src/operserv.cpp45
1 files changed, 39 insertions, 6 deletions
diff --git a/src/operserv.cpp b/src/operserv.cpp
index 911384e79..46b09980d 100644
--- a/src/operserv.cpp
+++ b/src/operserv.cpp
@@ -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
*/
@@ -519,8 +530,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;
}
@@ -541,6 +552,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)
@@ -602,8 +618,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, reason);
}
@@ -614,6 +629,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)
@@ -694,7 +714,8 @@ XLine *SQLineManager::Add(BotInfo *bi, User *u, const Anope::string &mask, time_
}
}
- ircdproto->SendSQLine(x);
+ if (UplinkSock)
+ this->Send(x);
return x;
}
@@ -718,6 +739,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)
@@ -776,7 +802,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;
}
@@ -796,3 +823,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);
+}
+