summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/protocol/hybrid.cpp21
-rw-r--r--modules/protocol/plexus.cpp12
2 files changed, 22 insertions, 11 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
diff --git a/modules/protocol/plexus.cpp b/modules/protocol/plexus.cpp
index 28b2c6008..d117389e7 100644
--- a/modules/protocol/plexus.cpp
+++ b/modules/protocol/plexus.cpp
@@ -45,6 +45,8 @@ class PlexusProto : public IRCDProto
void SendAkill(User *u, XLine *x) anope_override { hybrid->SendAkill(u, x); }
void SendServer(const Server *server) anope_override { hybrid->SendServer(server); }
void SendChannel(Channel *c) anope_override { hybrid->SendChannel(c); }
+ void SendSVSHold(const Anope::string &nick) anope_override { hybrid->SendSVSHold(nick); }
+ void SendSVSHoldDel(const Anope::string &nick) anope_override { hybrid->SendSVSHoldDel(nick); }
void SendJoin(const User *user, Channel *c, const ChannelStatus *status) anope_override
{
@@ -162,16 +164,6 @@ class PlexusProto : public IRCDProto
{
UplinkSocket::Message(source) << "ENCAP " << user->server->GetName() << " SVSPART " << user->GetUID() << " " << chan;
}
-
- void SendSVSHold(const Anope::string &nick) anope_override
- {
- UplinkSocket::Message(OperServ) << "ENCAP * RESV " << Config->NSReleaseTimeout << " " << nick << " 0 :Being held for registered user";
- }
-
- void SendSVSHoldDel(const Anope::string &nick) anope_override
- {
- UplinkSocket::Message(OperServ) << "UNRESV * " << nick;
- }
};
struct IRCDMessageEncap : IRCDMessage