mirror of
https://github.com/anope/anope.git
synced 2026-06-12 17:24:49 +02:00
Fix an crash when a user migrates their own access.
This commit is contained in:
@@ -419,7 +419,6 @@ class CommandCSFlags final
|
|||||||
void DoMigrate(CommandSource &source, ChannelInfo *ci, const std::vector<Anope::string> ¶ms)
|
void DoMigrate(CommandSource &source, ChannelInfo *ci, const std::vector<Anope::string> ¶ms)
|
||||||
{
|
{
|
||||||
auto override = false;
|
auto override = false;
|
||||||
const auto source_access = source.AccessFor(ci);
|
|
||||||
|
|
||||||
unsigned migrated = 0, notmigratable = 0, notmigrated = 0;
|
unsigned migrated = 0, notmigratable = 0, notmigrated = 0;
|
||||||
Anope::string migratedmask, notmigratablemask, notmigratedmask;
|
Anope::string migratedmask, notmigratablemask, notmigratedmask;
|
||||||
@@ -440,6 +439,7 @@ class CommandCSFlags final
|
|||||||
continue; // Source doesn't have this flag.
|
continue; // Source doesn't have this flag.
|
||||||
|
|
||||||
// Check that the source has access to set this entry.
|
// 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 (!override && !source_access.HasPriv(priv) && !source_access.founder)
|
||||||
{
|
{
|
||||||
if (!source.HasPriv("chanserv/access/modify"))
|
if (!source.HasPriv("chanserv/access/modify"))
|
||||||
|
|||||||
Reference in New Issue
Block a user