From a6b00fcae9af439133a342741e80463db994d620 Mon Sep 17 00:00:00 2001 From: dequis Date: Sat, 28 Feb 2015 20:15:56 -0300 Subject: Disable msn by default :( I didn't want to do the next release with a broken msn, but... gotta be realistic. Also featuring shameless plug. --- protocols/msn/msn.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'protocols') diff --git a/protocols/msn/msn.c b/protocols/msn/msn.c index cb3f842c..1f2dfe3e 100644 --- a/protocols/msn/msn.c +++ b/protocols/msn/msn.c @@ -40,7 +40,7 @@ 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 = set_add(&acc->set, "server", NULL, 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); @@ -57,10 +57,19 @@ static void msn_login(account_t *acc) { struct im_connection *ic = imcb_new(acc); struct msn_data *md = g_new0(struct msn_data, 1); + char *server = set_getstr(&ic->acc->set, "server"); ic->proto_data = md; ic->flags |= OPT_PONGS | OPT_PONGED; + if (!server) { + imcb_error(ic, "The msn protocol is disabled in this version because most servers disabled MSNP18 over port 1863."); + imcb_error(ic, "If you find a working server, you can change the 'server' setting of this account. Good luck!"); + imcb_error(ic, "See also: http://ismsndeadyet.com/"); // shameless plug + imc_logout(ic, FALSE); + return; + } + if (strchr(acc->user, '@') == NULL) { imcb_error(ic, "Invalid account name"); imc_logout(ic, FALSE); @@ -75,8 +84,7 @@ 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, - set_getstr(&ic->acc->set, "server"), + msn_ns_connect(ic, md->ns, server, set_getint(&ic->acc->set, "port")); } -- cgit v1.2.3