projects
/
NeonServV5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
moving NeonServ into background by default; added a few startup parameters
[NeonServV5.git]
/
src
/
main.h
diff --git
a/src/main.h
b/src/main.h
index b8d260b8ec68be3582645f48b5447b7757f33095..12c689958eb768c0c88c89fd185872a57d4950cf 100644
(file)
--- a/
src/main.h
+++ b/
src/main.h
@@
-105,6
+105,10
@@
#include "memoryDebug.h"
#endif
#include "memoryDebug.h"
#endif
+#define PID_FILE "neonserv.pid"
+#define CONF_FILE "neonserv.conf"
+#define LOG_FILE "neonserv.log"
+
#define SOCKET_SELECT_TIME 1
#define SOCKET_RECONNECT_TIME 20
#define SOCKET_SELECT_TIME 1
#define SOCKET_RECONNECT_TIME 20
@@
-116,6
+120,7
@@
#define TOPICLEN 500
#define CHANNELLEN 200
#define MAXLEN 512
#define TOPICLEN 500
#define CHANNELLEN 200
#define MAXLEN 512
+#define MAXLOGLEN 1024
#define TRIGGERLEN 50
#define MAXNUMPARAMS 200 /* maximum number of parameters in one line */
#define MAXLANGUAGES 5
#define TRIGGERLEN 50
#define MAXNUMPARAMS 200 /* maximum number of parameters in one line */
#define MAXLANGUAGES 5
@@
-136,6
+141,11
@@
#define TEMPUSER_LIST_INDEX VALID_NICK_CHARS_FIRST_LEN
#define TEMPUSER_LIST_INDEX VALID_NICK_CHARS_FIRST_LEN
+#define LOGLEVEL_INFO 0x01
+#define LOGLEVEL_ERROR 0x02
+#define LOGLEVEL_RAW 0x04
+#define LOGLEVEL_MYSQL 0x08
+
#define timeval_is_bigger(x,y) ((x.tv_sec > y.tv_sec) || (x.tv_sec == y.tv_sec && x.tv_usec > y.tv_usec))
extern time_t start_time;
#define timeval_is_bigger(x,y) ((x.tv_sec > y.tv_sec) || (x.tv_sec == y.tv_sec && x.tv_usec > y.tv_usec))
extern time_t start_time;
@@
-148,6
+158,8
@@
extern pthread_mutex_t whohandler_sync, whohandler_mass_sync;
int getCurrentThreadID();
#endif
int getCurrentThreadID();
#endif
+void exit_daemon();
+
int stricmp (const char *s1, const char *s2);
int stricmplen (const char *s1, const char *s2, int len);
int stricmp (const char *s1, const char *s2);
int stricmplen (const char *s1, const char *s2, int len);
@@
-159,4
+171,8
@@
void reload_config();
void statistics_update();
void statistics_update();
+void putlog(int loglevel, const char *text, ...) PRINTF_LIKE(2, 3);
+
+#define perror(errmsg) (putlog(LOGLEVEL_ERROR, "ERROR (%s:%d) %s", __FILE__, __LINE__, errmsg))
+
#endif
\ No newline at end of file
#endif
\ No newline at end of file