diff options
Diffstat (limited to 'protocols/msn')
-rw-r--r-- | protocols/msn/msn.c | 10 | ||||
-rw-r--r-- | protocols/msn/ns.c | 9 |
2 files changed, 13 insertions, 6 deletions
diff --git a/protocols/msn/msn.c b/protocols/msn/msn.c index 4acff23a..8d3e7787 100644 --- a/protocols/msn/msn.c +++ b/protocols/msn/msn.c @@ -45,7 +45,11 @@ static void msn_init(account_t *acc) s = set_add(&acc->set, "port", MSN_NS_PORT, set_eval_int, acc); s->flags |= ACC_SET_OFFLINE_ONLY; - set_add(&acc->set, "mail_notifications", "false", set_eval_bool, acc); + s = set_add(&acc->set, "mail_notifications", "false", set_eval_bool, acc); + s->flags |= ACC_SET_OFFLINE_ONLY; + + s = set_add(&acc->set, "mail_notifications_handle", NULL, NULL, acc); + s->flags |= ACC_SET_OFFLINE_ONLY | SET_NULL_OK; acc->flags |= ACC_FLAG_AWAY_MESSAGE | ACC_FLAG_STATUS_MESSAGE | ACC_FLAG_HANDLE_DOMAINS; @@ -81,6 +85,10 @@ static void msn_login(account_t *acc) imcb_log(ic, "Connecting"); msn_ns_connect(ic, server, set_getint(&ic->acc->set, "port")); + + if (set_getbool(&acc->set, "mail_notifications") && set_getstr(&acc->set, "mail_notifications_handle")) { + imcb_add_buddy(ic, set_getstr(&acc->set, "mail_notifications_handle"), NULL); + } } static void msn_logout(struct im_connection *ic) diff --git a/protocols/msn/ns.c b/protocols/msn/ns.c index ab92f30d..766c31e1 100644 --- a/protocols/msn/ns.c +++ b/protocols/msn/ns.c @@ -393,9 +393,9 @@ int msn_ns_message(struct msn_data *md, char *msg, int msglen, char **cmd, int n char *folders = get_rfc822_header(body, "Folders-Unread:", blen); if (inbox && folders) { - imcb_log(ic, - "INBOX contains %s new messages, plus %s messages in other folders.", inbox, - folders); + imcb_notify_email(ic, + "INBOX contains %s new messages, plus %s messages in other folders.", inbox, + folders); } g_free(inbox); @@ -407,8 +407,7 @@ int msn_ns_message(struct msn_data *md, char *msg, int msglen, char **cmd, int n char *fromname = get_rfc822_header(body, "From:", blen); if (from && fromname) { - imcb_log(ic, "Received an e-mail message from %s <%s>.", fromname, - from); + imcb_notify_email(ic, "Received an e-mail message from %s <%s>.", fromname, from); } g_free(from); |