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