Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
BitchX
GitHub Repository: BitchX/BitchX1.3
Path: blob/master/include/hash2.h
1069 views
1
/*
2
* hash2.h: function header file for hash.c
3
*
4
* Written by Scott H Kilau
5
*
6
* CopyRight(c) 1997
7
*
8
* See the COPYRIGHT file, or do a HELP IRCII COPYRIGHT
9
*
10
* @(#)$Id: hash2.h 52 2008-06-14 06:45:05Z keaston $
11
*/
12
13
#ifndef _HASH2_H_
14
#define _HASH2_H_
15
16
#include "struct.h"
17
#include "whowas.h"
18
#include "hash.h"
19
20
/* Generic List type hash list */
21
void BX_add_name_to_genericlist (char *, HashEntry *, unsigned int);
22
List *BX_find_name_in_genericlist (char *, HashEntry *, unsigned int, int);
23
List *BX_next_namelist(HashEntry *, List *, unsigned int);
24
25
void BX_add_nicklist_to_channellist(NickList *, ChannelList *);
26
27
void BX_add_whowas_userhost_channel (WhowasList *, WhowasWrapList *);
28
29
WhowasList *BX_find_userhost_channel (char *, char *, int, WhowasWrapList *);
30
31
int BX_remove_oldest_whowas_hashlist (WhowasWrapList *, time_t, int);
32
33
WhowasList *BX_next_userhost(WhowasWrapList *, WhowasList *);
34
35
NickList *BX_find_nicklist_in_channellist(char *, ChannelList *, int);
36
NickList *BX_next_nicklist(ChannelList *, NickList *);
37
38
void clear_nicklist_hashtable(ChannelList *);
39
void show_nicklist_hashtable(ChannelList *);
40
41
void show_whowas_hashtable(WhowasWrapList *cptr, char *);
42
int show_wholeft_hashtable(WhowasWrapList *cptr, time_t ltime, int *total, int *hook, char *);
43
44
/* Determines if the Nick matches the nick!user@host mask given. */
45
int nick_match(NickList *nick, char *mask);
46
47
/* Added to sort a hash'd nicklist and them remove the sorted list */
48
NickList *BX_sorted_nicklist(ChannelList *, int);
49
void BX_clear_sorted_nicklist(NickList **);
50
51
/* Warning: These numeric values can be taken directly from scripts via
52
* the $channel() function - so BEWARE if you change them! */
53
#define NICKSORT_NORMAL 0
54
#define NICKSORT_NONE 1
55
#define NICKSORT_NICK 2
56
#define NICKSORT_HOST 3
57
#define NICKSORT_TIME 4
58
#define NICKSORT_IP 5
59
#define NICKSORT_STAT 6
60
61
Flooding *BX_find_name_in_floodlist(char *, char *, HashEntry *, unsigned int, int);
62
Flooding *BX_add_name_to_floodlist(char *, char *, char *, HashEntry *, unsigned int);
63
64
unsigned long hash_nickname(char *, unsigned int);
65
66
67
#endif
68
69