X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2Fmain.c;h=5ab1efd0bd5f93ccce05657783bcdda7f8722484;hb=4812835346f724fcea86e78f741cc6c72c86b676;hp=22ced25ddeb0a5097a5edeb9d8485d49e73e1cc0;hpb=c99b8d5951fe6429844c8cb5ff94213bb625ad95;p=NeonServV5.git diff --git a/src/main.c b/src/main.c index 22ced25..5ab1efd 100644 --- a/src/main.c +++ b/src/main.c @@ -1,4 +1,4 @@ -/* main.c - NeonServ v5.5 +/* main.c - NeonServ v5.6 * Copyright (C) 2011-2012 Philipp Kreil (pk910) * * This program is free software: you can redistribute it and/or modify @@ -35,12 +35,12 @@ #include "IRCQueue.h" #include "DBHelper.h" #include "ConfigParser.h" -#include "ssl.h" #include "QServer.h" #include "version.h" #include "modules.h" #include "module_commands.h" #include "ModuleFunctions.h" +#include "IOHandler.h" time_t start_time; static int running, hard_restart; @@ -116,7 +116,6 @@ static TIMEQ_CALLBACK(clear_cache) { } void *thread_main(void *arg) { - time_t socket_wait; while(running) { iohandler_poll(); } @@ -203,6 +202,8 @@ int main(int argc, char *argv[]) { fprintf(stderr, "Unable to load " CONF_FILE "\n"); exit(0); } + init_bind(); + event_reload(1); #if HAVE_THREADS THREAD_MUTEX_INIT(log_sync); #endif @@ -300,7 +301,7 @@ main: pthread_create(¤t_threads[tid_id], NULL, thread_main, NULL); } #endif - thread_main(); + thread_main(NULL); #ifdef HAVE_THREADS for(tid_id = 0; tid_id < worker_threads; tid_id++) { pthread_join(current_threads[tid_id], NULL); @@ -367,6 +368,7 @@ void stop_bot() { void reload_config() { loadConfig(CONF_FILE); + event_reload(0); } static int getCurrentSecondsOfDay() {