comparison src/protocols/irc/irc.c @ 4416:8e62cee6d738

[gaim-migrate @ 4689] The "Invalid Parameter" message is no longer given when logging onto IRC without any IRC buddies on your list. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sun, 26 Jan 2003 01:39:46 +0000
parents dcc6c130c6d9
children 2fd80799d8f4
comparison
equal deleted inserted replaced
4415:c90039137172 4416:8e62cee6d738
631 { 631 {
632 struct gaim_connection *gc = data; 632 struct gaim_connection *gc = data;
633 struct irc_data *id = gc->proto_data; 633 struct irc_data *id = gc->proto_data;
634 char buf[500]; 634 char buf[500];
635 int n = g_snprintf(buf, sizeof(buf), "ISON"); 635 int n = g_snprintf(buf, sizeof(buf), "ISON");
636 gboolean found = FALSE;
636 637
637 GSList *gr = groups; 638 GSList *gr = groups;
638 if (!gr || id->bc) 639 if (!gr || id->bc)
639 return TRUE; 640 return TRUE;
640 641
649 irc_write(id->fd, buf, n); 650 irc_write(id->fd, buf, n);
650 id->bc++; 651 id->bc++;
651 n = g_snprintf(buf, sizeof(buf), "ISON"); 652 n = g_snprintf(buf, sizeof(buf), "ISON");
652 } 653 }
653 n += g_snprintf(buf + n, sizeof(buf) - n, " %s", b->name); 654 n += g_snprintf(buf + n, sizeof(buf) - n, " %s", b->name);
655
656 found = TRUE;
654 } 657 }
655 m = m->next; 658 m = m->next;
656 } 659 }
657 gr = gr->next; 660 gr = gr->next;
658 } 661 }
659 g_snprintf(buf + n, sizeof(buf) - n, "\r\n"); 662
660 irc_write(id->fd, buf, strlen(buf)); 663 if (found) {
661 id->bc++; 664 g_snprintf(buf + n, sizeof(buf) - n, "\r\n");
665 irc_write(id->fd, buf, strlen(buf));
666 id->bc++;
667 }
668
662 return TRUE; 669 return TRUE;
663 } 670 }
664 671
665 static void 672 static void
666 handle_names(struct gaim_connection *gc, char *chan, char *names) 673 handle_names(struct gaim_connection *gc, char *chan, char *names)