summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2012-12-28 19:24:13 +0100
committermathieui <mathieui@mathieui.net>2012-12-28 19:24:13 +0100
commit8aa58284596efbe98aacfb35f103d0849a2bd751 (patch)
treec0ee9151c8917608b13e3ef32bb9e668da402e43 /src
parentf2caca5f23542519ecaaae7c65329476073613cb (diff)
downloadpoezio-8aa58284596efbe98aacfb35f103d0849a2bd751.tar.gz
poezio-8aa58284596efbe98aacfb35f103d0849a2bd751.tar.bz2
poezio-8aa58284596efbe98aacfb35f103d0849a2bd751.tar.xz
poezio-8aa58284596efbe98aacfb35f103d0849a2bd751.zip
Fix #2174
/server_cycle now takes a suffix and will match all the rooms with this same suffix. It also means that /server_cycle room@domain.tld will now only cycle root@domain.tld instead of all the rooms of domain.tld.
Diffstat (limited to 'src')
-rw-r--r--src/core.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/core.py b/src/core.py
index 0b684c48..d99249e5 100644
--- a/src/core.py
+++ b/src/core.py
@@ -2086,7 +2086,7 @@ class Core(object):
self.information(_("No server specified"), "Error")
return
for tab in self.tabs:
- if isinstance(tab, tabs.MucTab) and safeJID(tab.get_name()).domain == domain:
+ if isinstance(tab, tabs.MucTab) and tab.get_name().endswith(domain):
if tab.joined:
muc.leave_groupchat(tab.core.xmpp, tab.get_name(), tab.own_nick, message)
tab.joined = False
@@ -2100,13 +2100,12 @@ class Core(object):
if txt.endswith(' '):
n += 1
if n == 2:
- serv_list = []
+ serv_list = set()
for tab in self.tabs:
if isinstance(tab, tabs.MucTab):
serv = safeJID(tab.get_name()).server
- if not serv in serv_list:
- serv_list.append(serv)
- return the_input.auto_completion(serv_list, ' ')
+ serv_list.add(serv)
+ return the_input.auto_completion(list(serv_list), ' ')
def command_activity(self, arg):
"""