From: Egor Date: Tue, 18 Mar 2025 19:24:03 +0000 (+0200) Subject: irc: don't send error when changing nick to itself X-Git-Url: https://git.patchysicp.xyz/?a=commitdiff_plain;h=08bf9a0085dfeb3a730f20279f0eb318d75e1818;p=patchyircd.git irc: don't send error when changing nick to itself --- diff --git a/src/irc.cpp b/src/irc.cpp index ccd4006..fc54316 100644 --- a/src/irc.cpp +++ b/src/irc.cpp @@ -1307,8 +1307,9 @@ void setNick(struct client_data *client, char* nickname) { stringlower(key); // TODO: make the cia nickname a define - if (!strcmp(key, "cia") || client_map.get(key)) { - err_nicknameinuse(client, nickname), sendbuf(client); + if (struct client_data *other = client_map.get(key); other || !strcmp(key, "cia")) { + if (client != other) + err_nicknameinuse(client, nickname), sendbuf(client); return; }