File: whowas.h

package info (click to toggle)
ircii-pana 1%3A1.1-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 14,048 kB
  • ctags: 14,567
  • sloc: ansic: 130,654; sql: 6,041; makefile: 4,313; cpp: 1,270; tcl: 1,230; sh: 638; java: 151
file content (63 lines) | stat: -rw-r--r-- 1,830 bytes parent folder | download | duplicates (3)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63

#ifndef _WhoWas_h
#define _WhoWas_h

#define whowas_userlist_max 300
#define whowas_reg_max 500
#define whowas_chan_max 20
#include "hash.h"

typedef struct _whowaschan_str {
	struct _whowaschan_str *next;
	char *channel;
	int refnum;
	ChannelList *channellist;
	time_t time;
} WhowasChanList;

typedef struct _whowaswrapchan_str {
	HashEntry NickListTable[WHOWASLIST_HASHSIZE];
} WhowasWrapChanList;

typedef struct _whowas_str {
	struct _whowas_str *next;
	int	has_ops; 	/* true is user split away with opz */
	char 	*channel;	/* name of channel */
	time_t 	time;		/* time of split/leave */
	char	*server1;
	char	*server2;
	NickList *nicklist;	/* pointer to nicklist */
	ShitList *shitlist;	/* pointer to shitlist */
	ChannelList *channellist;		
} WhowasList;

typedef struct _whowas_wrap_str {
	unsigned long total_hits;
	unsigned long total_links;
	unsigned long total_unlinks;
	HashEntry NickListTable[WHOWASLIST_HASHSIZE];
} WhowasWrapList;

WhowasList *check_whowas_buffer (char *, char *, char *, int);
WhowasList *check_whowas_nick_buffer (char *, char *, int);
WhowasList *check_whosplitin_buffer (char *, char *, char *, int);

void add_to_whowas_buffer (NickList *, char *, char *, char *);
void add_to_whosplitin_buffer (NickList *, char *, char *, char *);

int remove_oldest_whowas (WhowasWrapList *, time_t, int);
void clean_whowas_list (void);
void sync_whowas_adduser (UserList *);
void sync_whowas_unuser (UserList *);
void sync_whowas_addshit (ShitList *);
void sync_whowas_unshit (ShitList *);

WhowasChanList *check_whowas_chan_buffer (char *, int, int);
void add_to_whowas_chan_buffer (ChannelList *);
int remove_oldest_chan_whowas (WhowasChanList **, time_t, int);
void clean_whowas_chan_list (void);
void show_whowas (void);
void show_wholeft (char *);

extern WhowasWrapList whowas_splitin_list;
#endif