summaryrefslogtreecommitdiff
path: root/src/core.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2013-06-09 12:56:51 +0200
committermathieui <mathieui@mathieui.net>2013-06-09 12:56:51 +0200
commit9d5fddf5bad0e94f3945488e4174b7a8ade58f57 (patch)
treea4777dbb8fe679c094cf1e830a9e6448abe4593a /src/core.py
parent71b6404b04f64a8973ef0b9f8bba4c7aca3106a1 (diff)
downloadpoezio-9d5fddf5bad0e94f3945488e4174b7a8ade58f57.tar.gz
poezio-9d5fddf5bad0e94f3945488e4174b7a8ade58f57.tar.bz2
poezio-9d5fddf5bad0e94f3945488e4174b7a8ade58f57.tar.xz
poezio-9d5fddf5bad0e94f3945488e4174b7a8ade58f57.zip
Use the new format in the roster log too (ref #2311)
(and add the pep events and invites to it)
Diffstat (limited to 'src/core.py')
-rw-r--r--src/core.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/core.py b/src/core.py
index e3c89aa9..a7c302dc 100644
--- a/src/core.py
+++ b/src/core.py
@@ -2652,6 +2652,7 @@ class Core(object):
self.information(msg, 'Info')
if 'invite' in config.get('beep_on', 'invite').split():
curses.beep()
+ logger.log_roster_change(inviter.full, 'invited you to %s' % jid.full)
self.pending_invites[jid.bare] = inviter.full
def on_groupchat_decline(self, decline):
@@ -2794,6 +2795,9 @@ class Core(object):
else:
contact.gaming = {}
+ if contact.gaming:
+ logger.log_roster_change(contact.bare_jid, 'is playing %s' % (common.format_gaming_string(contact.gaming)))
+
if old_gaming != contact.gaming and config.get_by_tabname('display_gaming_notifications', 'false', contact.bare_jid) == 'true':
if contact.gaming:
self.information('%s is playing %s' % (contact.bare_jid, common.format_gaming_string(contact.gaming)), 'Gaming')
@@ -2824,6 +2828,9 @@ class Core(object):
else:
contact.mood = ''
+ if contact.mood:
+ logger.log_roster_change(contact.bare_jid, 'has now the mood: %s' % contact.mood)
+
if old_mood != contact.mood and config.get_by_tabname('display_mood_notifications', 'false', contact.bare_jid) == 'true':
if contact.mood:
self.information('Mood from '+ contact.bare_jid + ': ' + contact.mood, 'Mood')
@@ -2860,6 +2867,9 @@ class Core(object):
else:
contact.activity = ''
+ if contact.activity:
+ logger.log_roster_change(contact.bare_jid, 'has now the activity %s' % contact.activity)
+
if old_activity != contact.activity and config.get_by_tabname('display_activity_notifications', 'false', contact.bare_jid) == 'true':
if contact.activity:
self.information('Activity from '+ contact.bare_jid + ': ' + contact.activity, 'Activity')
@@ -2891,6 +2901,9 @@ class Core(object):
else:
contact.tune = {}
+ if contact.tune:
+ logger.log_roster_change(message['from'].bare, 'is now listening to %s' % common.format_tune_string(contact.tune))
+
if old_tune != contact.tune and config.get_by_tabname('display_tune_notifications', 'false', contact.bare_jid) == 'true':
if contact.tune:
self.information(