added some code & compiler information to cmd_netinfo
[NeonServV5.git] / main.h
diff --git a/main.h b/main.h
index f3567691bd90f81b6a7e07be75e064f0a0f4fbdc..71b98db1beb5f2795212420e43155b649dc91461 100644 (file)
--- 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 <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <arpa/inet.h>
 #include <unistd.h>
 #include <netdb.h>
+#include <stdarg.h>
+#include <time.h>
+
+#if __GNUC__
+#define PRINTF_LIKE(M,N) __attribute__((format (printf, M, N)))
+#else
+#define PRINTF_LIKE(M,N)
+#endif
+
+#if __GNUC__ >= 2
+#define UNUSED_ARG(ARG) ARG __attribute__((unused))
+#elif defined(S_SPLINT_S)
+#define UNUSED_ARG(ARG) /*@unused@*/ ARG
+#define const /*@observer@*/ /*@temp@*/
+#else
+#define UNUSED_ARG(ARG) ARG
+#endif
 
+#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{|}~[\\]^_`"
 #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