From 02400b667cc743911fe999aa185d5a4e91d389ea Mon Sep 17 00:00:00 2001 From: Zorchenhimer Date: Sun, 10 Mar 2019 21:35:24 -0400 Subject: [PATCH] Fix crash when trying to mod nobody Fixes issue #12 --- chatcommands.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/chatcommands.go b/chatcommands.go index bf25d0e..ec75766 100644 --- a/chatcommands.go +++ b/chatcommands.go @@ -140,6 +140,9 @@ func init() { admin: map[string]CommandFunction{ "mod": func(cl *Client, args []string) string { + if len(args) == 0 { + return "Missing user to mod." + } if err := cl.belongsTo.Mod(args[0]); err != nil { return err.Error() }