mirror of
https://github.com/anope/anope.git
synced 2026-07-09 13:23:13 +02:00
Store modes as their object form in ModeStatus.
This has the side effect of preventing users from putting nonsense
modes in {botserv}:botmodes and other related fields.
This commit is contained in:
@@ -516,8 +516,8 @@ public:
|
||||
memb->status.Clear();
|
||||
|
||||
BotInfo *setter = BotInfo::Find(user->GetUID());
|
||||
for (auto mode : cs.Modes())
|
||||
c->SetMode(setter, ModeManager::FindChannelModeByChar(mode), user->GetUID(), false);
|
||||
for (auto *mode : cs.Modes())
|
||||
c->SetMode(setter, mode, user->GetUID(), false);
|
||||
|
||||
if (memb != NULL)
|
||||
memb->status = cs;
|
||||
@@ -845,7 +845,7 @@ namespace InspIRCdExtBan
|
||||
{
|
||||
auto *memb = c->FindUser(u);
|
||||
if (memb != NULL)
|
||||
if (cm == NULL || memb->status.HasMode(cm->mchar))
|
||||
if (cm == NULL || memb->status.HasMode(cm))
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user