diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2008-01-05 21:15:32 +0000 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2008-01-05 21:15:32 +0000 |
commit | 1febf5c93b231942cd9cac8ac6a5a0d830c581cc (patch) | |
tree | b9ab00aa08457cbf0b91301f712d8b3af1f601e4 /protocols/yahoo/yahoo.c | |
parent | 6e68a52f92dea3a75ad4daad4867f9542506deae (diff) |
Added "mail_notifications" setting. Who needs those notifications anyway?
Closes: #338.
Diffstat (limited to 'protocols/yahoo/yahoo.c')
-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 ); |