Mercurial > pidgin
comparison plugins/irc.c @ 1301:e973ef7a8a87
[gaim-migrate @ 1311]
The IRC plugin works again (when joining channels).
Thanks for breaking it for me, bro :-D
committer: Tailor Script <tailor@pidgin.im>
| author | Rob Flynn <gaim@robflynn.com> |
|---|---|
| date | Tue, 19 Dec 2000 01:29:13 +0000 |
| parents | d8eaf65ca9c3 |
| children | 7f4302f6fd64 |
comparison
equal
deleted
inserted
replaced
| 1300:59f08eb64017 | 1301:e973ef7a8a87 |
|---|---|
| 337 struct irc_data *idata = (struct irc_data *)gc->proto_data; | 337 struct irc_data *idata = (struct irc_data *)gc->proto_data; |
| 338 GSList *bc = gc->buddy_chats; | 338 GSList *bc = gc->buddy_chats; |
| 339 struct conversation *b = NULL; | 339 struct conversation *b = NULL; |
| 340 | 340 |
| 341 while (bc) { | 341 while (bc) { |
| 342 int x; | |
| 342 b = (struct conversation *)bc->data; | 343 b = (struct conversation *)bc->data; |
| 343 | 344 |
| 344 if (g_strcasecmp(name, b->name) == 0) { | 345 if (g_strcasecmp(name, b->name) == 0) { |
| 345 break; | 346 break; |
| 346 } | 347 } |
| 374 return; | 375 return; |
| 375 } | 376 } |
| 376 } while (buf[i++] != '\n'); | 377 } while (buf[i++] != '\n'); |
| 377 | 378 |
| 378 buf[--i] = '\0'; | 379 buf[--i] = '\0'; |
| 380 g_strchomp(buf); | |
| 379 g_print("%s\n", buf); | 381 g_print("%s\n", buf); |
| 380 | 382 |
| 381 /* Check for errors */ | 383 /* Check for errors */ |
| 382 | 384 |
| 383 if (((strstr(buf, "ERROR :") && (!strstr(buf, "PRIVMSG ")) && | 385 if (((strstr(buf, "ERROR :") && (!strstr(buf, "PRIVMSG ")) && |
| 572 | 574 |
| 573 i++; | 575 i++; |
| 574 | 576 |
| 575 strcpy(u_channel, buf + i); | 577 strcpy(u_channel, buf + i); |
| 576 | 578 |
| 579 g_strchomp(u_channel); | |
| 580 | |
| 577 /* Looks like we're going to join the channel for real | 581 /* Looks like we're going to join the channel for real |
| 578 * now. Let's create a valid channel structure and add | 582 * now. Let's create a valid channel structure and add |
| 579 * it to our list. Let's make sure that | 583 * it to our list. Let's make sure that |
| 580 * we are not already in a channel first */ | 584 * we are not already in a channel first */ |
| 581 | 585 |
| 582 channel = find_channel_by_name(gc, u_channel); | 586 channel = find_channel_by_name(gc, u_channel); |
| 583 | 587 |
| 584 if (!channel) { | 588 if (!channel) { |
| 589 | |
| 585 chat_id++; | 590 chat_id++; |
| 586 | 591 |
| 587 channel = g_new0(struct irc_channel, 1); | 592 channel = g_new0(struct irc_channel, 1); |
| 588 | 593 |
| 589 channel->id = chat_id; | 594 channel->id = chat_id; |
