I've made this patch to implement support to disable yahoo mail notifications, as per the documentation.
It was made against v0.4 however as it's a unified context patch and those context lines haven't changed it should apply cleanly against scm repository (this I haven't checked). -- Ewan Marshall Geek By Nature, Linux By Choice.
--- yahoo.py.orig 2007-11-06 21:26:28.000000000 +0000
+++ yahoo.py 2009-04-07 19:13:50.000000000 +0100
@@ -1,4 +1,5 @@
#! /usr/bin/env python
+# -*- coding: utf-8 -*-
# $Id: yahoo.py,v 1.69 2007/11/06 21:26:16 normanr Exp $
version = 'CVS ' + '$Revision: 1.69 $'.split()[1]
#
@@ -728,7 +729,7 @@
if query.getTag('password'):
password = query.getTagData('password')
if query.getTag('remove'):
- remove = True
+ remove = True
if not remove and username and password:
if userfile.has_key(fromjid):
conf = userfile[fromjid]
@@ -1079,13 +1080,14 @@
self.jabberqueue(m)
def y_email(self,yobj, fromtxt, fromaddr, subj):
- if fromtxt != None:
- bfrom = cpformat.do(fromtxt)
- else:
- bfrom = ''
- if fromaddr != None:
- bfrom = bfrom + ' <' + cpformat.do(fromaddr) + '>'
- m = Message(frm=config.jid,to=yobj.fromjid,typ='headline', subject = "Yahoo Email Event", body = 'From: %s\nSubject: %s'% (unicode(bfrom,'utf-8','replace'),unicode(cpformat.do(subj),'utf-8','replace')))
+ if config.disableMailNotifications == False:
+ if fromtxt != None:
+ bfrom = cpformat.do(fromtxt)
+ else:
+ bfrom = ''
+ if fromaddr != None:
+ bfrom = bfrom + ' <' + cpformat.do(fromaddr) + '>'
+ m = Message(frm=config.jid,to=yobj.fromjid,typ='headline', subject = "Yahoo Email Event", body = 'From: %s\nSubject: %s'% (unicode(bfrom,'utf-8','replace'),unicode(cpformat.do(subj),'utf-8','replace')))
self.jabberqueue(m)
def y_reg_login(self,yobj):
--- config_example.xml.orig 2007-04-09 17:40:37.000000000 +0100
+++ config_example.xml 2009-04-06 13:14:17.000000000 +0100
@@ -50,6 +50,9 @@
<!-- Allow users to use the Yahoo! chat rooms with this transport -->
<enableChatrooms/>
+ <!-- Disable email notifications -->
+ <!-- <disableMailNotifications/> -->
+
<!-- Use external component binding. -->
<!-- This dodges the need to manually configure all jids that talk to this transport. -->
<!-- Jabberd2 requires saslUsername and useRouteWrap for this to work. -->
--- config.py.orig 2007-04-09 17:40:37.778852284 +0100
+++ config.py 2009-04-06 13:13:10.926670977 +0100
@@ -19,6 +19,7 @@
allowRegister = False
enableChatrooms = False
+disableMailNotifications = False
admins = []
signature.asc
Description: This is a digitally signed message part.
