diff options
author | Michael Hazell <michaelhazell@hotmail.com> | 2016-09-04 04:05:11 -0400 |
---|---|---|
committer | Michael Hazell <michaelhazell@hotmail.com> | 2016-09-04 04:05:11 -0400 |
commit | 39eb9f8cfc1afb9f5a793336c2b001e8c0434431 (patch) | |
tree | de20aa7b5449cc5e8ab935df2c3e7634661d226c /modules/protocol/charybdis.cpp | |
parent | 2a5e7827bde932cc632e2457964631982dd96fca (diff) |
ratbox: fix RESVs
Also, enable channel support because it wasn't specified already and point charybdis to these methods instead.
Diffstat (limited to 'modules/protocol/charybdis.cpp')
-rw-r--r-- | modules/protocol/charybdis.cpp | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/modules/protocol/charybdis.cpp b/modules/protocol/charybdis.cpp index 68bbe12b8..acfc93044 100644 --- a/modules/protocol/charybdis.cpp +++ b/modules/protocol/charybdis.cpp @@ -31,20 +31,6 @@ class ChannelModeLargeBan : public ChannelMode class CharybdisProto : 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; - } - public: CharybdisProto(Module *creator) : IRCDProto(creator, "Charybdis 3.4+") @@ -70,6 +56,8 @@ class CharybdisProto : public IRCDProto void SendSGLineDel(const XLine *x) anope_override { ratbox->SendSGLineDel(x); } void SendAkill(User *u, XLine *x) anope_override { ratbox->SendAkill(u, x); } void SendAkillDel(const XLine *x) anope_override { ratbox->SendAkillDel(x); } + void SendSQLine(User *u, const XLine *x) anope_override { ratbox->SendSQLine(u, x); } + void SendSQLineDel(const XLine *x) anope_override { ratbox->SendSQLineDel(x); } void SendJoin(User *user, Channel *c, const ChannelStatus *status) anope_override { ratbox->SendJoin(user, c, status); } void SendServer(const Server *server) anope_override { ratbox->SendServer(server); } void SendChannel(Channel *c) anope_override { ratbox->SendChannel(c); } @@ -90,22 +78,6 @@ class CharybdisProto : public IRCDProto UplinkSocket::Message(Me) << "ENCAP * MECHLIST :" << (mechanisms.empty() ? "" : mechlist.substr(1)); } - void SendSQLine(User *, const XLine *x) anope_override - { - /* Calculate the time left before this would expire, capping it at 2 days */ - time_t timeleft = x->expires - Anope::CurTime; - - if (timeleft > 172800 || !x->expires) - timeleft = 172800; - - UplinkSocket::Message(FindIntroduced()) << "ENCAP * RESV " << timeleft << " " << x->mask << " 0 :" << x->GetReason(); - } - - void SendSQLineDel(const XLine *x) anope_override - { - UplinkSocket::Message(Config->GetClient("OperServ")) << "ENCAP * UNRESV " << x->mask; - } - void SendConnect() anope_override { UplinkSocket::Message() << "PASS " << Config->Uplinks[Anope::CurrentUplink].password << " TS 6 :" << Me->GetSID(); |