diff options
author | dequis <dx@dxzone.com.ar> | 2014-12-06 14:58:35 -0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2014-12-06 14:58:35 -0300 |
commit | bc7a0d46e36a819755ca3f2b38194fb11eca0dd9 (patch) | |
tree | 6c29e31eef8252c8bfdac05f19000b6251131ce7 | |
parent | 7233f68b3d99c447d4f0cd855b179b9079383bb2 (diff) |
msn: configurable notification server host/port
-rw-r--r-- | protocols/msn/msn.c | 10 | ||||
-rw-r--r-- | protocols/msn/msn.h | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/protocols/msn/msn.c b/protocols/msn/msn.c index ad01ca24..ea38b379 100644 --- a/protocols/msn/msn.c +++ b/protocols/msn/msn.c @@ -40,6 +40,12 @@ static void msn_init( account_t *acc ) s = set_add( &acc->set, "display_name", NULL, set_eval_display_name, acc ); s->flags |= SET_NOSAVE | ACC_SET_ONLINE_ONLY; + s = set_add( &acc->set, "server", MSN_NS_HOST, set_eval_account, acc ); + s->flags |= SET_NOSAVE | ACC_SET_OFFLINE_ONLY; + + 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 ); set_add( &acc->set, "switchboard_keepalives", "false", set_eval_bool, acc ); @@ -70,7 +76,9 @@ static void msn_login( account_t *acc ) msn_connections = g_slist_prepend( msn_connections, ic ); imcb_log( ic, "Connecting" ); - msn_ns_connect( ic, md->ns, MSN_NS_HOST, MSN_NS_PORT ); + msn_ns_connect( ic, md->ns, + set_getstr( &ic->acc->set, "server" ), + set_getint( &ic->acc->set, "port" ) ); } static void msn_logout( struct im_connection *ic ) diff --git a/protocols/msn/msn.h b/protocols/msn/msn.h index eb5f7dd8..cb50c6c2 100644 --- a/protocols/msn/msn.h +++ b/protocols/msn/msn.h @@ -45,7 +45,7 @@ */ #define MSN_NS_HOST "messenger.hotmail.com" -#define MSN_NS_PORT 1863 +#define MSN_NS_PORT "1863" /* Some other version. #define MSNP11_PROD_KEY "O4BG@C7BWLYQX?5G" |