X-Git-Url: http://git.pk910.de/?p=NeonServV5.git;a=blobdiff_plain;f=main.h;h=71b98db1beb5f2795212420e43155b649dc91461;hp=b356c77c0a457e1104a4de0f9f5c3af85a5abbe5;hb=bbf107bf1238e0dd767fb25748ae347b9f0f6a85;hpb=768cf97b4d4c189686048c15ee3f7985673481b1 diff --git a/main.h b/main.h index b356c77..71b98db 100644 --- a/main.h +++ b/main.h @@ -1,6 +1,10 @@ #ifndef _main_h #define _main_h +#define NEONSERV_VERSION "5.0.1-dev" + +#include "config.h" + #include #include #include @@ -12,6 +16,7 @@ #include #include #include +#include #if __GNUC__ #define PRINTF_LIKE(M,N) __attribute__((format (printf, M, N))) @@ -28,27 +33,35 @@ #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 STRINGIFY_(x) #x +#define STRINGIFY(x) STRINGIFY_(x) + +#if defined(__GNUC__) +#if defined(__GNUC_PATCHLEVEL__) +#define COMPILER "GCC" " " STRINGIFY(__GNUC__) "." STRINGIFY(__GNUC_MINOR__) "." STRINGIFY(__GNUC_PATCHLEVEL__) +#else +#define COMPILER "GCC" " " STRINGIFY(__GNUC__) "." STRINGIFY(__GNUC_MINOR__) +#endif +#elif defined (__IMAGECRAFT__) +#define COMPILER "ICCAVR" +#else +#define COMPILER "Unknown" +#endif +#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 */ +#define MAXLANGUAGES 5 +#define MAXMODES 6 //valid nick chars #define VALID_NICK_CHARS "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890{|}~[\\]^_`" @@ -58,4 +71,11 @@ 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 + +extern time_t start_time; + +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