|
|
|
@ -461,6 +461,9 @@ class Server: |
|
|
|
return True |
|
|
|
|
|
|
|
def remove_plugin(self, plugin_name, need_reloads_plugins = True): |
|
|
|
if ".smx" in plugin_name: |
|
|
|
print("plugin name without extension") |
|
|
|
sys.exit(1) |
|
|
|
plugins_list = glob(f"{self.root}/addons/sourcemod/plugins/*.smx") + glob(f"{self.root}/addons/sourcemod/plugins/*/*.smx") |
|
|
|
for plugin in plugins_list: |
|
|
|
if plugin.split("/")[-1] == plugin_name + ".smx": |
|
|
|
@ -759,6 +762,9 @@ class Server: |
|
|
|
fresh_plugin_name = fresh_path.split("/")[-1:][0] |
|
|
|
plugins_list = glob(f"{self.root}/addons/sourcemod/plugins/*.smx") + glob(f"{self.root}/addons/sourcemod/plugins/*/*.smx") |
|
|
|
for plugin_path in plugins_list: |
|
|
|
if plugin_path.split("/")[-2:][0] == "disabled": |
|
|
|
continue |
|
|
|
|
|
|
|
if plugin_path.split("/")[-1:][0] == fresh_plugin_name: |
|
|
|
old_hash = hashfile(plugin_path) |
|
|
|
if old_hash == new_hash: |
|
|
|
|