mirror of
https://github.com/anope/anope.git
synced 2026-06-29 08:56:39 +02:00
Hybrid does not let us add resvs as a server, but the core expects to be able to qline bot nicks before introducing the bots as a way to prevent collisions, so try harder to find a valid bot to send resvs on startup
This commit is contained in:
@@ -16,6 +16,19 @@ static Anope::string UplinkSID;
|
||||
|
||||
class HybridProto : public IRCDProto
|
||||
{
|
||||
BotInfo *FindIntroduced()
|
||||
{
|
||||
BotInfo *bi = Config->GetClient("OperServ");
|
||||
if (bi && bi->introduced)
|
||||
return bi;
|
||||
|
||||
for (botinfo_map::iterator it = BotListByNick->begin(), it_end = BotListByNick->end(); it != it_end; ++it)
|
||||
if (it->second->introduced)
|
||||
return it->second;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void SendSVSKillInternal(const MessageSource &source, User *user, const Anope::string &buf) anope_override
|
||||
{
|
||||
IRCDProto::SendSVSKillInternal(source, user, buf);
|
||||
@@ -54,7 +67,7 @@ class HybridProto : public IRCDProto
|
||||
|
||||
void SendSQLine(User *, const XLine *x) anope_override
|
||||
{
|
||||
UplinkSocket::Message(Config->GetClient("OperServ")) << "ENCAP * RESV " << (x->expires ? x->expires - Anope::CurTime : 0) << " " << x->mask << " 0 :" << x->reason;
|
||||
UplinkSocket::Message(FindIntroduced()) << "ENCAP * RESV " << (x->expires ? x->expires - Anope::CurTime : 0) << " " << x->mask << " 0 :" << x->reason;
|
||||
}
|
||||
|
||||
void SendSGLineDel(const XLine *x) anope_override
|
||||
|
||||
Reference in New Issue
Block a user