projects
/
NeonServV5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
changed Makefile; build all commands as an own file
[NeonServV5.git]
/
main.c
diff --git
a/main.c
b/main.c
index 1dd49500f38975fd51173d1dd2224977a6f56c53..2fcc3dbec18349f0feae58657adb0cb8422dc1d1 100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-8,6
+8,15
@@
#include "modcmd.h"
#include "WHOHandler.h"
#include "bots.h"
#include "modcmd.h"
#include "WHOHandler.h"
#include "bots.h"
+#include "mysqlConn.h"
+#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();
void cleanup() {
free_sockets();
@@
-18,24
+27,39
@@
void cleanup() {
free_modcmd();
free_whoqueue();
free_bots();
free_modcmd();
free_whoqueue();
free_bots();
+ free_mysql();
+ free_handleinfohandler();
+ free_lang();
}
int main(void)
{
}
int main(void)
{
+ start_time = time(0);
+
+ init_mysql();
+ init_lang();
init_parser();
init_UserNode();
init_ChanNode();
init_parser();
init_UserNode();
init_ChanNode();
+ init_ModeNode();
init_bind();
init_modcmd();
init_bind();
init_modcmd();
+ init_handleinfohandler();
+ init_tools();
init_bots();
init_bots();
+ load_languages();
+
time_t socket_wait;
while(1) {
socket_wait = time(0) + SOCKET_SELECT_TIME;
do {
socket_loop(SOCKET_SELECT_TIME);
time_t socket_wait;
while(1) {
socket_wait = time(0) + SOCKET_SELECT_TIME;
do {
socket_loop(SOCKET_SELECT_TIME);
- } while(time(0) > socket_wait);
+ } while(time(0) < socket_wait);
+ timeq_tick();
+ loop_bots();
clearTempUsers();
clearTempUsers();
+ destroyEvents();
}
}
}
}