diff options
author | Florent Le Coz <louiz@louiz.org> | 2011-02-10 12:49:11 +0100 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2011-02-10 12:49:11 +0100 |
commit | bd1733355b53d8d526dba17327b69df915ce580e (patch) | |
tree | 5e485db137b9952b91ffdc766f2557b318e5841a | |
parent | 3dbb6590d3fab0ffb8ec7e66f0ecbe2701ce8d75 (diff) | |
download | poezio-bd1733355b53d8d526dba17327b69df915ce580e.tar.gz poezio-bd1733355b53d8d526dba17327b69df915ce580e.tar.bz2 poezio-bd1733355b53d8d526dba17327b69df915ce580e.tar.xz poezio-bd1733355b53d8d526dba17327b69df915ce580e.zip |
Topic completion
-rw-r--r-- | src/tabs.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/tabs.py b/src/tabs.py index 70c02911..8f42a0f4 100644 --- a/src/tabs.py +++ b/src/tabs.py @@ -362,7 +362,7 @@ class MucTab(ChatTab): self.commands['ignore'] = (self.command_ignore, _("Usage: /ignore <nickname> \nIgnore: Ignore a specified nickname."), None) self.commands['unignore'] = (self.command_unignore, _("Usage: /unignore <nickname>\nUnignore: Remove the specified nickname from the ignore list."), None) self.commands['kick'] = (self.command_kick, _("Usage: /kick <nick> [reason]\nKick: Kick the user with the specified nickname. You also can give an optional reason."), None) - self.commands['topic'] = (self.command_topic, _("Usage: /topic <subject>\nTopic: Change the subject of the room"), None) + self.commands['topic'] = (self.command_topic, _("Usage: /topic <subject>\nTopic: Change the subject of the room"), self.completion_topic) self.commands['query'] = (self.command_query, _('Usage: /query <nick> [message]\nQuery: Open a private conversation with <nick>. This nick has to be present in the room you\'re currently in. If you specified a message after the nickname, it will immediately be sent to this user'), None) self.commands['part'] = (self.command_part, _("Usage: /part [message]\n Part: disconnect from a room. You can specify an optional message."), None) self.commands['nick'] = (self.command_nick, _("Usage: /nick <nickname>\nNick: Change your nickname in the current room"), None) @@ -491,6 +491,10 @@ class MucTab(ChatTab): subject = arg muc.change_subject(self.core.xmpp, self.get_room().name, subject) + def completion_topic(self, the_input): + current_topic = self.get_room().topic + the_input.auto_completion([current_topic], ' ') + def command_kick(self, arg): """ /kick <nick> [reason] |