comparison src/buddy.c @ 1155:f4d4a14752ee

[gaim-migrate @ 1165] Heres the rest of the BP crap. committer: Tailor Script <tailor@pidgin.im>
author Rob Flynn <gaim@robflynn.com>
date Tue, 28 Nov 2000 10:20:23 +0000
parents aa3dda7fc352
children 27c528068f28
comparison
equal deleted inserted replaced
1154:938d9cd76148 1155:f4d4a14752ee
1302 { 1302 {
1303 char *who; 1303 char *who;
1304 1304
1305 struct buddy_pounce *b; 1305 struct buddy_pounce *b;
1306 struct conversation *c; 1306 struct conversation *c;
1307 struct aim_user *u;
1307 1308
1308 GList *bp = buddy_pounces; 1309 GList *bp = buddy_pounces;
1309 1310
1310 who = g_strdup(normalize(name)); 1311 who = g_strdup(normalize(name));
1311 1312
1312 /* FIXME: we should decide somewhere who we're pouncing as */
1313 while(bp) { 1313 while(bp) {
1314 b = (struct buddy_pounce *)bp->data;; 1314 b = (struct buddy_pounce *)bp->data;
1315 bp = bp->next; /* increment the list here because rem_bp can make our handle bad */ 1315 bp = bp->next; /* increment the list here because rem_bp can make our handle bad */
1316 1316
1317 if (!strcasecmp(who, normalize(b->name))) { 1317 u = find_user(b->pouncer, b->protocol); /* find our user */
1318 if (u == NULL) continue;
1319
1320 if (!strcasecmp(who, normalize(b->name))) { /* find someone to pounce */
1321 /* check and see if we're signed on as the pouncer */
1322
1323 if (u->gc == NULL) continue;
1324
1318 if (b->popup == 1) 1325 if (b->popup == 1)
1319 { 1326 {
1320 c = find_conversation(name); 1327 c = find_conversation(name);
1321 if (c == NULL) 1328 if (c == NULL)
1322 c = new_conversation(name); 1329 c = new_conversation(name);
1326 c = find_conversation(name); 1333 c = find_conversation(name);
1327 if (c == NULL) 1334 if (c == NULL)
1328 c = new_conversation(name); 1335 c = new_conversation(name);
1329 1336
1330 write_to_conv(c, b->message, WFLAG_SEND, NULL); 1337 write_to_conv(c, b->message, WFLAG_SEND, NULL);
1331 1338 serv_send_im(u->gc, name, b->message, 0);
1332 serv_send_im(c->gc, name, b->message, 0);
1333 } 1339 }
1334 1340
1335 rem_bp(NULL, b); 1341 rem_bp(NULL, b);
1336 1342
1337 } 1343 }