Changeset 1febf5c


Ignore:
Timestamp:
2008-01-05T21:15:32Z (11 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
46dca11
Parents:
6e68a52
Message:

Added "mail_notifications" setting. Who needs those notifications anyway?
Closes: #338.

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • doc/user-guide/commands.xml

    r6e68a52 r1febf5c  
    475475        </bitlbee-setting>
    476476
     477        <bitlbee-setting name="mail_notifications" type="boolean" scope="account">
     478                <default>false</default>
     479
     480                <description>
     481                        <para>
     482                                Some protocols (MSN, Yahoo!) can notify via IM about new e-mail. Since most people use their Hotmail/Yahoo! addresses as a spam-box, this is disabled default. If you want these notifications, you can enable this setting.
     483                        </para>
     484                </description>
     485
     486        </bitlbee-setting>
     487
    477488        <bitlbee-setting name="ops" type="string" scope="global">
    478489                <default>both</default>
  • protocols/msn/msn.c

    r6e68a52 r1febf5c  
    3535        s = set_add( &acc->set, "display_name", NULL, msn_set_display_name, acc );
    3636        s->flags |= ACC_SET_NOSAVE | ACC_SET_ONLINE_ONLY;
     37
     38        s = set_add( &acc->set, "mail_notifications", "false", set_eval_bool, acc );
    3739}
    3840
  • protocols/msn/ns.c

    r6e68a52 r1febf5c  
    643643                                char *folders = msn_findheader( body, "Folders-Unread:", blen );
    644644                               
    645                                 if( inbox && folders )
     645                                if( inbox && folders && set_getbool( &ic->acc->set, "mail_notifications" ) )
    646646                                {
    647647                                        imcb_log( ic, "INBOX contains %s new messages, plus %s messages in other folders.", inbox, folders );
     
    653653                                char *fromname = msn_findheader( body, "From:", blen );
    654654                               
    655                                 if( from && fromname )
     655                                if( from && fromname && set_getbool( &ic->acc->set, "mail_notifications" ) )
    656656                                {
    657657                                        imcb_log( ic, "Received an e-mail message from %s <%s>.", fromname, from );
  • protocols/yahoo/yahoo.c

    r6e68a52 r1febf5c  
    125125       
    126126        return( g_strndup( in, len ) );
     127}
     128
     129static void byahoo_init( account_t *acc )
     130{
     131        set_add( &acc->set, "mail_notifications", "false", set_eval_bool, acc );
    127132}
    128133
     
    349354        struct prpl *ret = g_new0(struct prpl, 1);
    350355        ret->name = "yahoo";
     356        ret->init = byahoo_init;
    351357       
    352358        ret->login = byahoo_login;
     
    923929        struct im_connection *ic = byahoo_get_ic_by_id( id );
    924930       
    925         if( from && subj )
     931        if( !set_getbool( &ic->acc->set, "mail_notifications" ) )
     932                ; /* The user doesn't care. */
     933        else if( from && subj )
    926934                imcb_log( ic, "Received e-mail message from %s with subject `%s'", from, subj );
    927935        else if( cnt > 0 )
Note: See TracChangeset for help on using the changeset viewer.