From: Jānis Rūcis Date: Thu, 1 Apr 2010 17:49:53 +0000 (+0300) Subject: IRC: use player name as "real name" X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1faffbdc73467f44787d071e295b403785042276;p=xonotic%2Fdarkplaces.git IRC: use player name as "real name" --- diff --git a/irc.c b/irc.c index 6dfdbe17..bec842b3 100644 --- a/irc.c +++ b/irc.c @@ -342,15 +342,15 @@ static char *IRC_NickFromPlayerName(void) static void IRC_Register(void) { + char *nick = IRC_NickFromPlayerName(); + if (!irc_nickname.string[0]) - { - char *nick = IRC_NickFromPlayerName(); Cvar_SetQuick(&irc_nickname, nick); - Z_Free(nick); - } IRC_AddMessage(va("NICK %s", irc_nickname.string)); - IRC_AddMessage(va("USER %s optional optional :%s", irc_nickname.string, irc_nickname.string)); + IRC_AddMessage(va("USER %s optional optional :%s", irc_nickname.string, nick)); + + Z_Free(nick); } static void IRC_Connect_f(void)