This commit was generated by cvs2svn to compensate for changes in r2,
[ircu2.10.12-pk.git] / include / s_misc.h
1 #ifndef S_MISC_H
2 #define S_MISC_H
3
4 /*=============================================================================
5  * General defines
6  */
7
8 /*-----------------------------------------------------------------------------
9  * Macro's
10  */
11
12 #define CPTR_KILLED     -2
13
14 /*=============================================================================
15  * Structures
16  */
17
18 struct stats {
19   unsigned int is_cl;           /* number of client connections */
20   unsigned int is_sv;           /* number of server connections */
21   unsigned int is_ni;           /* connection but no idea who it was */
22   unsigned short int is_cbs;    /* bytes sent to clients */
23   unsigned short int is_cbr;    /* bytes received to clients */
24   unsigned short int is_sbs;    /* bytes sent to servers */
25   unsigned short int is_sbr;    /* bytes received to servers */
26   unsigned int is_cks;          /* k-bytes sent to clients */
27   unsigned int is_ckr;          /* k-bytes received to clients */
28   unsigned int is_sks;          /* k-bytes sent to servers */
29   unsigned int is_skr;          /* k-bytes received to servers */
30   time_t is_cti;                /* time spent connected by clients */
31   time_t is_sti;                /* time spent connected by servers */
32   unsigned int is_ac;           /* connections accepted */
33   unsigned int is_ref;          /* accepts refused */
34   unsigned int is_unco;         /* unknown commands */
35   unsigned int is_wrdi;         /* command going in wrong direction */
36   unsigned int is_unpf;         /* unknown prefix */
37   unsigned int is_empt;         /* empty message */
38   unsigned int is_num;          /* numeric message */
39   unsigned int is_kill;         /* number of kills generated on collisions */
40   unsigned int is_fake;         /* MODE 'fakes' */
41   unsigned int is_asuc;         /* successful auth requests */
42   unsigned int is_abad;         /* bad auth requests */
43   unsigned int is_udp;          /* packets recv'd on udp port */
44   unsigned int is_loc;          /* local connections made */
45 };
46
47 /*=============================================================================
48  * Proto types
49  */
50
51 extern int check_registered(aClient *sptr);
52 extern int check_registered_user(aClient *sptr);
53 extern int exit_client(aClient *cptr, aClient *bcptr,
54     aClient *sptr, char *comment);
55 extern char *myctime(time_t value);
56 extern char *get_client_name(aClient *sptr, int showip);
57 extern int exit_client_msg(aClient *cptr, aClient *bcptr,
58     aClient *sptr, char *pattern, ...) __attribute__ ((format(printf, 4, 5)));
59 extern void initstats(void);
60 extern char *date(time_t clock);
61 extern char *get_client_host(aClient *cptr);
62 extern void get_sockhost(aClient *cptr, char *host);
63 extern char *my_name_for_link(char *name, aConfItem *aconf);
64 extern int vexit_client_msg(aClient *cptr, aClient *bcptr,
65     aClient *sptr, char *pattern, va_list vl);
66 extern void checklist(void);
67 extern void tstats(aClient *cptr, char *name);
68
69 extern struct stats *ircstp;
70
71 #endif /* S_MISC_H */