Changeset 703f0f7 for commands.c
- Timestamp:
- 2005-12-14T01:17:25Z (19 years ago)
- Branches:
- master
- Children:
- 547f937
- Parents:
- 22bf64e (diff), 568aaf7 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
commands.c
r22bf64e r703f0f7 166 166 if( g_strcasecmp( cmd[1], "add" ) == 0 ) 167 167 { 168 int prot;168 struct prpl *prpl; 169 169 170 170 if( cmd[2] == NULL || cmd[3] == NULL || cmd[4] == NULL ) … … 174 174 } 175 175 176 for( prot = 0; prot < PROTO_MAX; prot ++ ) 177 if( proto_name[prot] && *proto_name[prot] && g_strcasecmp( proto_name[prot], cmd[2] ) == 0 ) 178 break; 179 180 if( ( prot == PROTO_MAX ) || ( proto_prpl[prot] == NULL ) ) 176 prpl = find_protocol(cmd[2]); 177 178 if( prpl == NULL ) 181 179 { 182 180 irc_usermsg( irc, "Unknown protocol" ); … … 184 182 } 185 183 186 if( prot == PROTO_OSCAR && cmd[5] == NULL ) 187 { 188 irc_usermsg( irc, "Not enough parameters" ); 189 return( 0 ); 190 } 191 192 a = account_add( irc, prot, cmd[3], cmd[4] ); 184 a = account_add( irc, prpl, cmd[3], cmd[4] ); 193 185 194 186 if( cmd[5] ) … … 234 226 con = ""; 235 227 236 if( a->protocol == PROTO_OSCAR || a->protocol == PROTO_ICQ || a->protocol == PROTO_TOC ) 237 irc_usermsg( irc, "%2d. OSCAR, %s on %s%s", i, a->user, a->server, con ); 238 else 239 irc_usermsg( irc, "%2d. %s, %s%s", i, proto_name[a->protocol], a->user, con ); 228 irc_usermsg( irc, "%2d. %s, %s%s", i, a->prpl->name, a->user, con ); 240 229 241 230 i ++; … … 354 343 else 355 344 { 356 nick_set( irc, cmd[2], a->gc->pr otocol, cmd[3] );345 nick_set( irc, cmd[2], a->gc->prpl, cmd[3] ); 357 346 } 358 347 } … … 435 424 else if( u->send_handler == buddy_send_handler ) 436 425 { 437 nick_set( irc, u->handle, u->gc->pr otocol, cmd[2] );426 nick_set( irc, u->handle, u->gc->prpl, cmd[2] ); 438 427 } 439 428 … … 646 635 if( online == 1 ) for( u = irc->users; u; u = u->next ) if( u->gc && u->online && !u->away ) 647 636 { 648 g_snprintf( s, 63, "%s@%s (%s)", u->user, u->host, proto_name[u->gc->user->protocol]);637 g_snprintf( s, 63, "%s@%s (%s)", u->user, u->host, u->gc->user->prpl->name ); 649 638 irc_usermsg( irc, "%-16.16s %-40.40s %s", u->nick, s, "Online" ); 650 639 n_online ++; … … 653 642 if( away == 1 ) for( u = irc->users; u; u = u->next ) if( u->gc && u->online && u->away ) 654 643 { 655 g_snprintf( s, 63, "%s@%s (%s)", u->user, u->host, proto_name[u->gc->user->protocol]);644 g_snprintf( s, 63, "%s@%s (%s)", u->user, u->host, u->gc->user->prpl->name ); 656 645 irc_usermsg( irc, "%-16.16s %-40.40s %s", u->nick, s, u->away ); 657 646 n_away ++; … … 660 649 if( offline == 1 ) for( u = irc->users; u; u = u->next ) if( u->gc && !u->online ) 661 650 { 662 g_snprintf( s, 63, "%s@%s (%s)", u->user, u->host, proto_name[u->gc->user->protocol]);651 g_snprintf( s, 63, "%s@%s (%s)", u->user, u->host, u->gc->user->prpl->name ); 663 652 irc_usermsg( irc, "%-16.16s %-40.40s %s", u->nick, s, "Offline" ); 664 653 n_offline ++; … … 721 710 for( num = 0; q; q = q->next, num ++ ) 722 711 if( q->gc ) /* Not necessary yet, but it might come later */ 723 irc_usermsg( irc, "%d, %s(%s): %s", num, proto_name[q->gc->protocol], q->gc->username, q->question );712 irc_usermsg( irc, "%d, %s(%s): %s", num, q->gc->prpl->name, q->gc->username, q->question ); 724 713 else 725 714 irc_usermsg( irc, "%d, BitlBee: %s", num, q->question ); … … 769 758 for( n = gc->irc->nicks; n; n = n->next ) 770 759 { 771 if( n->proto == gc->pr otocol && !user_findhandle( gc, n->handle ) )760 if( n->proto == gc->prpl && !user_findhandle( gc, n->handle ) ) 772 761 { 773 762 gc->prpl->add_buddy( gc, n->handle );
Note: See TracChangeset
for help on using the changeset viewer.