X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2Fmain.h;h=85e4fd8e48af5a8c07a4826bce37eb4aed2d6fe9;hb=a40e0df080a82db2b1150492a8952cdfe3559185;hp=4638e3c9c6591f8e679aa1b0e71d96c2799908e2;hpb=02e797baca7f15e306d70b3b7e2b4d83ff1cf44f;p=NeonServV5.git diff --git a/src/main.h b/src/main.h index 4638e3c..85e4fd8 100644 --- a/src/main.h +++ b/src/main.h @@ -1,4 +1,4 @@ -/* main.h - NeonServ v5.5 +/* main.h - NeonServ v5.6 * Copyright (C) 2011-2012 Philipp Kreil (pk910) * * This program is free software: you can redistribute it and/or modify @@ -18,11 +18,28 @@ #define _main_h #include "overall.h" +struct ProcessState { + time_t start_time; + int running : 1; + int restart : 1; + int run_as_daemon : 1; + int daemonized : 1; + int loglevel : 8; + int loaded_config : 1; + int running_threads : 8; + + int argc; + char **argv; + + char config[MAXLEN]; + char pidfile[MAXLEN]; +}; + #ifndef DND_FUNCTIONS -extern time_t start_time; -extern int statistics_enabled; + +extern struct ProcessState process_state; + #ifdef HAVE_THREADS -extern int running_threads; extern pthread_mutex_t cache_sync; extern pthread_mutex_t whohandler_sync, whohandler_mass_sync; @@ -32,19 +49,10 @@ extern pthread_mutex_t whohandler_sync, whohandler_mass_sync; /* MODULAR ACCESSIBLE */ time_t getStartTime(); /* MODULAR ACCESSIBLE */ int getRunningThreads(); -void exit_daemon(); - -/* MODULAR ACCESSIBLE */ int stricmp (const char *s1, const char *s2); -/* MODULAR ACCESSIBLE */ int stricmplen (const char *s1, const char *s2, int len); - -/* MODULAR ACCESSIBLE */ void restart_process(); -/* MODULAR ACCESSIBLE */ void cleanup(); -/* MODULAR ACCESSIBLE */ void restart_bot(int do_hard_restart); +/* MODULAR ACCESSIBLE */ void restart_bot(int crash); /* MODULAR ACCESSIBLE */ void stop_bot(); /* MODULAR ACCESSIBLE */ void reload_config(); -int statistics_update(); - /* MODULAR ACCESSIBLE */ void putlog(int loglevel, const char *text, ...) PRINTF_LIKE(2, 3); #endif #endif \ No newline at end of file