summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/channels.cpp3
1 files changed, 2 insertions, 1 deletions
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;