Changes in irc_im.c [b1af3e8:badd148]
Legend:
- Unmodified
- Added
- Removed
-
irc_im.c
rb1af3e8 rbadd148 451 451 irc_channel_t *ic = c->ui_data; 452 452 453 if( ic == NULL )454 return FALSE;455 456 453 if( ic->flags & IRC_CHANNEL_JOINED ) 457 454 irc_channel_printf( ic, "Cleaning up channel, bye!" ); … … 466 463 { 467 464 irc_channel_t *ic = c->ui_data; 468 469 if( ic == NULL )470 return FALSE;471 465 472 466 irc_channel_printf( ic, "%s", text ); … … 482 476 char *ts = NULL; 483 477 484 if( ic == NULL )485 return FALSE;486 487 478 if( sent_at > 0 && set_getbool( &bee->set, "display_timestamps" ) ) 488 479 ts = irc_format_timestamp( irc, sent_at ); … … 497 488 { 498 489 irc_t *irc = bee->ui_data; 499 irc_channel_t *ic = c->ui_data; 500 501 if( ic == NULL ) 502 return FALSE; 503 504 irc_channel_add_user( ic, bu == bee->user ? irc->user : bu->ui_data ); 490 491 irc_channel_add_user( c->ui_data, bu == bee->user ? irc->user : bu->ui_data ); 505 492 506 493 return TRUE; … … 510 497 { 511 498 irc_t *irc = bee->ui_data; 512 irc_channel_t *ic = c->ui_data;513 514 if( ic == NULL )515 return FALSE;516 499 517 500 /* TODO: Possible bug here: If a module removes $user here instead of just 518 501 using imcb_chat_free() and the channel was IRC_CHANNEL_TEMP, we get into 519 502 a broken state around here. */ 520 irc_channel_del_user( ic, bu == bee->user ? irc->user : bu->ui_data, IRC_CDU_PART, NULL );503 irc_channel_del_user( c->ui_data, bu == bee->user ? irc->user : bu->ui_data, IRC_CDU_PART, NULL ); 521 504 522 505 return TRUE; … … 525 508 static gboolean bee_irc_chat_topic( bee_t *bee, struct groupchat *c, const char *new, bee_user_t *bu ) 526 509 { 527 irc_channel_t *ic = c->ui_data;528 510 irc_t *irc = bee->ui_data; 529 511 irc_user_t *iu; 530 531 if( ic == NULL )532 return FALSE;533 512 534 513 if( bu == NULL ) … … 539 518 iu = bu->ui_data; 540 519 541 irc_channel_set_topic( ic, new, iu );520 irc_channel_set_topic( c->ui_data, new, iu ); 542 521 543 522 return TRUE; … … 549 528 irc_channel_t *ic = c->ui_data, *oic; 550 529 char stripped[MAX_NICK_LENGTH+1], *full_name; 551 552 if( ic == NULL )553 return FALSE;554 530 555 531 /* Don't rename a channel if the user's in it already. */ … … 810 786 static gboolean bee_irc_channel_free( irc_channel_t *ic ) 811 787 { 812 struct groupchat *c = ic->data;813 814 788 set_del( &ic->set, "account" ); 815 789 set_del( &ic->set, "chat_type" ); … … 819 793 820 794 ic->flags &= ~IRC_CHANNEL_TEMP; 821 822 /* That one still points at this channel. Don't. */823 if( c )824 c->ui_data = NULL;825 795 826 796 return TRUE;
Note: See TracChangeset
for help on using the changeset viewer.