From 5b6878213357a0b2bcb8da06ef66b47a4ec52e8c Mon Sep 17 00:00:00 2001 From: DukePyrolator Date: Sun, 1 Aug 2010 18:30:11 +0200 Subject: [PATCH] fixed a problem with parting botserv bots --- src/channels.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/channels.cpp b/src/channels.cpp index 894528c88..caab1dcbc 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -183,7 +183,8 @@ void Channel::DeleteUser(User *user) if (this->ci && this->ci->HasFlag(CI_INHABIT)) return; - if (!Config.s_BotServ.empty() && this->ci && this->ci->bi && this->FindUser(this->ci->bi)) + /* check for BSMinUsers and part the BotServ bot from the channel */ + if (this->users.size() < Config.BSMinUsers && !Config.s_BotServ.empty() && this->ci && this->ci->bi && this->FindUser(this->ci->bi)) this->ci->bi->Part(this->ci->c); else if (this->users.empty()) delete this;