From 647a07ff963a02096af4455f8ccf842967098a83 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 15 May 2026 15:54:57 +0100 Subject: [PATCH] Fix an crash when a user migrates their own access. --- modules/chanserv/cs_flags.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/chanserv/cs_flags.cpp b/modules/chanserv/cs_flags.cpp index 6cd3c28bc..296b65166 100644 --- a/modules/chanserv/cs_flags.cpp +++ b/modules/chanserv/cs_flags.cpp @@ -419,7 +419,6 @@ class CommandCSFlags final void DoMigrate(CommandSource &source, ChannelInfo *ci, const std::vector ¶ms) { auto override = false; - const auto source_access = source.AccessFor(ci); unsigned migrated = 0, notmigratable = 0, notmigrated = 0; Anope::string migratedmask, notmigratablemask, notmigratedmask; @@ -440,6 +439,7 @@ class CommandCSFlags final continue; // Source doesn't have this flag. // Check that the source has access to set this entry. + const auto source_access = source.AccessFor(ci); if (!override && !source_access.HasPriv(priv) && !source_access.founder) { if (!source.HasPriv("chanserv/access/modify"))