From affdcb07b4b3fa4543d01dcc35ac358e76936084 Mon Sep 17 00:00:00 2001 From: Johannes Krude Date: Fri, 31 Aug 2012 10:37:35 +0200 Subject: added muc_history_length support --- src/core.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/core.py b/src/core.py index 5ed1cd17..d7f9f68e 100644 --- a/src/core.py +++ b/src/core.py @@ -1476,6 +1476,12 @@ class Core(object): if room.startswith('@'): room = room[1:] current_status = self.get_status() + if not histo_length: + histo_length= config.get('muc_history_length', 20) + if histo_length == -1: + histo_length= None + if histo_length: + histo_length= str(histo_length) if tab and not tab.joined: seconds = (int(time.time()) - tab.last_connection) if tab.last_connection != 0 else 0 muc.join_groupchat(self.xmpp, room, nick, password, @@ -2539,7 +2545,12 @@ class Core(object): self.open_new_room(bm.jid, bm.nick, False) nick = bm.nick if bm.nick else self.own_nick self.initial_joins.append(bm.jid) - muc.join_groupchat(self.xmpp, bm.jid, nick) + histo_length= config.get('muc_history_length', 20) + if histo_length == -1: + histo_length= None + if histo_length: + histo_length= str(histo_length) + muc.join_groupchat(self.xmpp, bm.jid, nick, None, histo_length) ### Other handlers ### -- cgit v1.2.3