# HG changeset patch # User Mikael Berthe # Date 1269792163 -7200 # Node ID 4db51cfb9e1531e3a29db6a764c6183e47da2ace # Parent 5f16a0f3124c601c2031f5c5c8ba5f82a0c25922 Use new UNREAD parameters (mcabber 0.10.0) diff -r 5f16a0f3124c -r 4db51cfb9e15 mcevent.py --- a/mcevent.py Mon Jul 14 18:21:16 2008 +0200 +++ b/mcevent.py Sun Mar 28 18:02:43 2010 +0200 @@ -12,7 +12,7 @@ and creates events accordingly. Examples: STATUS O user2@domain.org MSG IN user@domain.org -UNREAD 1 +UNREAD 1 0 1 0 """ import sys, getopt @@ -240,9 +240,15 @@ elif event == 'UNREAD': # arg1 is the number of unread buffers + unread_all, unread_attn, unread_muc, unread_muc_attn = args[1:5] + unread = int(unread_all) - (int(unread_muc) - int(unread_muc_attn)) + if unread == int(unread_all): + unread_str = unread_all + else: + unread_str = str(unread) + "/" + unread_all if OPT['unread_file'] != '': fileh = open(OPT['unread_file'], 'w') - fileh.write(arg1) + fileh.write(unread_str) fileh.close()