bugfix:修复命令前缀判断问题、修复超级用户无法豁免问题 (#2141)

* bugfix:修复命令前缀判断问题、修复超级用户无法豁免问题

* bugfix:修复格式问题
This commit is contained in:
Copaan
2026-06-16 17:14:03 +08:00
committed by GitHub
parent 8afc8f8673
commit a2c0cfdf5d
18 changed files with 224 additions and 51 deletions
@@ -246,7 +246,11 @@ async def route_gate_stage(
if deps.is_hidden_plugin(ctx.matcher):
ctx.stop(allowed=True, effect="allow", reason="hidden_plugin")
return
if ctx.event_cache is not None and ctx.event_cache.get("ban_state") is True:
if (
ctx.event_cache is not None
and ctx.event_cache.get("ban_state") is True
and not ctx.event_context.is_superuser
):
ctx.decision_effect = "skip"
ctx.decision_reason = "ban_cached"
raise SkipPluginException("user or group banned (cached)")