summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2011-01-04 03:36:04 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2011-01-04 03:36:04 +0000
commit073972a5c0cd312d37ed7dda841ba6cf93414574 (patch)
tree7bc4b6f8f05a40c8ae652e4f4842f692e08dd58c /src
parent81e71fee30839b1b9ce3688d093a68ab03e600cd (diff)
downloadpoezio-073972a5c0cd312d37ed7dda841ba6cf93414574.tar.gz
poezio-073972a5c0cd312d37ed7dda841ba6cf93414574.tar.bz2
poezio-073972a5c0cd312d37ed7dda841ba6cf93414574.tar.xz
poezio-073972a5c0cd312d37ed7dda841ba6cf93414574.zip
ask for NO history message when using /cycle
Diffstat (limited to 'src')
-rw-r--r--src/core.py6
-rw-r--r--src/multiuserchat.py11
-rw-r--r--src/tabs.py4
3 files changed, 11 insertions, 10 deletions
diff --git a/src/core.py b/src/core.py
index 88dde997..afc6376d 100644
--- a/src/core.py
+++ b/src/core.py
@@ -1004,7 +1004,7 @@ class Core(object):
if muc_serv_list:
the_input.auto_completion(muc_serv_list, ' ')
- def command_join(self, arg):
+ def command_join(self, arg, histo_length=None):
"""
/join [room][/nick] [password]
"""
@@ -1051,10 +1051,10 @@ class Core(object):
return
room = room.lower()
if r and not r.joined:
- muc.join_groupchat(self.xmpp, room, nick, password)
+ muc.join_groupchat(self.xmpp, room, nick, password, histo_length)
if not r: # if the room window exists, we don't recreate it.
self.open_new_room(room, nick)
- muc.join_groupchat(self.xmpp, room, nick, password)
+ muc.join_groupchat(self.xmpp, room, nick, password, histo_length)
else:
r.own_nick = nick
r.users = []
diff --git a/src/multiuserchat.py b/src/multiuserchat.py
index d9593436..5ef21e07 100644
--- a/src/multiuserchat.py
+++ b/src/multiuserchat.py
@@ -22,6 +22,9 @@ import sleekxmpp
from xml.etree import cElementTree as ET
+import logging
+log = logging.getLogger(__name__)
+
def send_private_message(xmpp, jid, line):
"""
Send a private message
@@ -60,11 +63,9 @@ def change_nick(xmpp, jid, nick):
"""
xmpp.make_presence(pto='%s/%s' % (jid, nick)).send()
-def join_groupchat(xmpp, jid, nick, passwd=''):
- """
- Join the groupchat
- """
- xmpp.plugin['xep_0045'].joinMUC(jid, nick, maxhistory=None, password=passwd)
+def join_groupchat(xmpp, jid, nick, passwd='', maxhistory=None):
+ log.debug('ALLO histo: %s\n' % maxhistory)
+ xmpp.plugin['xep_0045'].joinMUC(jid, nick, maxhistory=maxhistory, password=passwd)
def leave_groupchat(xmpp, jid, own_nick, msg):
"""
diff --git a/src/tabs.py b/src/tabs.py
index d9e878cf..900bb3e5 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -379,7 +379,7 @@ class MucTab(ChatTab):
if self.get_room().joined:
muc.leave_groupchat(self.core.xmpp, self.get_name(), self.get_room().own_nick, arg)
self.get_room().joined = False
- self.core.command_join('/')
+ self.core.command_join('/', "0")
def command_recolor(self, arg):
"""
@@ -396,7 +396,7 @@ class MucTab(ChatTab):
nb_color = len(theme.LIST_COLOR_NICKNAMES)
for user in sorted(users, key=compare_users, reverse=True):
user.color = theme.LIST_COLOR_NICKNAMES[i % nb_color]
- i+= 1
+ i += 1
self.text_win.rebuild_everything(self.get_room())
self.core.refresh_window()