ask for NO history message when using /cycle

parent 81e71fee
...@@ -1004,7 +1004,7 @@ class Core(object): ...@@ -1004,7 +1004,7 @@ class Core(object):
if muc_serv_list: if muc_serv_list:
the_input.auto_completion(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] /join [room][/nick] [password]
""" """
...@@ -1051,10 +1051,10 @@ class Core(object): ...@@ -1051,10 +1051,10 @@ class Core(object):
return return
room = room.lower() room = room.lower()
if r and not r.joined: 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. if not r: # if the room window exists, we don't recreate it.
self.open_new_room(room, nick) 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: else:
r.own_nick = nick r.own_nick = nick
r.users = [] r.users = []
......
...@@ -22,6 +22,9 @@ import sleekxmpp ...@@ -22,6 +22,9 @@ import sleekxmpp
from xml.etree import cElementTree as ET from xml.etree import cElementTree as ET
import logging
log = logging.getLogger(__name__)
def send_private_message(xmpp, jid, line): def send_private_message(xmpp, jid, line):
""" """
Send a private message Send a private message
...@@ -60,11 +63,9 @@ def change_nick(xmpp, jid, nick): ...@@ -60,11 +63,9 @@ def change_nick(xmpp, jid, nick):
""" """
xmpp.make_presence(pto='%s/%s' % (jid, nick)).send() xmpp.make_presence(pto='%s/%s' % (jid, nick)).send()
def join_groupchat(xmpp, jid, nick, passwd=''): def join_groupchat(xmpp, jid, nick, passwd='', maxhistory=None):
""" log.debug('ALLO histo: %s\n' % maxhistory)
Join the groupchat xmpp.plugin['xep_0045'].joinMUC(jid, nick, maxhistory=maxhistory, password=passwd)
"""
xmpp.plugin['xep_0045'].joinMUC(jid, nick, maxhistory=None, password=passwd)
def leave_groupchat(xmpp, jid, own_nick, msg): def leave_groupchat(xmpp, jid, own_nick, msg):
""" """
......
...@@ -379,7 +379,7 @@ class MucTab(ChatTab): ...@@ -379,7 +379,7 @@ class MucTab(ChatTab):
if self.get_room().joined: if self.get_room().joined:
muc.leave_groupchat(self.core.xmpp, self.get_name(), self.get_room().own_nick, arg) muc.leave_groupchat(self.core.xmpp, self.get_name(), self.get_room().own_nick, arg)
self.get_room().joined = False self.get_room().joined = False
self.core.command_join('/') self.core.command_join('/', "0")
def command_recolor(self, arg): def command_recolor(self, arg):
""" """
...@@ -396,7 +396,7 @@ class MucTab(ChatTab): ...@@ -396,7 +396,7 @@ class MucTab(ChatTab):
nb_color = len(theme.LIST_COLOR_NICKNAMES) nb_color = len(theme.LIST_COLOR_NICKNAMES)
for user in sorted(users, key=compare_users, reverse=True): for user in sorted(users, key=compare_users, reverse=True):
user.color = theme.LIST_COLOR_NICKNAMES[i % nb_color] user.color = theme.LIST_COLOR_NICKNAMES[i % nb_color]
i+= 1 i += 1
self.text_win.rebuild_everything(self.get_room()) self.text_win.rebuild_everything(self.get_room())
self.core.refresh_window() self.core.refresh_window()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment