summaryrefslogtreecommitdiff
path: root/modules/protocol/charybdis.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/protocol/charybdis.cpp')
-rw-r--r--modules/protocol/charybdis.cpp42
1 files changed, 7 insertions, 35 deletions
diff --git a/modules/protocol/charybdis.cpp b/modules/protocol/charybdis.cpp
index 68bbe12b8..6890d8948 100644
--- a/modules/protocol/charybdis.cpp
+++ b/modules/protocol/charybdis.cpp
@@ -1,6 +1,6 @@
/* Charybdis IRCD functions
*
- * (C) 2003-2016 Anope Team
+ * (C) 2003-2017 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
@@ -31,22 +31,8 @@ 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+")
{
DefaultPseudoclientModes = "+oiS";
@@ -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); }
@@ -81,29 +69,13 @@ class CharybdisProto : public IRCDProto
void SendSASLMechanisms(std::vector<Anope::string> &mechanisms) anope_override
{
Anope::string mechlist;
-
+
for (unsigned i = 0; i < mechanisms.size(); ++i)
{
mechlist += "," + mechanisms[i];
}
-
- 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;
+ UplinkSocket::Message(Me) << "ENCAP * MECHLIST :" << (mechanisms.empty() ? "" : mechlist.substr(1));
}
void SendConnect() anope_override
@@ -349,7 +321,7 @@ class ProtoCharybdis : public Module
ModeManager::AddUserMode(new UserMode("NOFORWARD", 'Q'));
ModeManager::AddUserMode(new UserMode("REGPRIV", 'R'));
ModeManager::AddUserMode(new UserModeOperOnly("OPERWALLS", 'z'));
- ModeManager::AddUserMode(new UserModeNoone("SSL", 'Z'));
+ ModeManager::AddUserMode(new UserModeNoone("SSL", 'Z'));
/* b/e/I */
ModeManager::AddChannelMode(new ChannelModeList("QUIET", 'q'));