From 5fc593e08b6ffec32ed962a1925b81569fe60f65 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Thu, 24 Dec 2020 14:13:26 +0100 Subject: [PATCH] Add template function to normalize username Signed-off-by: Knut Ahlers --- msgformatter.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/msgformatter.go b/msgformatter.go index e61c5c9..bd20b76 100644 --- a/msgformatter.go +++ b/msgformatter.go @@ -64,4 +64,6 @@ func init() { return game, err } + + messageFunctions["fixUsername"] = func(username string) string { return strings.TrimLeft(username, "@") } }