Skip to content

Commit

Permalink
Fixed -safe mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason committed Apr 27, 2019
1 parent 46575e7 commit 6ee6690
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions JJMumbleBot.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,19 +158,19 @@ def config_debug(self):
# Initializes only safe-mode applicable plugins.
def initialize_plugins_safe(self):
# Load Plugins
reg_print("######### Initializing Plugins #########")
reg_print("######### Initializing Plugins - Safe Mode #########")
sys.path.insert(0, utils.get_plugin_dir())
all_imports = [name for name in os.listdir(utils.get_plugin_dir()) if
os.path.isdir(os.path.join(utils.get_plugin_dir(), name))]
os.path.isdir(os.path.join(utils.get_plugin_dir(), name)) and name != "__pycache__"]
for p_file in all_imports:
if p_file == "help":
continue
elif p_file == "bot_commands":
self.bot_plugins[p_file] = __import__(f'{p_file}.{p_file}', fromlist=['*']).Plugin()
help_plugin = __import__('help.help')
self.bot_plugins['help'] = help_plugin.Plugin(self.bot_plugins)
self.bot_plugins['help'] = help_plugin.help.Plugin(self.bot_plugins)
sys.path.pop(0)
reg_print("######### Plugins Initialized #########")
reg_print("######### Plugins Initialized - Safe Mode #########")

# Initializes all available plugins.
def initialize_plugins(self):
Expand Down

0 comments on commit 6ee6690

Please sign in to comment.