fix: consolidate plugin reset logic

isekai-main
Julian Lam 3 years ago
parent 9245f71a66
commit 449366ca83

@ -119,14 +119,10 @@ async function resetPlugin(pluginId) {
const isActive = await db.isSortedSetMember('plugins:active', pluginId);
if (isActive) {
await db.sortedSetRemove('plugins:active', pluginId);
}
await events.log({
type: 'plugin-deactivate',
text: pluginId,
});
if (isActive) {
await events.log({
type: 'plugin-deactivate',
text: pluginId,
});
winston.info('[reset] Plugin `%s` disabled', pluginId);
} else {
winston.warn('[reset] Plugin `%s` was not active on this forum', pluginId);

Loading…
Cancel
Save