summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2011-10-02 14:45:21 +0200
committerFlorent Le Coz <louiz@louiz.org>2011-10-02 14:45:21 +0200
commitbed11424b04f39f66aefef1cdea22a157a0ae042 (patch)
treebd3d01f9283e99b74da95c9727321a7bb7eeef00 /src
parent341da5b18e6665406078f74fc56a1aad37bc38dc (diff)
parent4dfe2229da7052985736bef93c7b02c179780548 (diff)
downloadpoezio-bed11424b04f39f66aefef1cdea22a157a0ae042.tar.gz
poezio-bed11424b04f39f66aefef1cdea22a157a0ae042.tar.bz2
poezio-bed11424b04f39f66aefef1cdea22a157a0ae042.tar.xz
poezio-bed11424b04f39f66aefef1cdea22a157a0ae042.zip
merge
Diffstat (limited to 'src')
-rw-r--r--src/tabs.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/tabs.py b/src/tabs.py
index fbcfc597..8ddf60ad 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -414,6 +414,8 @@ class MucTab(ChatTab):
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['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.commands['clear'] = (self.command_clear,
+ _("""Usage: /clear\nClear: clears the current buffer'"""), None)
self.resize()
def scroll_user_list_up(self):
@@ -461,6 +463,15 @@ class MucTab(ChatTab):
self.core.xmpp.plugin['xep_0045'].configureRoom(self.get_name(), form)
self.core.close_tab()
+ def command_clear(self, args):
+ """
+ /clear
+ """
+ self._room.messages = []
+ self.text_win.rebuild_everything(self._room)
+ self.refresh()
+ self.core.doupdate()
+
def command_cycle(self, arg):
if self.get_room().joined:
muc.leave_groupchat(self.core.xmpp, self.get_name(), self.get_room().own_nick, arg)