wrote modcmd bind system
[NeonServV5.git] / main.h
1 #ifndef _main_h
2 #define _main_h
3
4 #include <stdio.h>
5 #include <stdlib.h>
6 #include <string.h>
7 #include <ctype.h>
8 #include <sys/types.h>
9 #include <sys/socket.h>
10 #include <netinet/in.h>
11 #include <arpa/inet.h>
12 #include <unistd.h>
13 #include <netdb.h>
14 #include <stdarg.h>
15 #include <time.h>
16
17 #if __GNUC__
18 #define PRINTF_LIKE(M,N) __attribute__((format (printf, M, N)))
19 #else
20 #define PRINTF_LIKE(M,N)
21 #endif
22
23 #if __GNUC__ >= 2
24 #define UNUSED_ARG(ARG) ARG __attribute__((unused))
25 #elif defined(S_SPLINT_S)
26 #define UNUSED_ARG(ARG) /*@unused@*/ ARG
27 #define const /*@observer@*/ /*@temp@*/
28 #else
29 #define UNUSED_ARG(ARG) ARG
30 #endif
31
32 #define SOCKET_SELECT_TIME 2
33
34 #define NICKLEN         30
35 #define USERLEN         10
36 #define AUTHLEN         32
37 #define HOSTLEN         63
38 #define REALLEN         50
39 #define TOPICLEN        500
40 #define CHANNELLEN      200
41 #define MAXLEN          512
42 #define TRIGGERLEN      50
43
44 //valid nick chars
45 #define VALID_NICK_CHARS "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890{|}~[\\]^_`"
46 //the first char is a little bit different
47 //                              0        1         2         3         4         5          6
48 //                              1234567890123456789012345678901234567890123456789012345678 9012   62
49 #define VALID_NICK_CHARS_FIRST "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~[\\]^_`"
50 #define VALID_NICK_CHARS_FIRST_LEN 62
51
52 #define TEMPUSER_LIST_INDEX VALID_NICK_CHARS_FIRST_LEN
53
54 int stricmp (const char *s1, const char *s2);
55 int stricmplen (const char *s1, const char *s2, int len);
56
57 #endif