Sort functions

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2020-12-24 15:06:59 +01:00
parent 5fc593e08b
commit 223d5f8fbf
Signed by: luzifer
GPG key ID: 0066F03ED215AD7D

View file

@ -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, "@") }
}