summaryrefslogtreecommitdiff
path: root/src/channels.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/channels.c')
-rw-r--r--src/channels.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/channels.c b/src/channels.c
index 4f764b8fc..69843d1da 100644
--- a/src/channels.c
+++ b/src/channels.c
@@ -445,9 +445,17 @@ void Channel::RemoveModeInternal(ChannelMode *cm, const std::string &param, bool
return;
}
- /* We don't track bots */
- if (findbot(param))
+ /* Reset modes on bots if we're supposed to */
+ BotInfo *bi = findbot(param);
+ if (bi)
+ {
+ if (std::find(BotModes.begin(), BotModes.end(), cm) != BotModes.end())
+ {
+ this->SetMode(bi, cm, bi->nick);
+ }
+ /* We don't track bots */
return;
+ }
User *u = finduser(param);
if (!u)