From 0206920a10a279ee87baf3b0e51e62d9b0128b8a Mon Sep 17 00:00:00 2001 From: mathieui Date: Thu, 24 Nov 2011 13:30:48 +0100 Subject: [PATCH] Fixes #2298 --- src/tabs.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tabs.py b/src/tabs.py index d08a8188..b0185b27 100644 --- a/src/tabs.py +++ b/src/tabs.py @@ -543,8 +543,9 @@ class MucTab(ChatTab): def completion_version(self, the_input): """Completion for /version""" - userlist = [user.nick for user in self.users] - userlist.remove(self.own_nick) + compare_users = lambda x: x.last_talked + userlist = [user.nick for user in sorted(self.users, key=compare_users, reverse=True)\ + if user.nick != self.own_nick] contact_list = [contact.bare_jid for contact in roster.get_contacts()] userlist.extend(contact_list) return the_input.auto_completion(userlist, '')