From 8d2a14b47600eae8043eb18d6eb125fa0e463813 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 22 Mar 2002 22:30:45 +0000 Subject: [PATCH] Add server tag as well to topicbar with queries git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2638 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/core/expandos.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/core/expandos.c b/src/core/expandos.c index 777d50e1..c5711f91 100644 --- a/src/core/expandos.c +++ b/src/core/expandos.c @@ -431,8 +431,16 @@ static char *expando_sysarch(SERVER_REC *server, void *item, int *free_ret) /* Topic of active channel (or address of queried nick) */ static char *expando_topic(SERVER_REC *server, void *item, int *free_ret) { - return IS_CHANNEL(item) ? CHANNEL(item)->topic : - IS_QUERY(item) ? QUERY(item)->address : ""; + if (IS_CHANNEL(item)) + return CHANNEL(item)->topic; + if (IS_QUERY(item)) { + QUERY_REC *query = QUERY(item); + + *free_ret = TRUE; + return g_strdup_printf("%s (%s)", query->address, + query->server_tag); + } + return ""; } /* Server tag */