Mercurial > pidgin
changeset 1569:446536be85dd
[gaim-migrate @ 1579]
Plugin tells you when people are online.
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Wed, 14 Mar 2001 06:47:46 +0000 |
parents | 5a8c66de56b7 |
children | 4a47a459cc98 |
files | plugins/msn/msn.c |
diffstat | 1 files changed, 38 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/msn/msn.c Wed Mar 14 06:31:01 2001 +0000 +++ b/plugins/msn/msn.c Wed Mar 14 06:47:46 2001 +0000 @@ -132,8 +132,44 @@ printf("MSN ==> %s\n", buf); - /* Check to see what was just sent back to us. We should be seeing a VER tag. */ - if (!strncmp("LST ", buf, 4)) + if (!strncmp("NLN ", buf, 4) || !strncmp("ILN ", buf, 4)) + { + int status; + int query; + char **res; + + res = g_strsplit(buf, " ", 0); + + if (!strcmp(res[0], "NLN")) + 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("LST ", buf, 4)) { char **res;