mirror of
https://github.com/anope/anope.git
synced 2026-06-28 16:16:39 +02:00
Store the setter and ts for all modes and try to restore them.
This is mostly for preserving channel list mode info.
This commit is contained in:
@@ -196,15 +196,15 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
EventReturn OnChannelModeSet(Channel *c, MessageSource &source, ChannelMode *mode, const Anope::string ¶m) override
|
||||
EventReturn OnChannelModeSet(Channel *c, MessageSource &source, ChannelMode *mode, const ModeData &data) override
|
||||
{
|
||||
if (source.GetUser() && !source.GetBot() && Config->GetModule(this).Get<bool>("smartjoin") && mode->name == "BAN" && c->ci && c->ci->bi && c->FindUser(c->ci->bi))
|
||||
{
|
||||
BotInfo *bi = c->ci->bi;
|
||||
|
||||
Entry ban("BAN", param);
|
||||
Entry ban("BAN", data.value);
|
||||
if (ban.Matches(bi))
|
||||
c->RemoveMode(bi, "BAN", param);
|
||||
c->RemoveMode(bi, "BAN", data.value);
|
||||
}
|
||||
|
||||
return EVENT_CONTINUE;
|
||||
|
||||
Reference in New Issue
Block a user