summary refs log tree commit diff stats
path: root/src/fe-gtk
diff options
context:
space:
mode:
authorTingPing <tingping@tingping.se>2013-04-03 18:10:14 -0400
committerTingPing <tingping@tingping.se>2013-04-03 18:10:14 -0400
commit86cf7de430ce9d1d255ec82476aca5ffd5146dd9 (patch)
tree786e034fa1ef8843eef289f6e52a1e1a96497b8f /src/fe-gtk
parent477d7470c1da3fae092687d0dbf5dbab5d37633a (diff)
add %u to userlist popups for account
Diffstat (limited to 'src/fe-gtk')
-rw-r--r--src/fe-gtk/maingui.c2
-rw-r--r--src/fe-gtk/menu.c12
2 files changed, 10 insertions, 4 deletions
diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c
index 816a93f7..e8479904 100644
--- a/src/fe-gtk/maingui.c
+++ b/src/fe-gtk/maingui.c
@@ -2141,7 +2141,7 @@ mg_dialog_button_cb (GtkWidget *wid, char *cmd)
 
 	auto_insert (buf, sizeof (buf), cmd, 0, 0, "", "", "",
 					 server_get_network (current_sess->server, TRUE), host, "",
-					 current_sess->channel);
+					 current_sess->channel, "");
 
 	handle_command (current_sess, buf, TRUE);
 
diff --git a/src/fe-gtk/menu.c b/src/fe-gtk/menu.c
index fa7d5790..521ba362 100644
--- a/src/fe-gtk/menu.c
+++ b/src/fe-gtk/menu.c
@@ -113,6 +113,7 @@ nick_command_parse (session *sess, char *cmd, char *nick, char *allnick)
 {
 	char *buf;
 	char *host = _("Host unknown");
+	char *account = _("Account unknown");
 	struct User *user;
 	int len;
 
@@ -125,8 +126,13 @@ nick_command_parse (session *sess, char *cmd, char *nick, char *allnick)
 	} else*/
 	{
 		user = userlist_find (sess, nick);
-		if (user && user->hostname)
-			host = strchr (user->hostname, '@') + 1;
+		if (user)
+		{
+			if (user->hostname)
+				host = strchr (user->hostname, '@') + 1;
+			if (user->account)
+				account = user->account;
+		}
 	}
 
 	/* this can't overflow, since popup->cmd is only 256 */
@@ -135,7 +141,7 @@ nick_command_parse (session *sess, char *cmd, char *nick, char *allnick)
 
 	auto_insert (buf, len, cmd, 0, 0, allnick, sess->channel, "",
 					 server_get_network (sess->server, TRUE), host,
-					 sess->server->nick, nick);
+					 sess->server->nick, nick, account);
 
 	nick_command (sess, buf);