diff options
-rw-r--r-- | src/core/db_plain.cpp | 6 | ||||
-rw-r--r-- | src/init.c | 8 |
2 files changed, 4 insertions, 10 deletions
diff --git a/src/core/db_plain.cpp b/src/core/db_plain.cpp index 7daa40d7c..c4f067098 100644 --- a/src/core/db_plain.cpp +++ b/src/core/db_plain.cpp @@ -433,9 +433,9 @@ static void LoadBotInfo(const std::vector<std::string> ¶ms) bi = new BotInfo(params[0]); bi->user = sstrdup(params[1].c_str()); bi->host = sstrdup(params[2].c_str()); - bi->created = strtol(params[4].c_str(), NULL, 10); - bi->chancount = atol(params[5].c_str()); - bi->real = sstrdup(params[6].c_str()); + bi->created = atol(params[3].c_str()); + bi->chancount = atol(params[4].c_str()); + bi->real = sstrdup(params[5].c_str()); Alog(LOG_DEBUG_2) << "[db_plain]: Loaded botinfo for " << bi->nick; } diff --git a/src/init.c b/src/init.c index e527f32c5..dfbdfbd80 100644 --- a/src/init.c +++ b/src/init.c @@ -470,13 +470,7 @@ int init_secondary(int ac, char **av) /* this is only used on the first run of Anope. */ - /* Config.s_NickServ will always be an existing bot (if there - * are databases) because Anope now tracks what nick - * each core bot is on, and changes them if needed - * when loading the databases - */ - BotInfo *bi = findbot(Config.s_NickServ); - if (!bi) + if (!nbots) { if (Config.s_OperServ) new BotInfo(Config.s_OperServ, Config.ServiceUser, Config.ServiceHost, Config.desc_OperServ); |