From 83113d42fce13e46ccc4783dc8ddc6cc97b1fd94 Mon Sep 17 00:00:00 2001 From: mathieui Date: Mon, 13 Apr 2015 14:31:35 +0200 Subject: Add a "." shortcut to /set in order to set the section for the current tab JID e.g. /set . notify_messages false would set the option for a section named after the current tab. --- src/core/commands.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/core/commands.py b/src/core/commands.py index c0de8a03..338590f1 100644 --- a/src/core/commands.py +++ b/src/core/commands.py @@ -603,7 +603,15 @@ def command_set(self, args): plugin_config = self.plugin_manager.plugins[plugin_name].config info = plugin_config.set_and_save(option, value, section) else: - section = args[0] + if args[0] == '.': + name = safeJID(self.current_tab().name).bare + if not name: + self.information(_('Invalid tab to use the "." argument.'), + _('Error')) + return + section = name + else: + section = args[0] option = args[1] value = args[2] info = config.set_and_save(option, value, section) -- cgit v1.2.3