X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=main.h;h=c154da3014f4f9661a9ea4419c7d8101c803f3ce;hb=84fb65ee885f3f747b0a07eb07999395c0ae22f9;hp=feab5a1649e0b5a1754e1ec017a9a1af878fe6da;hpb=6fa73a6250ed284c16f2b775e46c350a0556c182;p=NeonServV5.git diff --git a/main.h b/main.h index feab5a1..c154da3 100644 --- a/main.h +++ b/main.h @@ -1,6 +1,8 @@ #ifndef _main_h #define _main_h +#include "config.h" + #include #include #include @@ -11,6 +13,8 @@ #include #include #include +#include +#include #if __GNUC__ #define PRINTF_LIKE(M,N) __attribute__((format (printf, M, N))) @@ -27,27 +31,18 @@ #define UNUSED_ARG(ARG) ARG #endif -int stricmp (const char *s1, const char *s2) -{ - if (s1 == NULL) return s2 == NULL ? 0 : -(*s2); - if (s2 == NULL) return *s1; - char c1, c2; - while ((c1 = tolower (*s1)) == (c2 = tolower (*s2))) - { - if (*s1 == '\0') break; - ++s1; ++s2; - } - return c1 - c2; -} - +#define SOCKET_SELECT_TIME 2 #define NICKLEN 30 #define USERLEN 10 +#define AUTHLEN 32 #define HOSTLEN 63 #define REALLEN 50 #define TOPICLEN 500 #define CHANNELLEN 200 #define MAXLEN 512 +#define TRIGGERLEN 50 +#define MAXNUMPARAMS 200 /* maximum number of parameters in one line */ //valid nick chars #define VALID_NICK_CHARS "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890{|}~[\\]^_`" @@ -57,4 +52,9 @@ int stricmp (const char *s1, const char *s2) #define VALID_NICK_CHARS_FIRST "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~[\\]^_`" #define VALID_NICK_CHARS_FIRST_LEN 62 +#define TEMPUSER_LIST_INDEX VALID_NICK_CHARS_FIRST_LEN + +int stricmp (const char *s1, const char *s2); +int stricmplen (const char *s1, const char *s2, int len); + #endif \ No newline at end of file