3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-10 22:19:31 +01:00

skip nick change if there is no difference

This commit is contained in:
Jeremy Latt 2014-02-25 20:47:59 -08:00
parent e9c5e4794e
commit 9dc229b98f
2 changed files with 5 additions and 1 deletions

View File

@ -23,7 +23,7 @@ var (
) )
const ( const (
SEM_VER = "ergonomadic-1.2.0" SEM_VER = "ergonomadic-1.2.1"
CRLF = "\r\n" CRLF = "\r\n"
MAX_REPLY_LEN = 512 - len(CRLF) MAX_REPLY_LEN = 512 - len(CRLF)

View File

@ -407,6 +407,10 @@ func (msg *NickCommand) HandleServer(server *Server) {
return return
} }
if msg.nickname == client.nick {
return
}
if server.clients.Get(msg.nickname) != client { if server.clients.Get(msg.nickname) != client {
client.ErrNickNameInUse(msg.nickname) client.ErrNickNameInUse(msg.nickname)
return return