3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-22 18:52:41 +01:00

allow nick changing

This commit is contained in:
Jeremy Latt 2014-02-26 12:24:52 -08:00
parent 39911a812d
commit 4df8ec12f6
2 changed files with 3 additions and 2 deletions

View File

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

View File

@ -411,7 +411,8 @@ func (msg *NickCommand) HandleServer(server *Server) {
return
}
if server.clients.Get(msg.nickname) != client {
target := server.clients.Get(msg.nickname)
if (target != nil) && (target != client) {
client.ErrNickNameInUse(msg.nickname)
return
}