1
0
mirror of https://github.com/anope/anope.git synced 2026-07-07 22:43:12 +02:00

Don't try and part service bots twice when channels drop

This commit is contained in:
Adam
2011-09-05 18:40:34 -04:00
parent 3815e7d61e
commit 7de1a7a6d1
2 changed files with 2 additions and 4 deletions
+1 -3
View File
@@ -34,15 +34,13 @@ class CommandCSDrop : public Command
return;
}
ChannelInfo *ci = cs_findchan(params[0]);
ChannelInfo *ci = cs_findchan(chan);
if (ci == NULL)
{
source.Reply(CHAN_X_NOT_REGISTERED, params[0].c_str());
return;
}
ci = cs_findchan(chan);
if (ci->HasFlag(CI_SUSPENDED) && !u->HasCommand("chanserv/drop"))
{
source.Reply(CHAN_X_SUSPENDED, chan.c_str());
+1 -1
View File
@@ -157,7 +157,7 @@ class BotServCore : public Module
if (c->HasFlag(CH_INHABIT))
return;
if (c->ci && c->ci->bi && c->users.size() - 1 <= Config->BSMinUsers && c->FindUser(c->ci->bi))
if (c->ci && c->ci->bi && u != c->ci->bi && c->users.size() - 1 <= Config->BSMinUsers && c->FindUser(c->ci->bi))
{
bool persist = c->HasFlag(CH_PERSIST);
c->SetFlag(CH_PERSIST);