fix: refresh reserved plugin commands (#1558) (thanks @Glucksberg)

This commit is contained in:
Peter Steinberger 2026-01-24 05:20:17 +00:00
parent bfc0fb742e
commit 29043209c9

View File

@ -23,10 +23,7 @@ let registryLockCount = 0;
// Maximum allowed length for command arguments (defense in depth)
const MAX_ARGS_LENGTH = 4096;
let cachedReservedCommands: Set<string> | null = null;
function getReservedCommands(): Set<string> {
if (cachedReservedCommands) return cachedReservedCommands;
const reserved = new Set<string>();
for (const command of listChatCommands()) {
if (command.nativeName) {
@ -41,7 +38,6 @@ function getReservedCommands(): Set<string> {
if (normalized) reserved.add(normalized);
}
}
cachedReservedCommands = reserved;
return reserved;
}