summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2011-11-14 20:05:41 +0100
committermathieui <mathieui@mathieui.net>2011-11-14 20:05:41 +0100
commite4634b9095bd9628396407b3c9fa3a77b3acbe00 (patch)
treed846c3a7f6eb4ea7adab55bca2dc4e9c03a12c28 /src
parente4dccc8d8f41de1a6fec165962a3fd678265ec88 (diff)
downloadpoezio-e4634b9095bd9628396407b3c9fa3a77b3acbe00.tar.gz
poezio-e4634b9095bd9628396407b3c9fa3a77b3acbe00.tar.bz2
poezio-e4634b9095bd9628396407b3c9fa3a77b3acbe00.tar.xz
poezio-e4634b9095bd9628396407b3c9fa3a77b3acbe00.zip
Completion for /version
Diffstat (limited to 'src')
-rw-r--r--src/tabs.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/tabs.py b/src/tabs.py
index 9dc24092..430ee7f8 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -494,12 +494,20 @@ class MucTab(ChatTab):
self.commands['cycle'] = (self.command_cycle, _('Usage: /cycle [message]\nCycle: Leave the current room and rejoin it immediately.'), None)
self.commands['info'] = (self.command_info, _('Usage: /info <nickname>\nInfo: Display some information about the user in the MUC: its/his/her role, affiliation, status and status message.'), self.completion_ignore)
self.commands['configure'] = (self.command_configure, _('Usage: /configure\nConfigure: Configure the current room, through a form.'), None)
- self.commands['version'] = (self.command_version, _('Usage: /version <jid or nick>\nVersion: Get the software version of the given JID or nick in room (usually its XMPP client and Operating System).'), None)
+ self.commands['version'] = (self.command_version, _('Usage: /version <jid or nick>\nVersion: Get the software version of the given JID or nick in room (usually its XMPP client and Operating System).'), self.completion_version)
self.commands['names'] = (self.command_names, _('Usage: /names\nNames: Get the list of the users in the room, and the list of the people assuming the different roles.'), None)
self.resize()
self.update_commands()
self.update_keys()
+ def completion_version(self, the_input):
+ """Completion for /version"""
+ userlist = [user.nick for user in self.users]
+ userlist.remove(self.own_nick)
+ contact_list = [contact.bare_jid for contact in roster.get_contacts()]
+ userlist.extend(contact_list)
+ return the_input.auto_completion(userlist, '')
+
def completion_nick(self, the_input):
"""Completion for /nick"""
nicks = [os.environ.get('USER'), config.get('default_nick', ''), self.core.get_bookmark_nickname(self.get_name())]