From 31794553e604701e1dfd88398cfd074ce8f89acb Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 27 Jun 2001 21:20:26 +0000 Subject: [PATCH] /NICK: don't bother trying to change the nick to the one you already have git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1577 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/irc/core/irc-commands.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/irc/core/irc-commands.c b/src/irc/core/irc-commands.c index fdad5d6e..bbb2ee05 100644 --- a/src/irc/core/irc-commands.c +++ b/src/irc/core/irc-commands.c @@ -316,6 +316,13 @@ static void cmd_nick(const char *data, IRC_SERVER_REC *server, WI_ITEM_REC *item if (!cmd_get_params(data, &free_arg, 1, &nick)) return; + if (strcmp(nick, server->nick) == 0) { + /* don't bother trying to change the nick to the one you + already have */ + cmd_params_free(free_arg); + return; + } + server->nick_changing = TRUE; irc_send_cmdv(server, "NICK %s", nick);