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

Allow migrating access entries to the flags access system.

This commit is contained in:
Sadie Powell
2026-03-16 19:06:37 +00:00
parent a657cb5edf
commit 074ad6556c
7 changed files with 124 additions and 18 deletions
+6 -6
View File
@@ -18,9 +18,9 @@ class StatusUpdate final
: public Module
{
private:
void OnAccessChange(ChannelInfo *ci, ChanAccess *access, bool adding)
void OnAccessChange(ChannelInfo *ci, ChanAccess *access, bool migrated, bool adding)
{
if (!ci->c)
if (!ci->c || migrated)
return;
for (const auto &[_, uc] : ci->c->users)
@@ -50,14 +50,14 @@ public:
{
}
void OnAccessAdd(ChannelInfo *ci, CommandSource &, ChanAccess *access) override
void OnAccessAdd(ChannelInfo *ci, CommandSource &, ChanAccess *access, bool migrated) override
{
OnAccessChange(ci, access, true);
OnAccessChange(ci, access, migrated, true);
}
void OnAccessDel(ChannelInfo *ci, CommandSource &, ChanAccess *access) override
void OnAccessDel(ChannelInfo *ci, CommandSource &, ChanAccess *access, bool migrated) override
{
OnAccessChange(ci, access, false);
OnAccessChange(ci, access, migrated, false);
}
};