projects
/
NeonServV5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed crash caused by startup reload event
[NeonServV5.git]
/
src
/
main.c
diff --git
a/src/main.c
b/src/main.c
index f3afaaf8a18c97a9bfd50a452eac5c2bd2a9feb5..17b8258c5110fd17760cce6313f4d5a2154d11d8 100644
(file)
--- a/
src/main.c
+++ b/
src/main.c
@@
-1,4
+1,4
@@
-/* main.c - NeonServ v5.
4
+/* main.c - NeonServ v5.
5
* Copyright (C) 2011-2012 Philipp Kreil (pk910)
*
* This program is free software: you can redistribute it and/or modify
* Copyright (C) 2011-2012 Philipp Kreil (pk910)
*
* This program is free software: you can redistribute it and/or modify
@@
-40,6
+40,7
@@
#include "version.h"
#include "modules.h"
#include "module_commands.h"
#include "version.h"
#include "modules.h"
#include "module_commands.h"
+#include "ModuleFunctions.h"
time_t start_time;
static int running, hard_restart;
time_t start_time;
static int running, hard_restart;
@@
-208,6
+209,8
@@
int main(int argc, char *argv[]) {
fprintf(stderr, "Unable to load " CONF_FILE "\n");
exit(0);
}
fprintf(stderr, "Unable to load " CONF_FILE "\n");
exit(0);
}
+ init_bind();
+ event_reload(1);
#if HAVE_THREADS
THREAD_MUTEX_INIT(log_sync);
#endif
#if HAVE_THREADS
THREAD_MUTEX_INIT(log_sync);
#endif
@@
-295,6
+298,7
@@
main:
register_module_commands();
init_handleinfohandler();
init_tools();
register_module_commands();
init_handleinfohandler();
init_tools();
+ init_modulefunctions();
loadModules();
init_bots();
init_DBHelper();
loadModules();
init_bots();
init_DBHelper();
@@
-410,6
+414,7
@@
void stop_bot() {
void reload_config() {
loadConfig(CONF_FILE);
void reload_config() {
loadConfig(CONF_FILE);
+ event_reload(0);
}
static int getCurrentSecondsOfDay() {
}
static int getCurrentSecondsOfDay() {