Changeset 0a3c243 for root_commands.c
- Timestamp:
- 2006-06-30T23:18:56Z (18 years ago)
- Branches:
- master
- Children:
- 5100caa
- Parents:
- 5c9512f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
root_commands.c
r5c9512f r0a3c243 400 400 else 401 401 { 402 nick_set( irc, cmd[2], a->gc-> prpl, cmd[3] );402 nick_set( irc, cmd[2], a->gc->acc->prpl, cmd[3] ); 403 403 } 404 404 } … … 407 407 add them to your *real* (server-side) contact list. */ 408 408 if( add_for_real ) 409 a->gc-> prpl->add_buddy( a->gc, cmd[2] );409 a->gc->acc->prpl->add_buddy( a->gc, cmd[2] ); 410 410 411 411 add_buddy( a->gc, NULL, cmd[2], cmd[2] ); … … 441 441 } 442 442 443 if( !gc-> prpl->get_info )443 if( !gc->acc->prpl->get_info ) 444 444 { 445 445 irc_usermsg( irc, "Command `%s' not supported by this protocol", cmd[0] ); … … 447 447 else 448 448 { 449 gc-> prpl->get_info( gc, cmd[2] );449 gc->acc->prpl->get_info( gc, cmd[2] ); 450 450 } 451 451 } … … 482 482 else if( u->send_handler == buddy_send_handler ) 483 483 { 484 nick_set( irc, u->handle, u->gc-> prpl, cmd[2] );484 nick_set( irc, u->handle, u->gc->acc->prpl, cmd[2] ); 485 485 } 486 486 … … 501 501 s = g_strdup( u->handle ); 502 502 503 u->gc-> prpl->remove_buddy( u->gc, u->handle, NULL );503 u->gc->acc->prpl->remove_buddy( u->gc, u->handle, NULL ); 504 504 user_del( irc, cmd[1] ); 505 505 nick_del( irc, cmd[1] ); … … 558 558 } 559 559 560 if( !gc-> prpl->add_deny || !gc->prpl->rem_permit )560 if( !gc->acc->prpl->add_deny || !gc->acc->prpl->rem_permit ) 561 561 { 562 562 irc_usermsg( irc, "Command `%s' not supported by this protocol", cmd[0] ); … … 617 617 } 618 618 619 if( !gc-> prpl->rem_deny || !gc->prpl->add_permit )619 if( !gc->acc->prpl->rem_deny || !gc->acc->prpl->add_permit ) 620 620 { 621 621 irc_usermsg( irc, "Command `%s' not supported by this protocol", cmd[0] ); … … 733 733 if( online == 1 ) 734 734 { 735 g_snprintf( s, sizeof( s ) - 1, "%s@%s (%s)", u->user, u->host, u->gc-> user->prpl->name );735 g_snprintf( s, sizeof( s ) - 1, "%s@%s (%s)", u->user, u->host, u->gc->acc->prpl->name ); 736 736 irc_usermsg( irc, format, u->nick, s, "Online" ); 737 737 } … … 744 744 if( away == 1 ) 745 745 { 746 g_snprintf( s, sizeof( s ) - 1, "%s@%s (%s)", u->user, u->host, u->gc-> user->prpl->name );746 g_snprintf( s, sizeof( s ) - 1, "%s@%s (%s)", u->user, u->host, u->gc->acc->prpl->name ); 747 747 irc_usermsg( irc, format, u->nick, s, u->away ); 748 748 } … … 754 754 if( offline == 1 ) 755 755 { 756 g_snprintf( s, sizeof( s ) - 1, "%s@%s (%s)", u->user, u->host, u->gc-> user->prpl->name );756 g_snprintf( s, sizeof( s ) - 1, "%s@%s (%s)", u->user, u->host, u->gc->acc->prpl->name ); 757 757 irc_usermsg( irc, format, u->nick, s, "Offline" ); 758 758 } … … 779 779 irc_usermsg( irc, "Your name is `%s'" , a->gc->displayname ? a->gc->displayname : "NULL" ); 780 780 } 781 else if ( !a-> gc->prpl->set_info )781 else if ( !a->prpl->set_info ) 782 782 { 783 783 irc_usermsg( irc, "Command `%s' not supported by this protocol", cmd[0] ); … … 787 787 irc_usermsg( irc, "Setting your name to `%s'", cmd[2] ); 788 788 789 a-> gc->prpl->set_info( a->gc, cmd[2] );789 a->prpl->set_info( a->gc, cmd[2] ); 790 790 } 791 791 } … … 806 806 for( num = 0; q; q = q->next, num ++ ) 807 807 if( q->gc ) /* Not necessary yet, but it might come later */ 808 irc_usermsg( irc, "%d, %s(%s): %s", num, q->gc-> prpl->name, q->gc->username, q->question );808 irc_usermsg( irc, "%d, %s(%s): %s", num, q->gc->acc->prpl->name, q->gc->username, q->question ); 809 809 else 810 810 irc_usermsg( irc, "%d, BitlBee: %s", num, q->question ); … … 834 834 user_t *u; 835 835 836 /* FIXME: Hmmm, this is actually pretty dangerous code... REMOVEME? :-) */ 836 837 for( u = irc->users; u; u = u->next ) 837 838 if( u->gc == gc ) 838 839 { 839 u->gc-> prpl->remove_buddy( u->gc, u->handle, NULL );840 u->gc->acc->prpl->remove_buddy( u->gc, u->handle, NULL ); 840 841 user_del( irc, u->nick ); 841 842 } … … 852 853 for( n = gc->irc->nicks; n; n = n->next ) 853 854 { 854 if( n->proto == gc-> prpl && !user_findhandle( gc, n->handle ) )855 { 856 gc-> prpl->add_buddy( gc, n->handle );855 if( n->proto == gc->acc->prpl && !user_findhandle( gc, n->handle ) ) 856 { 857 gc->acc->prpl->add_buddy( gc, n->handle ); 857 858 add_buddy( gc, NULL, n->handle, NULL ); 858 859 }
Note: See TracChangeset
for help on using the changeset viewer.