Migrate interpolated service messages to the t! macro (8 modules)
This commit is contained in:
parent
b462d37bd5
commit
d207c3d60d
133 changed files with 782 additions and 702 deletions
|
|
@ -1,4 +1,4 @@
|
|||
use echo_api::{Priv, Sender, ServiceCtx};
|
||||
use echo_api::{t, Priv, Sender, ServiceCtx};
|
||||
|
||||
// REDACT <#channel|nick> <msgid> [reason]: delete a message by its IRCv3 msgid.
|
||||
// The msgid comes from the reporting oper's client (which saw the tagged message);
|
||||
|
|
@ -15,5 +15,5 @@ pub fn handle(me: &str, from: &Sender, args: &[&str], ctx: &mut ServiceCtx) {
|
|||
};
|
||||
let reason = if args.len() > 3 { args[3..].join(" ") } else { String::new() };
|
||||
ctx.redact(me, target, msgid, &reason);
|
||||
ctx.notice(me, from.uid, format!("Redacted message \x02{msgid}\x02 in \x02{target}\x02."));
|
||||
ctx.notice(me, from.uid, t!(ctx, "Redacted message \x02{msgid}\x02 in \x02{target}\x02.", msgid = msgid, target = target));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue