summaryrefslogtreecommitdiff
path: root/src/channels.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/channels.cpp')
-rw-r--r--src/channels.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/channels.cpp b/src/channels.cpp
index 1c852aae2..66066ce37 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -14,8 +14,6 @@
channel_map ChannelList;
-static const Anope::string ChannelFlagString[] = { "CH_PERSIST", "CH_SYNCING", "CH_LOGCHAN", "" };
-
/** Default constructor
* @param name The channel name
* @param ts The time the channel was created
@@ -191,7 +189,7 @@ void Channel::DeleteUser(User *user)
return;
/* Additionally, do not delete this channel if ChanServ/a BotServ bot is inhabiting it */
- if (this->ci && this->ci->HasFlag(CI_INHABIT))
+ if (this->HasFlag(CH_INHABIT))
return;
/* check for BSMinUsers and part the BotServ bot from the channel
@@ -791,6 +789,8 @@ void Channel::KickInternal(const Anope::string &source, const Anope::string &nic
if (target->FindChannel(this))
{
FOREACH_MOD(I_OnUserKicked, OnUserKicked(this, target, source, reason));
+ if (bi)
+ this->SetFlag(CH_INHABIT);
this->DeleteUser(target);
}
else
@@ -798,7 +798,10 @@ void Channel::KickInternal(const Anope::string &source, const Anope::string &nic
/* Bots get rejoined */
if (bi)
+ {
bi->Join(this, &Config->BotModeList);
+ this->UnsetFlag(CH_INHABIT);
+ }
}
/** Kick a user from the channel
@@ -1110,9 +1113,6 @@ void chan_set_correct_modes(User *user, Channel *c, int give_modes)
if (!c || !(ci = c->ci))
return;
- if (ci->HasFlag(CI_FORBIDDEN) || c->name[0] == '+')
- return;
-
Log(LOG_DEBUG) << "Setting correct user modes for " << user->nick << " on " << c->name << " (" << (give_modes ? "" : "not ") << "giving modes)";
if (give_modes && (!user->Account() || user->Account()->HasFlag(NI_AUTOOP)))