From 769ce0dc012c2f89251e5519a17bc81738e5c5c5 Mon Sep 17 00:00:00 2001
From: Debarshi Ray <rishi@gnu.org>
Date: Sat, 5 Mar 2011 22:28:46 +0200
Subject: [PATCH] Use the actual user name instead of the nick in USER messages

A valid nick may not be a valid user name on some IRC networks. Using
the nick in USER messages will then lead to a network error.

Fixes: https://bugs.freedesktop.org/33913
---
 src/idle-connection.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/idle-connection.c b/src/idle-connection.c
index 58b6087..d8fada9 100644
--- a/src/idle-connection.c
+++ b/src/idle-connection.c
@@ -613,7 +613,7 @@ static void _start_connecting_continue(IdleConnection *conn) {
 
 	if (!priv->username || !priv->username[0]) {
 		g_free(priv->username);
-		priv->username = g_strdup(priv->nickname);
+		priv->username = g_strdup(g_get_user_name());
 	}
 
 	sconn = IDLE_SERVER_CONNECTION_IFACE(g_object_new(connection_type, "host", priv->server, "port", priv->port, NULL));
-- 
1.7.4