ask for NO history message when using /cycle
This commit is contained in:
parent
81e71fee30
commit
073972a5c0
3 changed files with 11 additions and 10 deletions
|
@ -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 = []
|
||||
|
|
|
@ -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):
|
||||
"""
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in a new issue