fix the hide_join_exit and hide_status_change options not working, also don't send the vcard if we are not using anonymous auth
This commit is contained in:
parent
1ae7bc2f63
commit
d03ce7e869
4 changed files with 25 additions and 6 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
# This is the default config for the XMPP client Poezio.
|
||||||
|
# Comments should be on their own line and NOT at the end
|
||||||
|
# of a meaningful line.
|
||||||
|
|
||||||
[Poezio]
|
[Poezio]
|
||||||
|
|
||||||
# the server. Make sure the server you're using accepts anonymous authentification
|
# the server. Make sure the server you're using accepts anonymous authentification
|
||||||
|
@ -23,6 +27,8 @@ jid =
|
||||||
password =
|
password =
|
||||||
|
|
||||||
# the rooms you will join automatically on startup, with associated nickname or not
|
# the rooms you will join automatically on startup, with associated nickname or not
|
||||||
|
# format : room@server.tld/nickname:room2@server.tld/nickname2
|
||||||
|
# default_nick will be used if "/nickname" is not specified
|
||||||
rooms = poezio@conference.codingteam.net:discussion@kikoo.louiz.org
|
rooms = poezio@conference.codingteam.net:discussion@kikoo.louiz.org
|
||||||
|
|
||||||
# PROXY
|
# PROXY
|
||||||
|
@ -58,9 +64,15 @@ highlight_on =
|
||||||
# if the user involved has talked since the last n seconds
|
# if the user involved has talked since the last n seconds
|
||||||
# The quit messages will be hidden only if hide_exit_join is 0
|
# The quit messages will be hidden only if hide_exit_join is 0
|
||||||
# if the value is incorrect, -1 is assumed
|
# if the value is incorrect, -1 is assumed
|
||||||
hide_exit_join = -1 # all quit and join notices will be displayed
|
# Default settings are :
|
||||||
hide_status_change = 120 # status changes won't be displayed unless
|
# - all quit and join notices will be displayed
|
||||||
# the user talked since less than 2 minutes
|
# - status changes won't be displayed unless
|
||||||
|
# the user talked since less than 2 minutes
|
||||||
|
|
||||||
|
hide_exit_join = -1
|
||||||
|
|
||||||
|
hide_status_change = 120
|
||||||
|
|
||||||
|
|
||||||
# the full path to the photo (avatar) you want to use
|
# the full path to the photo (avatar) you want to use
|
||||||
# it should be less than 16Ko
|
# it should be less than 16Ko
|
||||||
|
@ -91,10 +103,10 @@ logfile = logs
|
||||||
full_name =
|
full_name =
|
||||||
|
|
||||||
# your personnal website
|
# your personnal website
|
||||||
website = http://codingteam.net/project/poezio
|
website = http://poezio.eu
|
||||||
|
|
||||||
# your e-mail address
|
# your e-mail address
|
||||||
email =
|
email =
|
||||||
|
|
||||||
# anything you want to say about you
|
# anything you want to say about you
|
||||||
comment = I am using Poezio, it's a cool Jabber client. Check it out at http://codingteam.net/project/poezio.
|
comment = I am using Poezio, it's a cool XMPP (Jabber) client. Check it out at http://poezio.eu
|
|
@ -140,7 +140,8 @@ class MultiUserChat(object):
|
||||||
else:
|
else:
|
||||||
nick = config.get('default_nick', 'poezio')
|
nick = config.get('default_nick', 'poezio')
|
||||||
self.handler.emit('join-room', room=roomname, nick=nick)
|
self.handler.emit('join-room', room=roomname, nick=nick)
|
||||||
self.vcard_sender.start()
|
if config.get('jid', '') == '': # Don't send the vcard if we're not anonymous
|
||||||
|
self.vcard_sender.start() # because the user ALREADY has one on the server
|
||||||
|
|
||||||
def send_message(self, room, message):
|
def send_message(self, room, message):
|
||||||
mes = Message(to=room)
|
mes = Message(to=room)
|
||||||
|
|
|
@ -65,6 +65,8 @@ class Room(object):
|
||||||
in the room anymore
|
in the room anymore
|
||||||
"""
|
"""
|
||||||
user = self.get_user_by_name(nickname) if nickname is not None else None
|
user = self.get_user_by_name(nickname) if nickname is not None else None
|
||||||
|
if user:
|
||||||
|
user.set_last_talked(datetime.now())
|
||||||
time = time if time is not None else datetime.now()
|
time = time if time is not None else datetime.now()
|
||||||
color = None
|
color = None
|
||||||
if nickname is not None:
|
if nickname is not None:
|
||||||
|
|
|
@ -52,10 +52,14 @@ class User(object):
|
||||||
Return True if the user talked since the last s seconds
|
Return True if the user talked since the last s seconds
|
||||||
"""
|
"""
|
||||||
from common import debug
|
from common import debug
|
||||||
|
debug('anus===========\n')
|
||||||
if self.last_talked is None:
|
if self.last_talked is None:
|
||||||
|
debug('return False1\n')
|
||||||
return False
|
return False
|
||||||
delta = timedelta(0, t)
|
delta = timedelta(0, t)
|
||||||
debug("Last talk: %s\nDelai:%s\nDelta:%s\n" % (str(self.last_talked), str(t), str(delta)))
|
debug("Last talk: %s\nDelai:%s\nDelta:%s\n" % (str(self.last_talked), str(t), str(delta)))
|
||||||
if datetime.now() - delta > self.last_talked:
|
if datetime.now() - delta > self.last_talked:
|
||||||
|
debug('return False2\n')
|
||||||
return False
|
return False
|
||||||
|
debug('return True')
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Reference in a new issue