X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2Fmain.c;h=fbf9ed5806f4b93d9cb0c292c1a07feb4ff32794;hb=0def65a9df6d9a295c064cba58af229b326f39fe;hp=74fd93c0261b95c2d029fc95a75b0075fcaa55d5;hpb=902ebfe5551be2daa3edf8141bcee91f62c0a5e0;p=NeonServV5.git diff --git a/src/main.c b/src/main.c index 74fd93c..fbf9ed5 100644 --- a/src/main.c +++ b/src/main.c @@ -39,6 +39,7 @@ #include "QServer.h" #include "version.h" #include "modules.h" +#include "module_commands.h" time_t start_time; static int running, hard_restart; @@ -191,10 +192,15 @@ int main(int argc, char *argv[]) { 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); @@ -243,10 +249,6 @@ main: signal(SIGSEGV, sighandler); signal(SIGTERM, sighandler); - #ifdef ENABLE_MEMORY_DEBUG - initMemoryDebug(); - #endif - start_time = time(0); #ifdef WIN32 @@ -280,6 +282,7 @@ main: init_ModeNode(); init_bind(); init_modcmd(); + register_module_commands(); init_handleinfohandler(); init_tools(); loadModules();