diff options
author | Timo Sirainen <cras@irssi.org> | 2002-03-22 22:30:45 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-03-22 22:30:45 +0000 |
commit | 8d2a14b47600eae8043eb18d6eb125fa0e463813 (patch) | |
tree | 934107a4284bda798dcb7e095bfc731bdb6303a8 /src/core | |
parent | 6cf0579cea3473d1c883d641a523b8d79f8de873 (diff) | |
download | irssi-8d2a14b47600eae8043eb18d6eb125fa0e463813.zip |
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
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/expandos.c | 12 |
1 files 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 */ |