]> 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)
committerJānis Rūcis <parasti@gmail.com>
Sun, 27 Jun 2010 12:23:20 +0000 (15:23 +0300)
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)