Unnecessary variable.

This commit is contained in:
Elliott Pardee 2014-12-09 06:33:56 -05:00
parent b765d02edc
commit af0a652957

3
bot.go
View File

@ -44,8 +44,7 @@ func processMsg(nick string, msg string, conn *irc.Connection) {
// TODO // TODO
} else if strings.HasPrefix(msg, ".dm") && len(strings.Split(msg, " ")) == 2 { } else if strings.HasPrefix(msg, ".dm") && len(strings.Split(msg, " ")) == 2 {
if len(dunmas) == 0 && len(strings.Split(msg, " ")[1]) > 0 { if len(dunmas) == 0 && len(strings.Split(msg, " ")[1]) > 0 {
var cmdarray = strings.Split(msg, " ") dunmas = strings.Split(msg, " ")[1]
dunmas = cmdarray[1]
fmt.Println("[cmd] dm - " + dunmas) fmt.Println("[cmd] dm - " + dunmas)
conn.Privmsg(channel, "dm is now set to " + dunmas) conn.Privmsg(channel, "dm is now set to " + dunmas)
} else { } else {