From 223d5f8fbfdf4a51e3a0b7ea699b3ed0510c6b3d Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Thu, 24 Dec 2020 15:06:59 +0100 Subject: [PATCH] Sort functions Signed-off-by: Knut Ahlers --- msgformatter.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/msgformatter.go b/msgformatter.go index bd20b76..e70273b 100644 --- a/msgformatter.go +++ b/msgformatter.go @@ -38,6 +38,8 @@ func formatMessage(tplString string, m *irc.Message, fields map[string]interface } func init() { + messageFunctions["fixUsername"] = func(username string) string { return strings.TrimLeft(username, "@") } + messageFunctions["getArg"] = func(m *irc.Message, params ...int) (string, error) { msgParts := strings.Split(m.Trailing(), " ") if len(msgParts) < params[0]+1 { @@ -64,6 +66,4 @@ func init() { return game, err } - - messageFunctions["fixUsername"] = func(username string) string { return strings.TrimLeft(username, "@") } }