diff options
Diffstat (limited to 'modules/protocol/charybdis.cpp')
-rw-r--r-- | modules/protocol/charybdis.cpp | 38 |
1 files changed, 2 insertions, 36 deletions
diff --git a/modules/protocol/charybdis.cpp b/modules/protocol/charybdis.cpp index b65c76f37..b13dc99fc 100644 --- a/modules/protocol/charybdis.cpp +++ b/modules/protocol/charybdis.cpp @@ -44,26 +44,6 @@ class CharybdisProto : public IRCDProto { ServiceReference<IRCDProto> ratbox; // XXX - ServiceBot *FindIntroduced() - { - ServiceBot *bi = Config->GetClient("OperServ"); - if (bi && bi->introduced) - return bi; - - for (user_map::const_iterator it = UserListByNick.begin(); it != UserListByNick.end(); ++it) - { - User *u = it->second; - if (u->type == UserType::BOT) - { - bi = anope_dynamic_static_cast<ServiceBot *>(u); - if (bi->introduced) - return bi; - } - } - - return NULL; - } - public: CharybdisProto(Module *creator) : IRCDProto(creator, "Charybdis 3.4+") , ratbox("ratbox") @@ -89,6 +69,8 @@ class CharybdisProto : public IRCDProto void SendSGLineDel(XLine *x) override { ratbox->SendSGLineDel(x); } void SendAkill(User *u, XLine *x) override { ratbox->SendAkill(u, x); } void SendAkillDel(XLine *x) override { ratbox->SendAkillDel(x); } + void SendSQLine(User *u, XLine *x) override { ratbox->SendSQLine(u, x); } + void SendSQLineDel(XLine *x) override { ratbox->SendSQLineDel(x); } void SendJoin(User *user, Channel *c, const ChannelStatus *status) override { ratbox->SendJoin(user, c, status); } void SendServer(const Server *server) override { ratbox->SendServer(server); } void SendChannel(Channel *c) override { ratbox->SendChannel(c); } @@ -97,22 +79,6 @@ class CharybdisProto : public IRCDProto void SendLogin(User *u, NickServ::Nick *na) override { ratbox->SendLogin(u, na); } void SendLogout(User *u) override { ratbox->SendLogout(u); } - void SendSQLine(User *, XLine *x) override - { - /* Calculate the time left before this would expire, capping it at 2 days */ - time_t timeleft = x->GetExpires() - Anope::CurTime; - - if (timeleft > 172800 || !x->GetExpires()) - timeleft = 172800; - - Uplink::Send(FindIntroduced(), "ENCAP", "*", "RESV", timeleft, x->GetMask(), 0, x->GetReason()); - } - - void SendSQLineDel(XLine *x) override - { - Uplink::Send(Config->GetClient("OperServ"), "ENCAP", "*", "UNRESV", x->GetMask()); - } - void SendConnect() override { Uplink::Send("PASS", Config->Uplinks[Anope::CurrentUplink].password, "TS", 6, Me->GetSID()); |