1
0
mirror of https://github.com/anope/anope.git synced 2026-07-07 16:23:14 +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:
Sadie Powell
2025-05-03 17:07:07 +01:00
parent c955941413
commit 010beb52b1
26 changed files with 341 additions and 218 deletions
+3 -3
View File
@@ -309,7 +309,7 @@ public:
return;
if (c->ci)
c->SetMode(c->ci->WhoSends(), "REGISTERED", "", false);
c->SetMode(c->ci->WhoSends(), "REGISTERED", {}, false);
else
c->RemoveMode(c->WhoSends(), "REGISTERED", "", false);
@@ -461,7 +461,7 @@ public:
}
}
EventReturn OnChannelModeSet(Channel *c, MessageSource &setter, ChannelMode *mode, const Anope::string &param) override
EventReturn OnChannelModeSet(Channel *c, MessageSource &setter, ChannelMode *mode, const ModeData &data) override
{
if (!always_lower && Anope::CurTime == c->created && c->ci && setter.GetUser() && !setter.GetUser()->server->IsULined())
{
@@ -470,7 +470,7 @@ public:
if (cu && cm && !cu->status.HasMode(cm->mchar))
{
/* Our -o and their mode change crossing, bounce their mode */
c->RemoveMode(c->ci->WhoSends(), mode, param);
c->RemoveMode(c->ci->WhoSends(), mode, data.value);
/* We don't set mlocks until after the join has finished processing, it will stack with this change,
* so there isn't much for the user to remove except -nt etc which is likely locked anyway.
*/