Init uptime reporting framework before reading configfile. Fixes segfault when creating user file.

This commit is contained in:
MadCamel
2018-03-13 18:39:13 -04:00
parent 78c4e2f47a
commit 5f5f5ab996

View File

@@ -977,6 +977,10 @@ int main(int argc, char **argv, char **envp)
LocalBot.x.x.aop = 1;
LocalBot.chan = CoreUser.chan = (Strp*)&CMA;
#ifdef UPTIME
init_uptime();
#endif /* UPTIME */
readcfgfile();
#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));
#endif /* CTCP */
#ifdef UPTIME
init_uptime();
#endif /* UPTIME */
#ifdef BOTNET
last_autolink = now + 30 + (rand() >> 27); /* + 0-31 seconds */
#endif /* BOTNET */