From cc5e5b9f88c9552dad3bc348ed5c525bc8f8af7b Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 10 Mar 2004 19:36:01 +0000 Subject: [PATCH] If channel has more nicks than /SET channel_max_who_sync, don't ask /WHO list to avoid getting kicked out of server (Max SendQ exceeded). git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3229 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/irc/core/channels-query.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/irc/core/channels-query.c b/src/irc/core/channels-query.c index 6d54ddd9..0274a71a 100644 --- a/src/irc/core/channels-query.c +++ b/src/irc/core/channels-query.c @@ -364,7 +364,9 @@ static void sig_channel_joined(IRC_CHANNEL_REC *channel) /* Add channel to query lists */ if (!channel->no_modes) query_add_channel(channel, CHANNEL_QUERY_MODE); - query_add_channel(channel, CHANNEL_QUERY_WHO); + if (g_hash_table_size(channel->nicks) < + settings_get_int("channel_max_who_sync")) + query_add_channel(channel, CHANNEL_QUERY_WHO); if (!channel->no_modes) query_add_channel(channel, CHANNEL_QUERY_BMODE); @@ -481,6 +483,7 @@ static void event_end_of_banlist(IRC_SERVER_REC *server, const char *data) void channels_query_init(void) { settings_add_bool("misc", "channel_sync", TRUE); + settings_add_int("misc", "channel_max_who_sync", 1000); signal_add("server connected", (SIGNAL_FUNC) sig_connected); signal_add("server disconnected", (SIGNAL_FUNC) sig_disconnected);