summaryrefslogtreecommitdiff
path: root/src/irc/core/netsplit.h
blob: ae5a9aa39efa0c37fbbb99c1a9142c8568745c00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef __NETSPLIT_H
#define __NETSPLIT_H

#include "nicklist.h"

typedef struct {
	char *server;
	char *destserver;
	int count;
        int prints; /* temp variable */

	time_t last; /* last time we received a QUIT msg here */
} NETSPLIT_SERVER_REC;

typedef struct {
	NETSPLIT_SERVER_REC *server;

	char *nick;
	char *address;
	GSList *channels;

	unsigned int printed:1;
	time_t destroy;
} NETSPLIT_REC;

typedef struct {
	char *name;
	NICK_REC nick;
} NETSPLIT_CHAN_REC;

void netsplit_init(void);
void netsplit_deinit(void);

NETSPLIT_REC *netsplit_find(IRC_SERVER_REC *server, const char *nick, const char *address);
NICK_REC *netsplit_find_channel(IRC_SERVER_REC *server, const char *nick, const char *address, const char *channel);

int quitmsg_is_split(const char *msg);

#endif