summaryrefslogtreecommitdiff
path: root/src/fe-common/core
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2002-06-06 20:41:38 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2002-06-06 20:41:38 +0000
commit55b4ae92b8187572efdbe8623cecec47bacde7e7 (patch)
tree9a5e88bfbdaa10a4c7620ad12d4856b79a77055b /src/fe-common/core
parent82a640763469f95af8fca2571f8d02859873d0eb (diff)
downloadirssi-55b4ae92b8187572efdbe8623cecec47bacde7e7.zip
Added /SET show_names_on_join, /QUOTE NAMES #channel now prints the names
list in raw format rather than just ignoring the reply and printing the nicks from cache. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2845 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/core')
-rw-r--r--src/fe-common/core/fe-channels.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/fe-common/core/fe-channels.c b/src/fe-common/core/fe-channels.c
index f80c4173..7aae6dbd 100644
--- a/src/fe-common/core/fe-channels.c
+++ b/src/fe-common/core/fe-channels.c
@@ -103,6 +103,12 @@ static void signal_window_item_changed(WINDOW_REC *window, WI_ITEM_REC *item)
}
}
+static void sig_channel_joined(CHANNEL_REC *channel)
+{
+ if (settings_get_bool("show_names_on_join"))
+ fe_channels_nicklist(channel, CHANNEL_NICKLIST_FLAG_ALL);
+}
+
static void cmd_wjoin_pre(const char *data)
{
GHashTable *optlist;
@@ -601,6 +607,7 @@ static void cmd_cycle(const char *data, SERVER_REC *server, WI_ITEM_REC *item)
void fe_channels_init(void)
{
settings_add_bool("lookandfeel", "autoclose_windows", TRUE);
+ settings_add_bool("lookandfeel", "show_names_on_join", TRUE);
settings_add_int("lookandfeel", "names_max_columns", 6);
settings_add_int("lookandfeel", "names_max_width", 0);
@@ -608,6 +615,7 @@ void fe_channels_init(void)
signal_add("channel destroyed", (SIGNAL_FUNC) signal_channel_destroyed);
signal_add_last("window item changed", (SIGNAL_FUNC) signal_window_item_changed);
signal_add_last("server disconnected", (SIGNAL_FUNC) sig_disconnected);
+ signal_add("channel joined", (SIGNAL_FUNC) sig_channel_joined);
command_bind_first("join", NULL, (SIGNAL_FUNC) cmd_wjoin_pre);
command_bind("join", NULL, (SIGNAL_FUNC) cmd_join);
@@ -630,6 +638,7 @@ void fe_channels_deinit(void)
signal_remove("channel destroyed", (SIGNAL_FUNC) signal_channel_destroyed);
signal_remove("window item changed", (SIGNAL_FUNC) signal_window_item_changed);
signal_remove("server disconnected", (SIGNAL_FUNC) sig_disconnected);
+ signal_remove("channel joined", (SIGNAL_FUNC) sig_channel_joined);
command_unbind("join", (SIGNAL_FUNC) cmd_wjoin_pre);
command_unbind("join", (SIGNAL_FUNC) cmd_join);