diff options
author | Adam <Adam@anope.org> | 2010-08-13 18:45:50 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-08-13 18:45:50 -0400 |
commit | d4c7f67b5858e70c86753ba769100fc3401e074e (patch) | |
tree | eb00933ecb68874786185a709b93c574d883a96e /src/bots.cpp | |
parent | d05afb3ca376d0683409c992e4a1cf5a665517dc (diff) |
Readded in BotInfo::chancount, it never should have been removed in the first place
Diffstat (limited to 'src/bots.cpp')
-rw-r--r-- | src/bots.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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; } |