mirror of
https://github.com/irssi/irssi.git
synced 2026-08-21 01:22:26 +02:00
print to active window when -window is specified
This commit is contained in:
parent
22851686f5
commit
9593be14f5
1 changed files with 4 additions and 2 deletions
|
|
@ -163,8 +163,10 @@ static void cmd_cat(const char *data, SERVER_REC *server, WI_ITEM_REC *item)
|
||||||
buf = g_string_sized_new(512);
|
buf = g_string_sized_new(512);
|
||||||
while (g_io_channel_read_line_string(handle, buf, &tpos, NULL) == G_IO_STATUS_NORMAL) {
|
while (g_io_channel_read_line_string(handle, buf, &tpos, NULL) == G_IO_STATUS_NORMAL) {
|
||||||
buf->str[tpos] = '\0';
|
buf->str[tpos] = '\0';
|
||||||
printtext(target ? server : NULL, target && item != NULL ? item->name : NULL, MSGLEVEL_CLIENTCRAP |
|
if (target)
|
||||||
MSGLEVEL_NEVER, "%s", buf->str);
|
printtext_window(active_win, MSGLEVEL_CLIENTCRAP | MSGLEVEL_NEVER, "%s", buf->str);
|
||||||
|
else
|
||||||
|
printtext(NULL, NULL, MSGLEVEL_CLIENTCRAP | MSGLEVEL_NEVER, "%s", buf->str);
|
||||||
}
|
}
|
||||||
g_string_free(buf, TRUE);
|
g_string_free(buf, TRUE);
|
||||||
cmd_params_free(free_arg);
|
cmd_params_free(free_arg);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue