From d4c7f67b5858e70c86753ba769100fc3401e074e Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 13 Aug 2010 18:45:50 -0400 Subject: Readded in BotInfo::chancount, it never should have been removed in the first place --- src/bots.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/bots.cpp b/src/bots.cpp index a5536e510..c07b358da 100644 --- a/src/bots.cpp +++ b/src/bots.cpp @@ -27,6 +27,7 @@ BotInfo::BotInfo(const Anope::string &nnick, const Anope::string &nuser, const A this->realname = nreal; this->server = Me; + this->chancount = 0; this->lastmsg = this->created = time(NULL); if (!Config.s_ChanServ.empty() && nnick.equals_ci(Config.s_ChanServ)) @@ -107,6 +108,8 @@ void BotInfo::Assign(User *u, ChannelInfo *ci) if (ci->bi) ci->bi->UnAssign(u, ci); + + ++this->chancount; ci->bi = this; if (ci->c && ci->c->users.size() >= Config.BSMinUsers) @@ -128,6 +131,8 @@ void BotInfo::UnAssign(User *u, ChannelInfo *ci) ci->bi->Part(ci->c); } + --this->chancount; + ci->bi = NULL; } -- cgit