summaryrefslogtreecommitdiff
path: root/src/fe-common/irc/fe-irc-commands.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-07-23 01:39:08 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-07-23 01:39:08 +0000
commit1a816b15f5af992a90064f13c0b538c5686a5e39 (patch)
tree216ef0b18fa4011958013db51b748534ef4c4fe0 /src/fe-common/irc/fe-irc-commands.c
parenta31ac88d7da6f02f8ebec5a95f09bf2c7953377d (diff)
downloadirssi-1a816b15f5af992a90064f13c0b538c5686a5e39.zip
SET print_active_channel - if you have multiple channels in same window,
should we always print the channel for each message (<nick:#channel>) or only when the channel isn't active. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@513 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/irc/fe-irc-commands.c')
-rw-r--r--src/fe-common/irc/fe-irc-commands.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/fe-common/irc/fe-irc-commands.c b/src/fe-common/irc/fe-irc-commands.c
index f390c6b0..31af63df 100644
--- a/src/fe-common/irc/fe-irc-commands.c
+++ b/src/fe-common/irc/fe-irc-commands.c
@@ -98,7 +98,7 @@ static void cmd_msg(gchar *data, IRC_SERVER_REC *server, WI_ITEM_REC *item)
const char *nickmode;
char *target, *msg, *freestr, *newtarget;
void *free_arg;
- int free_ret;
+ int free_ret, print_channel;
g_return_if_fail(data != NULL);
@@ -148,7 +148,14 @@ static void cmd_msg(gchar *data, IRC_SERVER_REC *server, WI_ITEM_REC *item)
nickrec->op ? "@" : nickrec->voice ? "+" : " ";
window = channel == NULL ? NULL : window_item_window((WI_ITEM_REC *) channel);
- if (window != NULL && window->active == (WI_ITEM_REC *) channel)
+
+ print_channel = window == NULL ||
+ window->active != (WI_ITEM_REC *) channel;
+ if (!print_channel && settings_get_bool("print_active_channel") &&
+ window != NULL && g_slist_length(window->items) > 1)
+ print_channel = TRUE;
+
+ if (!print_channel)
{
printformat(server, target, MSGLEVEL_PUBLIC | MSGLEVEL_NOHILIGHT,
IRCTXT_OWN_MSG, server->nick, msg, nickmode);