File: list.h

package info (click to toggle)
ircd 2.10.02-1
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 2,228 kB
  • ctags: 2,087
  • sloc: ansic: 29,122; makefile: 664; sh: 307; perl: 18
file content (76 lines) | stat: -rw-r--r-- 1,952 bytes parent folder | download
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
64
65
66
67
68
69
70
71
72
73
74
75
76
#ifndef LIST_H
#define LIST_H

/*=============================================================================
 * General defines
 */

/*=============================================================================
 * Macro's
 */

/* ============================================================================
 * Structures
 */

typedef struct SLink {
  struct SLink *next;
  union
  {
    aClient *cptr;
    struct Channel *chptr;
    struct ConfItem *aconf;
    char *cp;
    struct
    {
      char *banstr;
      char *who;
      time_t when;
    }
    ban;
  }
  value;
  int flags;
} Link;

typedef struct DSlink {
  struct DSlink *next;
  struct DSlink *prev;
  union
  {
    aClient *cptr;
    struct Channel *chptr;
    struct ConfItem *aconf;
    char *cp;
  }
  value;
} Dlink;

/*=============================================================================
 * Proto types
 */

extern void free_link(Link *lp);
extern Link *make_link(void);
extern Link *find_user_link(Link *lp, aClient *ptr);
extern void initlists(void);
extern void outofmemory(void);
extern aClient *make_client(aClient *from);
extern void free_client(aClient *cptr);
extern struct User *make_user(aClient *cptr);
extern struct Server *make_server(aClient *cptr);
extern void free_user(struct User *user, aClient *cptr);
extern void remove_client_from_list(aClient *cptr);
extern void add_client_to_list(aClient *cptr);
extern Dlink *add_dlink(Dlink **lpp, aClient *cp);
extern void remove_dlink(Dlink **lpp, Dlink *lp);
extern struct ConfItem *make_conf(void);
extern void delist_conf(struct ConfItem *aconf);
extern void free_conf(struct ConfItem *aconf);
extern aGline *make_gline(int is_ipmask, char *host, char *reason, char *name,
                          time_t expire);
extern aGline *find_gline(aClient *cptr, aGline **pgline);
extern void free_gline(aGline *agline, aGline *pgline);
extern void send_listinfo(aClient *cptr, char *name);

#endif /* LIST_H */