From 9dc229b98f03617d95ed8934bdda99b179868972 Mon Sep 17 00:00:00 2001 From: Jeremy Latt Date: Tue, 25 Feb 2014 20:47:59 -0800 Subject: [PATCH] skip nick change if there is no difference --- irc/constants.go | 2 +- irc/server.go | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/irc/constants.go b/irc/constants.go index c91111ba..cf7cb0a9 100644 --- a/irc/constants.go +++ b/irc/constants.go @@ -23,7 +23,7 @@ var ( ) const ( - SEM_VER = "ergonomadic-1.2.0" + SEM_VER = "ergonomadic-1.2.1" CRLF = "\r\n" MAX_REPLY_LEN = 512 - len(CRLF) diff --git a/irc/server.go b/irc/server.go index 135c20d2..f10b2e89 100644 --- a/irc/server.go +++ b/irc/server.go @@ -407,6 +407,10 @@ func (msg *NickCommand) HandleServer(server *Server) { return } + if msg.nickname == client.nick { + return + } + if server.clients.Get(msg.nickname) != client { client.ErrNickNameInUse(msg.nickname) return