Merge pull request #2407 from ayasa520/fix_reloadp

fix(plugin): fix reloadp command not taking effect
This commit is contained in:
Saboteur7
2024-12-13 15:39:33 +08:00
committed by GitHub
6 changed files with 19 additions and 10 deletions

View File

@@ -9,7 +9,7 @@ import sys
from common.log import logger
from common.singleton import singleton
from common.sorted_dict import SortedDict
from config import conf, write_plugin_config
from config import conf, remove_plugin_config, write_plugin_config
from .event import *
@@ -163,6 +163,7 @@ class PluginManager:
def reload_plugin(self, name: str):
name = name.upper()
remove_plugin_config(name)
if name in self.instances:
for event in self.listening_plugins:
if name in self.listening_plugins[event]: