]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
IRC: use player name as "real name"
authorJānis Rūcis <parasti@gmail.com>
Thu, 1 Apr 2010 17:49:53 +0000 (20:49 +0300)
committernitroxis <nitroxis@wtwrp.de>
Fri, 10 Jan 2014 19:33:37 +0000 (20:33 +0100)
irc.c

diff --git a/irc.c b/irc.c
index 6dfdbe17ce0b0d806954a67898910d097431fb4b..bec842b349c2b4d0b6f9adb7cd9e880a24fdcaab 100644 (file)
--- 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)