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"))