Mercurial > pidgin
changeset 3322:b77edfedc39f
[gaim-migrate @ 3340]
Comment By: Charles (kkrizka)
Date: 2002-05-05 11:29
Message:
Logged In: YES
user_id=535488
i need port for msn
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Mon, 17 Jun 2002 01:04:10 +0000 |
parents | 1a1a4243a12c |
children | 3e6e54051e67 |
files | ChangeLog src/protocols/msn/msn.c src/protocols/napster/napster.c |
diffstat | 3 files changed, 64 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon Jun 17 00:14:51 2002 +0000 +++ b/ChangeLog Mon Jun 17 01:04:10 2002 +0000 @@ -42,6 +42,9 @@ entirely * Gaim can now handle messages from Mac ICQ and Miranda ICQ (Thanks, Mark Doliner) + * Added Mozilla to browser options and changed KFM to + Konqueror. + * Can now set the server and port for MSN and Napster version 0.58 (05/13/2002): * Bulgarian translation added (Thanks, Igel Itzo)
--- a/src/protocols/msn/msn.c Mon Jun 17 00:14:51 2002 +0000 +++ b/src/protocols/msn/msn.c Mon Jun 17 01:04:10 2002 +0000 @@ -85,6 +85,11 @@ #define USEROPT_HOTMAIL 0 +#define USEROPT_MSNSERVER 3 +#define MSN_SERVER "messenger.hotmail.com" +#define USEROPT_MSNPORT 4 +#define MSN_PORT 1863 + #define MSN_TYPING_RECV_TIMEOUT 6 #define MSN_TYPING_SEND_TIMEOUT 4 @@ -1769,8 +1774,10 @@ set_login_progress(gc, 1, _("Connecting")); g_snprintf(gc->username, sizeof(gc->username), "%s", msn_normalize(gc->username)); - - md->fd = proxy_connect("messenger.hotmail.com", 1863, msn_login_connect, gc); + + md->fd = proxy_connect(user->proto_opt[USEROPT_MSNSERVER][0] ? user->proto_opt[USEROPT_MSNSERVER] : MSN_SERVER, + user->proto_opt[USEROPT_MSNPORT][0] ? atoi(user->proto_opt[USEROPT_MSNPORT]) : MSN_PORT, + msn_login_connect, gc); if (md->fd < 0) { hide_login_progress(gc, _("Unable to connect")); signoff(gc); @@ -2388,6 +2395,26 @@ g_free(b->proto_data); } +static GList *msn_user_opts() +{ + GList *m = NULL; + struct proto_user_opt *puo; + + puo = g_new0(struct proto_user_opt, 1); + puo->label = "Server:"; + puo->def = MSN_SERVER; + puo->pos = USEROPT_MSNSERVER; + m = g_list_append(m, puo); + + puo = g_new0(struct proto_user_opt, 1); + puo->label = "Port:"; + puo->def = "1863"; + puo->pos = USEROPT_MSNPORT; + m = g_list_append(m, puo); + + return m; +} + GSList *msn_smiley_list() { GSList *smilies = NULL; @@ -2523,6 +2550,7 @@ ret->rem_deny = msn_rem_deny; ret->buddy_free = msn_buddy_free; ret->smiley_list = msn_smiley_list; + ret->user_opts = msn_user_opts; my_protocol = ret; }
--- a/src/protocols/napster/napster.c Mon Jun 17 00:14:51 2002 +0000 +++ b/src/protocols/napster/napster.c Mon Jun 17 01:04:10 2002 +0000 @@ -1,7 +1,7 @@ /* * gaim - Napster Protocol Plugin * - * Copyright (C) 2000-2001, Rob Flynn <rob@tgflinux.com> + * Copyright (C) 2000-2001, Rob Flynn <rob@marko.net> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -41,6 +41,11 @@ #define NAP_BUF_LEN 4096 +#define USEROPT_NAPSERVER 3 +#define NAP_SERVER "64.124.41.187" +#define USEROPT_NAPPORT 4 +#define NAP_PORT 8888 + GSList *nap_connections = NULL; static unsigned int chat_id = 0; @@ -434,7 +439,9 @@ struct gaim_connection *gc = new_gaim_conn(user); struct nap_data *ndata = gc->proto_data = g_new0(struct nap_data, 1); - ndata->fd = proxy_connect("64.124.41.187", 8888, nap_login_connect, gc); + ndata->fd = proxy_connect(user->proto_opt[USEROPT_NAPSERVER][0] ? user->proto_opt[USEROPT_NAPSERVER] : NAP_SERVER, + user->proto_opt[USEROPT_NAPPORT][0] ? atoi(user->proto_opt[USEROPT_NAPPORT]) : NAP_PORT, + nap_login_connect, gc); if (ndata->fd < 0) { hide_login_progress(gc, "Unable to connect"); signoff(gc); @@ -543,6 +550,27 @@ } } + +static GList *nap_user_opts() +{ + GList *m = NULL; + struct proto_user_opt *puo; + + puo = g_new0(struct proto_user_opt, 1); + puo->label = "Server:"; + puo->def = NAP_SERVER; + puo->pos = USEROPT_NAPSERVER; + m = g_list_append(m, puo); + + puo = g_new0(struct proto_user_opt, 1); + puo->label = "Port:"; + puo->def = "8888"; + puo->pos = USEROPT_NAPPORT; + m = g_list_append(m, puo); + + return m; +} + static char** nap_list_icon(int uc) { return napster_xpm; @@ -555,7 +583,7 @@ ret->protocol = PROTO_NAPSTER; ret->name = nap_name; ret->list_icon = nap_list_icon; - ret->user_opts = NULL; + ret->user_opts = nap_user_opts; ret->login = nap_login; ret->close = nap_close; ret->send_im = nap_send_im;