1
0
mirror of https://github.com/anope/anope.git synced 2026-07-06 14:33:13 +02:00

Add the intended target of the mode to CanSet.

This commit is contained in:
Sadie Powell
2025-07-25 21:07:26 +01:00
parent 4d2870fa45
commit 6d754b7d73
8 changed files with 33 additions and 32 deletions
+1 -1
View File
@@ -227,7 +227,7 @@ public:
for (const auto &[last_mode, last_data] : modes)
{
auto *um = ModeManager::FindUserModeByName(last_mode);
if (um && um->CanSet(nullptr) && norestore.find(um->mchar) == Anope::string::npos)
if (um && um->CanSet(nullptr, u) && norestore.find(um->mchar) == Anope::string::npos)
u->SetMode(nullptr, last_mode, last_data);
}
}