mirror of
https://github.com/irssi/irssi.git
synced 2026-08-17 15:42:26 +02:00
-querychans option for servers and ircnets which specifies how many
channels to query in one line with MODE/WHO commands after joined to a number of channels. Default is 10 which works usually, with some very stupid servers (just found one) this has to be set to 1 however. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@981 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
e6cc73bd4b
commit
8d98e80a6b
10 changed files with 41 additions and 12 deletions
|
|
@ -50,8 +50,6 @@ loop:
|
|||
#include "irc-servers.h"
|
||||
#include "servers-redirect.h"
|
||||
|
||||
#define MAX_QUERIES_IN_LINE 10
|
||||
|
||||
enum {
|
||||
CHANNEL_QUERY_MODE,
|
||||
CHANNEL_QUERY_WHO,
|
||||
|
|
@ -187,10 +185,10 @@ static void channel_send_query(IRC_SERVER_REC *server, int query)
|
|||
|
||||
chans = rec->queries[query];
|
||||
|
||||
if (g_slist_length(rec->queries[query]) > MAX_QUERIES_IN_LINE) {
|
||||
if (g_slist_length(rec->queries[query]) > server->max_query_chans) {
|
||||
GSList *lastchan;
|
||||
|
||||
lastchan = g_slist_nth(rec->queries[query], MAX_QUERIES_IN_LINE-1);
|
||||
lastchan = g_slist_nth(rec->queries[query], server->max_query_chans-1);
|
||||
newchans = lastchan->next;
|
||||
lastchan->next = NULL;
|
||||
}
|
||||
|
|
@ -291,7 +289,7 @@ static void channel_send_query(IRC_SERVER_REC *server, int query)
|
|||
if (!onlyone) {
|
||||
/* all channels queried, set to newchans which contains
|
||||
the rest of the channels for the same query (usually NULL
|
||||
unless query count exceeded MAX_QUERIES_IN_LINE) */
|
||||
unless query count exceeded max_query_chans) */
|
||||
g_slist_free(rec->queries[query]);
|
||||
rec->queries[query] = newchans;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue