mirror of
https://github.com/EnergyMech/energymech.git
synced 2025-12-29 16:14:43 +00:00
Init uptime reporting framework before reading configfile. Fixes segfault when creating user file.
This commit is contained in:
@@ -977,6 +977,10 @@ int main(int argc, char **argv, char **envp)
|
|||||||
LocalBot.x.x.aop = 1;
|
LocalBot.x.x.aop = 1;
|
||||||
LocalBot.chan = CoreUser.chan = (Strp*)&CMA;
|
LocalBot.chan = CoreUser.chan = (Strp*)&CMA;
|
||||||
|
|
||||||
|
#ifdef UPTIME
|
||||||
|
init_uptime();
|
||||||
|
#endif /* UPTIME */
|
||||||
|
|
||||||
readcfgfile();
|
readcfgfile();
|
||||||
|
|
||||||
#ifndef I_HAVE_A_LEGITIMATE_NEED_FOR_MORE_THAN_4_BOTS
|
#ifndef I_HAVE_A_LEGITIMATE_NEED_FOR_MORE_THAN_4_BOTS
|
||||||
@@ -1036,10 +1040,6 @@ int main(int argc, char **argv, char **envp)
|
|||||||
memset(&ctcp_slot,0,sizeof(ctcp_slot));
|
memset(&ctcp_slot,0,sizeof(ctcp_slot));
|
||||||
#endif /* CTCP */
|
#endif /* CTCP */
|
||||||
|
|
||||||
#ifdef UPTIME
|
|
||||||
init_uptime();
|
|
||||||
#endif /* UPTIME */
|
|
||||||
|
|
||||||
#ifdef BOTNET
|
#ifdef BOTNET
|
||||||
last_autolink = now + 30 + (rand() >> 27); /* + 0-31 seconds */
|
last_autolink = now + 30 + (rand() >> 27); /* + 0-31 seconds */
|
||||||
#endif /* BOTNET */
|
#endif /* BOTNET */
|
||||||
|
|||||||
Reference in New Issue
Block a user