Fixed an index out of range error that occurs when a client without a nick sends a USER command.

This commit is contained in:
iiori 2016-02-27 20:54:33 -05:00
parent cc79e22ffe
commit 64e72362d9

View File

@ -111,7 +111,7 @@ func (s *Server) handleCommand(client *Client, command string, args []string) {
case "USER": case "USER":
if client.nick == "" { if client.nick == "" {
client.reply(rplKill, "Your nickname is already being used") client.reply(rplKill, "Your nickname is already being used", "")
client.disconnect() client.disconnect()
} else { } else {
client.reply(rplWelcome) client.reply(rplWelcome)