From c646ccc0ec5b6bb52e66ef4bc3b11fd09bde5b11 Mon Sep 17 00:00:00 2001 From: Jean Date: Thu, 16 Jul 2026 00:45:18 +0000 Subject: [PATCH] NickServ: add SASET for operator account edits --- modules/nickserv/src/lib.rs | 4 +++ modules/nickserv/src/saset.rs | 57 +++++++++++++++++++++++++++++++++++ src/engine/tests.rs | 35 +++++++++++++++++++++ 3 files changed, 96 insertions(+) create mode 100644 modules/nickserv/src/saset.rs diff --git a/modules/nickserv/src/lib.rs b/modules/nickserv/src/lib.rs index 9feb884..92eff5f 100644 --- a/modules/nickserv/src/lib.rs +++ b/modules/nickserv/src/lib.rs @@ -16,6 +16,8 @@ mod info; mod alist; #[path = "set.rs"] mod set; +#[path = "saset.rs"] +mod saset; #[path = "drop.rs"] mod drop; #[path = "group.rs"] @@ -53,6 +55,7 @@ const TOPICS: &[HelpEntry] = &[ HelpEntry { cmd: "INFO", summary: "show account information", detail: "Syntax: \x02INFO [account]\x02\nShows account information. The email is shown only to the owner." }, HelpEntry { cmd: "ALIST", summary: "list channels you have access on", detail: "Syntax: \x02ALIST\x02\nLists the channels you hold access on." }, HelpEntry { cmd: "SET", summary: "change password or email", detail: "Syntax: \x02SET PASSWORD \x02 or \x02SET EMAIL
\x02\nChanges your account password or email." }, + HelpEntry { cmd: "SASET", summary: "change another account's settings (operator)", detail: "Syntax: \x02SASET PASSWORD \x02, \x02EMAIL [address]\x02, or \x02GREET [message]\x02\nEdits another account's settings. Operators only." }, HelpEntry { cmd: "GROUP", summary: "link this nick to an account", detail: "Syntax: \x02GROUP \x02\nLinks your current nick to an account as an alias, so identifying under it logs into that account." }, HelpEntry { cmd: "GLIST", summary: "list your grouped nicks", detail: "Syntax: \x02GLIST\x02\nLists the nicks grouped to your account." }, HelpEntry { cmd: "UNGROUP", summary: "remove a grouped nick", detail: "Syntax: \x02UNGROUP [nick]\x02\nRemoves a grouped nick (your current one by default)." }, @@ -114,6 +117,7 @@ impl Service for NickServ { Some("INFO") => info::handle(me, from, args, ctx, db), Some("ALIST") => alist::handle(me, from, ctx, db), Some("SET") => set::handle(me, from, args, ctx, db), + Some("SASET") => saset::handle(me, from, args, ctx, db), Some("DROP") => drop::handle(me, from, args, ctx, net, db), Some("GROUP") => group::handle(me, from, args, ctx, db), Some("GLIST") => glist::handle(me, from, ctx, db), diff --git a/modules/nickserv/src/saset.rs b/modules/nickserv/src/saset.rs new file mode 100644 index 0000000..fc7c4a9 --- /dev/null +++ b/modules/nickserv/src/saset.rs @@ -0,0 +1,57 @@ +use echo_api::{Priv, Sender, ServiceCtx, Store}; + +// SASET