diff options
author | Adam <Adam@anope.org> | 2013-02-23 17:41:52 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-02-23 17:41:52 -0500 |
commit | d04db3d38b2bafad532bf188a5f2044ea97c9e3c (patch) | |
tree | c6925ccdd22ca446c79808ba7b0c2a8b5ecf93a1 /modules/protocol/hybrid.cpp | |
parent | 35c260877f7a1c50b3bac720c3256a5055a622e0 (diff) |
Add SVSNICK and SVSHOLD to hybrid
Diffstat (limited to 'modules/protocol/hybrid.cpp')
-rw-r--r-- | modules/protocol/hybrid.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/modules/protocol/hybrid.cpp b/modules/protocol/hybrid.cpp index a1e9a89e7..ac3f88c41 100644 --- a/modules/protocol/hybrid.cpp +++ b/modules/protocol/hybrid.cpp @@ -20,9 +20,11 @@ class HybridProto : public IRCDProto HybridProto(Module *creator) : IRCDProto(creator, "Hybrid 8.0.0") { DefaultPseudoclientModes = "+oi"; + CanSVSNick = true; CanSNLine = true; CanSQLine = true; CanSZLine = true; + CanSVSHold = true; RequiresID = true; MaxModes = 4; } @@ -44,7 +46,7 @@ class HybridProto : public IRCDProto void SendSQLine(User *, const XLine *x) anope_override { - UplinkSocket::Message(OperServ) << "RESV * " << x->mask << " :" << x->GetReason(); + UplinkSocket::Message(OperServ) << "ENCAP * RESV " << (x->expires ? x->expires - Anope::CurTime : 0) << " " << x->mask << " 0 :" << x->reason; } void SendSGLineDel(const XLine *x) anope_override @@ -241,6 +243,23 @@ class HybridProto : public IRCDProto if (needjoin) bi->Part(c); } + + void SendForceNickChange(const User *u, const Anope::string &newnick, time_t when) anope_override + { + UplinkSocket::Message(Me) << "SVSNICK " << u->nick << " " << newnick << " " << when; + } + + void SendSVSHold(const Anope::string &nick) anope_override + { + XLine x(nick, OperServ->nick, Anope::CurTime + Config->NSReleaseTimeout, "Being held for registered user"); + this->SendSQLine(NULL, &x); + } + + void SendSVSHoldDel(const Anope::string &nick) anope_override + { + XLine x(nick); + this->SendSQLineDel(&x); + } }; struct IRCDMessageBMask : IRCDMessage |