comparison src/protocols/zephyr/zephyr.c @ 4687:283fb289c510

[gaim-migrate @ 4998] This is a new buddy list. Lots of things about it just Don't Work. I probably already know about those things, and you'd just be wasting my time in submitting a bug report about it. I decided that instead of getting it to all work perfectly before committing, that I'd get it in cvs, and slowly fix it with regular commits. That way, it's easier to keep track of things, and other developers can help. Plus, I'm getting pissed off at the buddy list and want it to die. It's kinda boring, and doing nothing but the buddy list for such a long time has just gotten me very bitter. After 0.60 is released later this week, Gaim will resume being fun. This week is going to be very stressful, though, I'm sure. Things you ought to know about this buddy list: - It crashes - It leaks - There's no way to edit the buddy list, or access offline buddies - Most of the menus and buttons and whatnot just plain ol' don't work. - Status icons are only implemented for AIM. That's mostly just because I'm lazy. As such, you may want to be wary of updating this. If you do decide to update this, you may want to learn "cvs update -D yesterday" as well :) All the art there is just placeholder art. You probably won't really have as many problems as it sounds like you will from reading this. This message is extra-negative to stress that I don't want to be bothered with complaints about something not working about it :). I'll repeat: If something doesn't work, I probably already know about it. If you want to actually help with something, I'd be delighted to have it. IM me. -s. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Mon, 10 Mar 2003 05:30:31 +0000
parents a4498ce61bf6
children c15e0699acae
comparison
equal deleted inserted replaced
4686:a1de8a9c99ba 4687:283fb289c510
318 char *user; 318 char *user;
319 struct buddy *b; 319 struct buddy *b;
320 320
321 if (ZParseLocations(&notice, NULL, &nlocs, &user) != ZERR_NONE) 321 if (ZParseLocations(&notice, NULL, &nlocs, &user) != ZERR_NONE)
322 return; 322 return;
323 if ((b = find_buddy(zgc->account, user)) == NULL) { 323 if ((b = gaim_find_buddy(zgc->account, user)) == NULL) {
324 char *e = strchr(user, '@'); 324 char *e = strchr(user, '@');
325 if (e) *e = '\0'; 325 if (e) *e = '\0';
326 b = find_buddy(zgc->account, user); 326 b = gaim_find_buddy(zgc->account, user);
327 } 327 }
328 if (!b) { 328 if (!b) {
329 free(user); 329 free(user);
330 return; 330 return;
331 } 331 }
364 g_snprintf(buf, len + 1, "%s", ptr); 364 g_snprintf(buf, len + 1, "%s", ptr);
365 g_strchomp(buf); 365 g_strchomp(buf);
366 buf2 = zephyr_to_html(buf); 366 buf2 = zephyr_to_html(buf);
367 g_free(buf); 367 g_free(buf);
368 if (!g_strcasecmp(notice.z_class, "MESSAGE") && 368 if (!g_strcasecmp(notice.z_class, "MESSAGE") &&
369 !g_strcasecmp(notice.z_class_inst, "PERSONAL")) { 369 !g_strcasecmp(notice.z_class_inst, "PERSONAL")) {
370 if (!g_strcasecmp(notice.z_message, "Automated reply:")) 370 if (!g_strcasecmp(notice.z_message, "Automated reply:"))
371 away = TRUE; 371 away = TRUE;
372 else 372 else
373 away = FALSE; 373 away = FALSE;
374 serv_got_im(zgc, notice.z_sender, buf2, 0, time(NULL), -1); 374 serv_got_im(zgc, notice.z_sender, buf2, 0, time(NULL), -1);
375 } else { 375 } else {
376 zephyr_triple *zt1, *zt2; 376 zephyr_triple *zt1, *zt2;
377 zt1 = new_triple(notice.z_class, notice.z_class_inst, 377 zt1 = new_triple(notice.z_class, notice.z_class_inst,
378 notice.z_recipient); 378 notice.z_recipient);
379 zt2 = find_sub_by_triple(zt1); 379 zt2 = find_sub_by_triple(zt1);
380 if (!zt2) { 380 if (!zt2) {
381 /* we shouldn't be subscribed to this message. ignore. */ 381 /* we shouldn't be subscribed to this message. ignore. */
382 } else { 382 } else {
383 if (!zt2->open) { 383 if (!zt2->open) {
400 } 400 }
401 } else { 401 } else {
402 send_inst = g_strdup_printf("%s %s",sendertmp,notice.z_class_inst); 402 send_inst = g_strdup_printf("%s %s",sendertmp,notice.z_class_inst);
403 } 403 }
404 serv_got_chat_in(zgc, zt2->id, send_inst, FALSE, 404 serv_got_chat_in(zgc, zt2->id, send_inst, FALSE,
405 buf2, time(NULL)); 405 buf2, time(NULL));
406 g_free(sendertmp); 406 g_free(sendertmp);
407 g_free(send_inst); 407 g_free(send_inst);
408 } 408 }
409 free_triple(zt1); 409 free_triple(zt1);
410 } 410 }
567 567
568 static void process_anyone() 568 static void process_anyone()
569 { 569 {
570 FILE *fd; 570 FILE *fd;
571 gchar buff[BUFSIZ], *filename; 571 gchar buff[BUFSIZ], *filename;
572 572 struct group *g = gaim_group_new("Anyone");
573 struct buddy *b;
574
573 filename = g_strconcat(gaim_home_dir(), "/.anyone", NULL); 575 filename = g_strconcat(gaim_home_dir(), "/.anyone", NULL);
574 if ((fd = fopen(filename, "r")) != NULL) { 576 if ((fd = fopen(filename, "r")) != NULL) {
575 while (fgets(buff, BUFSIZ, fd)) { 577 while (fgets(buff, BUFSIZ, fd)) {
576 strip_comments(buff); 578 strip_comments(buff);
577 if (buff[0]) 579 if (buff[0]) {
578 add_buddy(zgc->account, "Anyone", buff, buff); 580 b = gaim_buddy_new(zgc->account, buff, NULL);
581 gaim_blist_add_buddy(b, g, NULL);
582 }
579 } 583 }
580 fclose(fd); 584 fclose(fd);
581 } 585 }
582 g_free(filename); 586 g_free(filename);
583 } 587 }