changed Makefile; build all commands as an own file
[NeonServV5.git] / main.c
diff --git a/main.c b/main.c
index 56305fca32d8b4b7abf35a7c22c303a7211f8a09..2fcc3dbec18349f0feae58657adb0cb8422dc1d1 100644 (file)
--- a/main.c
+++ b/main.c
 #include "HandleInfoHandler.h"
 #include "lang.h"
 #include "tools.h"
+#include "timeq.h"
+#include "EventLogger.h"
+#include "ModeNode.h"
+
+time_t start_time;
 
 void cleanup() {
     free_sockets();
@@ -29,24 +34,32 @@ void cleanup() {
 
 int main(void)
 {
+    start_time = time(0);
+    
     init_mysql();
     init_lang();
     init_parser();
     init_UserNode();
     init_ChanNode();
+    init_ModeNode();
     init_bind();
        init_modcmd();
     init_handleinfohandler();
     init_tools();
     init_bots();
     
+    load_languages();
+    
     time_t socket_wait;
     while(1) {
         socket_wait = time(0) + SOCKET_SELECT_TIME;
         do {
             socket_loop(SOCKET_SELECT_TIME);
         } while(time(0) < socket_wait);
+        timeq_tick();
+        loop_bots();
         clearTempUsers();
+        destroyEvents();
     }
 }