Track the account queries which are in progress

This commit is contained in:
Ailin Nemui 2021-01-28 21:32:52 +01:00
commit 04035ab7ca
6 changed files with 48 additions and 23 deletions

View file

@ -11,6 +11,16 @@
#define IS_IRC_CHANNEL(channel) \
(IRC_CHANNEL(channel) ? TRUE : FALSE)
enum {
CHANNEL_QUERY_MODE,
CHANNEL_QUERY_WHO,
CHANNEL_QUERY_BMODE,
CHANNEL_QUERIES
};
#define CHANNEL_IS_MODE_QUERY(a) ((a) != CHANNEL_QUERY_WHO)
#define STRUCT_SERVER_REC IRC_SERVER_REC
struct _IRC_CHANNEL_REC {
#include <irssi/src/core/channel-rec.h>
@ -22,6 +32,14 @@ struct _IRC_CHANNEL_REC {
int last_massjoins; /* Massjoins when last checked in timeout function */
};
typedef struct _SERVER_QUERY_REC {
int current_query_type; /* query type that is currently being asked */
GSList *current_queries; /* All channels that are currently being queried */
GSList *queries[CHANNEL_QUERIES]; /* All queries that need to be asked from server */
GHashTable *accountqueries; /* Per-nick account queries */
} SERVER_QUERY_REC;
void irc_channels_init(void);
void irc_channels_deinit(void);