Skip to content

Commit

Permalink
Remove CanSVSLogout and implement logout support on Plexus.
Browse files Browse the repository at this point in the history
  • Loading branch information
SadieCat committed May 9, 2024
1 parent 33a02b1 commit c36030c
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 15 deletions.
3 changes: 0 additions & 3 deletions include/protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,6 @@ class CoreExport IRCDProto
/* See ns_cert */
bool CanCertFP = false;

/* Can users log out before being fully connected? */
bool CanSVSLogout = false;

/* Whether this IRCd requires unique IDs for each user or server. See TS6/P10. */
bool RequiresID = false;

Expand Down
1 change: 0 additions & 1 deletion modules/protocol/inspircd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ class InspIRCdProto final
CanSetVIdent = true;
CanSQLine = true;
CanSZLine = true;
CanSVSLogout = true;
CanCertFP = true;
RequiresID = true;
MaxModes = 0;
Expand Down
10 changes: 9 additions & 1 deletion modules/protocol/plexus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,15 @@ class PlexusProto final
void SendSVSLogin(const Anope::string &uid, NickAlias *na) override
{
Server *s = Server::Find(uid.substr(0, 3));
Uplink::Send("ENCAP", s ? s->GetName() : uid.substr(0, 3), "SVSLOGIN", uid, '*', '*', na->GetVHostHost().empty() ? "*" : na->GetVHostHost(), na->nc->display);
Anope::string target = s ? s->GetName() : uid.substr(0, 3);
if (na)
{
Uplink::Send("ENCAP", target, "SVSLOGIN", uid, '*', '*', na->GetVHostHost().empty() ? "*" : na->GetVHostHost(), na->nc->display);
}
else
{
Uplink::Send("ENCAP", target, "SU", uid, "");
}
}

void SendSVSNOOP(const Server *server, bool set) override
Expand Down
1 change: 0 additions & 1 deletion modules/protocol/solanum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ class SolanumProto final
CanSZLine = true;
CanSVSNick = true;
CanSVSHold = true;
CanSVSLogout = true;
CanSetVHost = true;
RequiresID = true;
MaxModes = 4;
Expand Down
1 change: 0 additions & 1 deletion modules/protocol/unrealircd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class UnrealIRCdProto final
CanSZLine = true;
CanSVSHold = true;
CanClearBans = true;
CanSVSLogout = true;
CanCertFP = true;
RequiresID = true;
MaxModes = 12;
Expand Down
8 changes: 0 additions & 8 deletions modules/sasl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,6 @@ class Anonymous final

void ProcessMessage(Session *sess, const SASL::Message &m) override
{
if (!IRCD->CanSVSLogout && !User::Find(sess->uid))
{
// This IRCd can't log users out yet.
sasl->Fail(sess);
delete sess;
return;
}

if (m.type == "S")
{
sasl->SendMessage(sess, "C", "+");
Expand Down

0 comments on commit c36030c

Please sign in to comment.