Last active
February 21, 2017 18:24
-
-
Save mdellavo/08bbe0a245860d8f7d994069d874a8f9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/scumbag/scumbag.go b/scumbag/scumbag.go | |
index 1314abe..195c7e1 100644 | |
--- a/scumbag/scumbag.go | |
+++ b/scumbag/scumbag.go | |
@@ -241,6 +241,9 @@ func (bot *Scumbag) processCommands(line *irc.Line) { | |
func (bot *Scumbag) getCommand(line *irc.Line) (string, string) { | |
fields := strings.Fields(line.Args[1]) | |
+ if len(fields) == 0 { | |
+ return "", "" | |
+ } | |
command := fields[0] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment