comparison plugins/msn/msn.c @ 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 d60672672a13
comparison
equal deleted inserted replaced
1568:5a8c66de56b7 1569:446536be85dd
130 130
131 g_strchomp(buf); 131 g_strchomp(buf);
132 132
133 printf("MSN ==> %s\n", buf); 133 printf("MSN ==> %s\n", buf);
134 134
135 /* Check to see what was just sent back to us. We should be seeing a VER tag. */ 135 if (!strncmp("NLN ", buf, 4) || !strncmp("ILN ", buf, 4))
136 if (!strncmp("LST ", buf, 4)) 136 {
137 int status;
138 int query;
139 char **res;
140
141 res = g_strsplit(buf, " ", 0);
142
143 if (!strcmp(res[0], "NLN"))
144 query = 1;
145 else
146 query = 2;
147
148 if (!strcasecmp(res[query], "NLN"))
149 status = UC_NORMAL;
150 else if (!strcasecmp(res[query], "BSY"))
151 status = UC_NORMAL | (MSN_BUSY << 5);
152 else if (!strcasecmp(res[query], "IDL"))
153 status = UC_NORMAL | (MSN_IDLE << 5);
154 else if (!strcasecmp(res[query], "BRB"))
155 status = UC_NORMAL | (MSN_BRB << 5);
156 else if (!strcasecmp(res[query], "AWY"))
157 status = UC_UNAVAILABLE;
158 else if (!strcasecmp(res[query], "PHN"))
159 status = UC_NORMAL | (MSN_PHONE << 5);
160 else if (!strcasecmp(res[query], "LUN"))
161 status = UC_NORMAL | (MSN_LUNCH << 5);
162 else
163 status = UC_NORMAL;
164
165 serv_got_update(gc, res[query+1], 1, 0, 0, 0, status, 0);
166
167 g_strfreev(res);
168
169 return;
170
171 }
172 else if (!strncmp("LST ", buf, 4))
137 { 173 {
138 char **res; 174 char **res;
139 175
140 res = g_strsplit(buf, " ", 0); 176 res = g_strsplit(buf, " ", 0);
141 177