Mercurial > pidgin.yaz
changeset 1628:bde395f3dbf1
[gaim-migrate @ 1638]
You are my nice friend!! Thank you pokey! YES!
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Thu, 22 Mar 2001 19:31:43 +0000 |
parents | 78ec12439e0a |
children | 51e8f61ce2c6 |
files | ChangeLog plugins/msn/msn.c |
diffstat | 2 files changed, 70 insertions(+), 72 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Thu Mar 22 18:05:52 2001 +0000 +++ b/ChangeLog Thu Mar 22 19:31:43 2001 +0000 @@ -1,5 +1,8 @@ GAIM: The Pimpin' Penguin IM Clone thats good for the soul! +version 0.11.0: + * Fixed a problem with MSN not detecting signoffs and buddy updates. + version 0.11.0-pre7 (03/16/2001): * Can build RPMs as non-root * New yahoo library (can use HTTP proxy)
--- a/plugins/msn/msn.c Thu Mar 22 18:05:52 2001 +0000 +++ b/plugins/msn/msn.c Thu Mar 22 19:31:43 2001 +0000 @@ -252,15 +252,12 @@ g_strchomp(buf); - printf("!!MSN(%d) ==> %s\n", source, buf); - printf("Got here.\n"); + printf("MSN(%d) ==> %s\n", source, buf); if (!strncmp("USR ", buf, 4)) { char **res; - printf("Got here2.\n"); - res = g_strsplit(buf, " ", 0); printf("%s\n",res[2]); if (strcasecmp("OK", res[2])) @@ -359,6 +356,24 @@ return; } + else if (!strncmp("BYE ", buf, 4)) + { + char **res; + struct msn_conn *mc; + + res = g_strsplit(buf, " ", 0); + + mc = find_msn_conn_by_user(res[1]); + + if (mc) + { + /* Looks like we need to close up some stuff :-) */ + free_msn_conn(mc); + } + + g_strfreev(res); + return; + } else if (!strncmp("MSG ", buf, 4)) { /* We are receiving an incoming message */ @@ -516,6 +531,54 @@ return; } + else if (!strncmp("FLN ", buf, 4)) + { + /* Someone signed off */ + char **res; + + res = g_strsplit(buf, " ", 0); + + serv_got_update(gc, res[1], 0, 0, 0, 0, 0, 0); + + g_strfreev(res); + + return; + } + if ( (!strncmp("NLN ", buf, 4)) || (!strncmp("ILN ", buf, 4))) + { + int status; + int query; + char **res; + + res = g_strsplit(buf, " ", 0); + + if (strcasecmp(res[0], "NLN") == 0) + query = 1; + else + query = 2; + + if (!strcasecmp(res[query], "NLN")) + status = UC_NORMAL; + else if (!strcasecmp(res[query], "BSY")) + status = UC_NORMAL | (MSN_BUSY << 5); + else if (!strcasecmp(res[query], "IDL")) + status = UC_NORMAL | (MSN_IDLE << 5); + else if (!strcasecmp(res[query], "BRB")) + status = UC_NORMAL | (MSN_BRB << 5); + else if (!strcasecmp(res[query], "AWY")) + status = UC_UNAVAILABLE; + else if (!strcasecmp(res[query], "PHN")) + status = UC_NORMAL | (MSN_PHONE << 5); + else if (!strcasecmp(res[query], "LUN")) + status = UC_NORMAL | (MSN_LUNCH << 5); + else + status = UC_NORMAL; + + serv_got_update(gc, res[query+1], 1, 0, 0, 0, status, 0); + + g_strfreev(res); + return; + } } @@ -625,75 +688,7 @@ g_strfreev(res); return; } - else if (!strncmp("FLN ", buf, 4)) - { - /* Someone signed off */ - char **res; - res = g_strsplit(buf, " ", 0); - - serv_got_update(gc, res[1], 0, 0, 0, 0, 0, 0); - - g_strfreev(res); - - return; - } - if ( (!strncmp("NLN ", buf, 4)) || (!strncmp("ILN ", buf, 4))) - { - int status; - int query; - char **res; - - res = g_strsplit(buf, " ", 0); - - if (strcasecmp(res[0], "NLN") == 0) - query = 1; - else - query = 2; - - if (!strcasecmp(res[query], "NLN")) - status = UC_NORMAL; - else if (!strcasecmp(res[query], "BSY")) - status = UC_NORMAL | (MSN_BUSY << 5); - else if (!strcasecmp(res[query], "IDL")) - status = UC_NORMAL | (MSN_IDLE << 5); - else if (!strcasecmp(res[query], "BRB")) - status = UC_NORMAL | (MSN_BRB << 5); - else if (!strcasecmp(res[query], "AWY")) - status = UC_UNAVAILABLE; - else if (!strcasecmp(res[query], "PHN")) - status = UC_NORMAL | (MSN_PHONE << 5); - else if (!strcasecmp(res[query], "LUN")) - status = UC_NORMAL | (MSN_LUNCH << 5); - else - status = UC_NORMAL; - - serv_got_update(gc, res[query+1], 1, 0, 0, 0, status, 0); - - g_strfreev(res); - return; - } - - - else if (!strncmp("BYE ", buf, 4)) - { - char **res; - struct msn_conn *mc; - - res = g_strsplit(buf, " ", 0); - - mc = find_msn_conn_by_user(res[1]); - - if (mc) - { - /* Looks like we need to close up some stuff :-) */ - free_msn_conn(mc); - } - - g_strfreev(res); - return; - } - else if (!strncmp("XFR ", buf, 4)) { char **res;