def enable_channel(receiver): conf = utils.get_safe_setting('disabled_channels', list) if receiver not in conf: return "Channel is not disabled!" utils.generic_cfg(receiver, 'remove', list, 'disabled_channels') utils.reload_cfg_plugins('disabled_channels') return "Channel enabled"
def disable_channel(receiver): conf = utils.get_safe_setting('disabled_channels', list) if receiver in conf: return "Channel already disabled!" utils.generic_cfg(receiver, 'append', list, 'disabled_channels') utils.reload_cfg_plugins('disabled_channels') return "Channel disabled"
def disable_plugin(name, receiver): if not utils.plugin_exists(name): return 'Plugin {} does not exists'.format(name) if not utils.plugin_enabled(name): return 'Plugin {} is not enabled'.format(name) generic_cfg(name, 'remove') print("Removed plugin {} to config file".format(name)) utils.reload_cfg_plugins() return list_plugins(True, receiver)
def disable_plugin(name, receiver): if not utils.plugin_exists(name): return "Plugin {} does not exists".format(name) if not utils.plugin_enabled(name): return "Plugin {} is not enabled".format(name) generic_cfg(name, "remove") print("Removed plugin {} to config file".format(name)) utils.reload_cfg_plugins() return list_plugins(True, receiver)
def enable_plugin(name, receiver): print("") if utils.plugin_enabled(name): return 'Plugin {} is enabled'.format(name) if utils.plugin_exists(name): generic_cfg(name, 'append') print("Added plugin {} to config file".format(name)) utils.reload_cfg_plugins() return list_plugins(True, receiver) else: return 'Plugin "{}" does not exists'.format(name)
def enable_plugin(name, receiver): print("") if utils.plugin_enabled(name): return "Plugin {} is enabled".format(name) if utils.plugin_exists(name): generic_cfg(name, "append") print("Added plugin {} to config file".format(name)) utils.reload_cfg_plugins() return list_plugins(True, receiver) else: return 'Plugin "{}" does not exists'.format(name)