Skip to content
This repository was archived by the owner on Nov 26, 2018. It is now read-only.

Commit d81064e

Browse files
committed
Verify there is an arg before checking it
1 parent e721bca commit d81064e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

network/irc/irc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ func (bot *ircBot) act(theLine *line.Line) {
619619
return
620620
}
621621

622-
isAskingForSaslPass := theLine.User == "" && strings.ToUpper(theLine.Command) == "AUTHENTICATE" && theLine.Args[0] == "+"
622+
isAskingForSaslPass := theLine.User == "" && strings.ToUpper(theLine.Command) == "AUTHENTICATE" && len(theLine.Args) == 1 && theLine.Args[0] == "+"
623623
if isAskingForSaslPass {
624624
bot.sendSaslPass()
625625
return

0 commit comments

Comments
 (0)