1 /* main.h - NeonServ v5.2
2 * Copyright (C) 2011 Philipp Kreil (pk910)
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #include "../config.h"
21 #define NEONSERV_VERSION "5.2"
22 #define VERSION_PATCHLEVEL 414
24 #ifndef BOTWAR_ALERT_CHAN
25 #define BOTWAR_ALERT_CHAN NULL
36 #include <sys/types.h>
37 #include <sys/socket.h>
38 #include <netinet/in.h>
39 #include <netinet/tcp.h>
40 #include <arpa/inet.h>
50 #define PRINTF_LIKE(M,N) __attribute__((format (printf, M, N)))
52 #define PRINTF_LIKE(M,N)
56 #define UNUSED_ARG(ARG) ARG __attribute__((unused))
57 #elif defined(S_SPLINT_S)
58 #define UNUSED_ARG(ARG) /*@unused@*/ ARG
59 #define const /*@observer@*/ /*@temp@*/
61 #define UNUSED_ARG(ARG) ARG
64 #define STRINGIFY_(x) #x
65 #define STRINGIFY(x) STRINGIFY_(x)
68 #if defined(__GNUC_PATCHLEVEL__)
69 #define COMPILER "GCC" " " STRINGIFY(__GNUC__) "." STRINGIFY(__GNUC_MINOR__) "." STRINGIFY(__GNUC_PATCHLEVEL__)
71 #define COMPILER "GCC" " " STRINGIFY(__GNUC__) "." STRINGIFY(__GNUC_MINOR__)
73 #elif defined (__IMAGECRAFT__)
74 #define COMPILER "ICCAVR"
76 #define COMPILER "Unknown"
79 #define SOCKET_SELECT_TIME 1
80 #define SOCKET_RECONNECT_TIME 20
88 #define CHANNELLEN 200
91 #define MAXNUMPARAMS 200 /* maximum number of parameters in one line */
92 #define MAXLANGUAGES 5
94 #define INVITE_TIMEOUT 30
95 #define BOTWAR_DETECTION_TIME 7
96 #define BOTWAR_DETECTION_EVENTS 6
97 #define REWHO_TIMEOUT 10 /* wait 10 seconds before WHO an unauthed user again */
100 #define VALID_NICK_CHARS "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890{|}~[\\]^-_`"
101 //the first char is a little bit different
103 // 1234567890123456789012345678901234567890123456789012345678 9012 62
104 #define VALID_NICK_CHARS_FIRST "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~[\\]^_`"
105 #define VALID_NICK_CHARS_FIRST_LEN 62
107 #define TEMPUSER_LIST_INDEX VALID_NICK_CHARS_FIRST_LEN
109 extern time_t start_time;
110 extern int statistics_enabled;
112 int stricmp (const char *s1, const char *s2);
113 int stricmplen (const char *s1, const char *s2, int len);
115 void restart_bot(int do_hard_restart);
117 void reload_config();
119 void statistics_update();