diff options
| author | Sadie Powell <sadie@witchery.services> | 2024-02-29 14:49:39 +0000 |
|---|---|---|
| committer | Sadie Powell <sadie@witchery.services> | 2024-02-29 16:14:15 +0000 |
| commit | 579af3c44200a8325bd2eec9e6ff0ec28fa7125b (patch) | |
| tree | 455dbad4bdc231ea4b2b9297e0dfa0a53446d640 /modules/nickserv/nickserv.cpp | |
| parent | 25bdcfcbc472b8e348aa338d8ebb0a18fd006fff (diff) | |
Rip out ns_access and related code.
This is wildly insecure and has been disabled by default for at
least a decade.
Diffstat (limited to 'modules/nickserv/nickserv.cpp')
| -rw-r--r-- | modules/nickserv/nickserv.cpp | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/modules/nickserv/nickserv.cpp b/modules/nickserv/nickserv.cpp index 673400e92..47d2cf30d 100644 --- a/modules/nickserv/nickserv.cpp +++ b/modules/nickserv/nickserv.cpp @@ -190,27 +190,14 @@ public: else if (MOD_RESULT == EVENT_ALLOW) return; - if (!na->nc->HasExt("NS_SECURE") && u->IsRecognized()) - { - na->last_seen = Anope::CurTime; - na->last_usermask = u->GetIdent() + "@" + u->GetDisplayedHost(); - na->last_realname = u->realname; - return; - } - if (Config->GetModule("nickserv")->Get<bool>("nonicknameownership")) return; - bool on_access = u->IsRecognized(false); - - if (on_access || !na->nc->HasExt("KILL_IMMED")) + if (!na->nc->HasExt("KILL_IMMED")) { - if (na->nc->HasExt("NS_SECURE")) - u->SendMessage(NickServ, NICK_IS_SECURE, Config->StrictPrivmsg.c_str(), NickServ->nick.c_str()); - else - u->SendMessage(NickServ, NICK_IS_REGISTERED, Config->StrictPrivmsg.c_str(), NickServ->nick.c_str()); + u->SendMessage(NickServ, NICK_IS_SECURE, Config->StrictPrivmsg.c_str(), NickServ->nick.c_str()); } - if (na->nc->HasExt("KILLPROTECT") && !on_access) + if (na->nc->HasExt("KILLPROTECT")) { if (na->nc->HasExt("KILL_IMMED")) { @@ -310,10 +297,9 @@ public: NickServ = bi; - spacesepstream(conf->GetModule(this)->Get<const Anope::string>("defaults", "ns_secure memo_signon memo_receive")).GetTokens(defaults); + spacesepstream(conf->GetModule(this)->Get<const Anope::string>("defaults", "memo_signon memo_receive")).GetTokens(defaults); if (defaults.empty()) { - defaults.emplace_back("NS_SECURE"); defaults.emplace_back("MEMO_SIGNON"); defaults.emplace_back("MEMO_RECEIVE"); } @@ -523,7 +509,7 @@ public: /* Update last quit and last seen for the user */ NickAlias *na = NickAlias::Find(u->nick); - if (na && !na->nc->HasExt("NS_SUSPENDED") && (u->IsRecognized() || u->IsIdentified(true))) + if (na && !na->nc->HasExt("NS_SUSPENDED") && u->IsIdentified(true)) { na->last_seen = Anope::CurTime; na->last_quit = msg; @@ -543,7 +529,7 @@ public: ++it; User *u = User::Find(na->nick, true); - if (u && (u->IsIdentified(true) || u->IsRecognized())) + if (u && u->IsIdentified(true)) na->last_seen = Anope::CurTime; bool expire = false; |
