-/* main.c - NeonServ v5.3
+/* main.c - NeonServ v5.4
* Copyright (C) 2011-2012 Philipp Kreil (pk910)
*
* This program is free software: you can redistribute it and/or modify
#include "ModeNode.h"
#include "IRCQueue.h"
#include "DBHelper.h"
-#include "commands.h"
#include "ConfigParser.h"
#include "ssl.h"
#include "QServer.h"
#include "version.h"
+#include "modules.h"
+#include "module_commands.h"
time_t start_time;
static int running, hard_restart;
break;
}
}
+ #ifndef WIN32
if(geteuid() == 0 || getuid() == 0) {
fprintf(stderr, "NeonServ may not be run with super user privileges.\n");
exit(0);
}
+ #endif
+ #ifdef ENABLE_MEMORY_DEBUG
+ initMemoryDebug();
+ #endif
if(!loadConfig(CONF_FILE)) {
fprintf(stderr, "Unable to load " CONF_FILE "\n");
exit(0);
signal(SIGSEGV, sighandler);
signal(SIGTERM, sighandler);
- #ifdef ENABLE_MEMORY_DEBUG
- initMemoryDebug();
- #endif
-
start_time = time(0);
#ifdef WIN32
init_ModeNode();
init_bind();
init_modcmd();
+ register_module_commands();
init_handleinfohandler();
init_tools();
-
+ loadModules();
init_bots();
init_DBHelper();
qserver_init();
if ((row = mysql_fetch_row(res)) != NULL) {
lastcheck = atoi(row[1]);
if(!lastcheck || unixtime - lastcheck >= min_unckecked) {
- lookup_authname(row[0], main_checkauths_callback, NULL);
+ lookup_authname(row[0], 0, main_checkauths_callback, NULL);
} else
next_call = 300;
}