From 87ba38e7f7aa8c5542bb13c255912a9e1a0f7931 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Thu, 3 Jul 2014 11:08:42 +0400 Subject: [PATCH] Send "already existing nickname" error to unregistered client, instead of already existing one --- daemon.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon.go b/daemon.go index 30d458b..3c1692f 100644 --- a/daemon.go +++ b/daemon.go @@ -158,8 +158,8 @@ func (daemon *Daemon) ClientRegister(client *Client, command string, cols []stri return } nickname := cols[1] - for client := range daemon.clients { - if client.nickname == nickname { + for existing_client := range daemon.clients { + if existing_client.nickname == nickname { client.ReplyParts("433", "*", nickname, "Nickname is already in use") return }