diff options
Diffstat (limited to 'protocols/yahoo')
-rw-r--r-- | protocols/yahoo/yahoo.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/protocols/yahoo/yahoo.c b/protocols/yahoo/yahoo.c index 625f3d1c..d413597a 100644 --- a/protocols/yahoo/yahoo.c +++ b/protocols/yahoo/yahoo.c @@ -126,6 +126,11 @@ static char *byahoo_strip( const char *in ) return( g_strndup( in, len ) ); } +static void byahoo_init( account_t *acc ) +{ + set_add( &acc->set, "mail_notifications", "false", set_eval_bool, acc ); +} + static void byahoo_login( account_t *acc ) { struct im_connection *ic = imcb_new( acc ); @@ -348,6 +353,7 @@ void byahoo_initmodule( ) { struct prpl *ret = g_new0(struct prpl, 1); ret->name = "yahoo"; + ret->init = byahoo_init; ret->login = byahoo_login; ret->keepalive = byahoo_keepalive; @@ -922,7 +928,9 @@ void ext_yahoo_mail_notify( int id, const char *from, const char *subj, int cnt { struct im_connection *ic = byahoo_get_ic_by_id( id ); - if( from && subj ) + if( !set_getbool( &ic->acc->set, "mail_notifications" ) ) + ; /* The user doesn't care. */ + else if( from && subj ) imcb_log( ic, "Received e-mail message from %s with subject `%s'", from, subj ); else if( cnt > 0 ) imcb_log( ic, "Received %d new e-mails", cnt ); |