From 2337b7717db05e0c8b53da2d61b5a66f58cc0297 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 24 Feb 2012 14:53:34 -0500 Subject: Fixed calculating bots channel count of assigned channels and fixed the order of saving memos (among other things) --- modules/commands/bs_info.cpp | 2 +- modules/database/db_old.cpp | 1 - modules/database/db_plain.cpp | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) (limited to 'modules') diff --git a/modules/commands/bs_info.cpp b/modules/commands/bs_info.cpp index 5026de3c7..ed36818b3 100644 --- a/modules/commands/bs_info.cpp +++ b/modules/commands/bs_info.cpp @@ -71,7 +71,7 @@ class CommandBSInfo : public Command info[_("Real name")] = bi->realname; info[_("Created")] = do_strftime(bi->created); info[_("Options")] = bi->HasFlag(BI_PRIVATE) ? _("Private") : _("None"); - info[_("Used on")] = stringify(bi->chancount) + " channel(s)"; + info[_("Used on")] = stringify(bi->GetChannelCount()) + " channel(s)"; std::vector replies; info.Process(replies); diff --git a/modules/database/db_old.cpp b/modules/database/db_old.cpp index 5268a345d..f42583bea 100644 --- a/modules/database/db_old.cpp +++ b/modules/database/db_old.cpp @@ -622,7 +622,6 @@ static void LoadBots() BotInfo *bi = new BotInfo(nick, user, host, real); bi->created = created; - bi->chancount = chancount; if (flags & OLD_BI_PRIVATE) bi->SetFlag(BI_PRIVATE); diff --git a/modules/database/db_plain.cpp b/modules/database/db_plain.cpp index dcbfeaa28..edf41c7f0 100644 --- a/modules/database/db_plain.cpp +++ b/modules/database/db_plain.cpp @@ -507,7 +507,7 @@ static void LoadBotInfo(const std::vector ¶ms) bi = new BotInfo(params[0], params[1], params[2]); bi->created = params[3].is_pos_number_only() ? convertTo(params[3]) : 0; - bi->chancount = params[4].is_pos_number_only() ? convertTo(params[4]) : 0; + //bi->chancount = params[4].is_pos_number_only() ? convertTo(params[4]) : 0; bi->realname = params[5]; Log(LOG_DEBUG_2) << "[db_plain]: Loaded botinfo for " << bi->nick; @@ -736,7 +736,7 @@ class DBPlain : public Module if (bi->HasFlag(BI_CONF)) continue; - db_buffer << "BI " << bi->nick << " " << bi->GetIdent() << " " << bi->host << " " << bi->created << " " << bi->chancount << " :" << bi->realname << endl; + db_buffer << "BI " << bi->nick << " " << bi->GetIdent() << " " << bi->host << " " << bi->created << " " << bi->GetChannelCount() << " :" << bi->realname << endl; if (bi->FlagCount()) db_buffer << "MD FLAGS " << bi->ToString() << endl; } -- cgit