Changeset 9564e55 for root_commands.c
- Timestamp:
- 2010-11-22T13:17:45Z (13 years ago)
- Branches:
- master
- Children:
- bedad20
- Parents:
- 09d4922
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
root_commands.c
r09d4922 r9564e55 394 394 struct prpl *prpl; 395 395 396 MIN_ARGS( 4 ); 396 MIN_ARGS( 3 ); 397 398 if( cmd[4] == NULL ) 399 for( a = irc->b->accounts; a; a = a->next ) 400 if( strcmp( a->pass, PASSWORD_PENDING ) == 0 ) 401 { 402 irc_usermsg( irc, "Enter password for account %s(%s) " 403 "first (use /OPER)", a->prpl->name, a->user ); 404 return; 405 } 397 406 398 407 prpl = find_protocol( cmd[2] ); … … 410 419 "trying to add it twice?", prpl->name, cmd[3] ); 411 420 412 a = account_add( irc->b, prpl, cmd[3], cmd[4] );421 a = account_add( irc->b, prpl, cmd[3], cmd[4] ? cmd[4] : PASSWORD_PENDING ); 413 422 if( cmd[5] ) 414 423 { … … 419 428 420 429 irc_usermsg( irc, "Account successfully added" ); 430 431 if( cmd[4] == NULL ) 432 irc_usermsg( irc, "Now, use /OPER to enter your password for this account" ); 421 433 422 434 return; … … 462 474 for( a = irc->b->accounts; a; a = a->next ) 463 475 if( !a->ic && a->auto_connect ) 464 account_on( irc->b, a ); 476 { 477 if( strcmp( a->pass, PASSWORD_PENDING ) == 0 ) 478 irc_usermsg( irc, "Enter password for account %s(%s) " 479 "first (use /OPER)", a->prpl->name, a->user ); 480 else 481 account_on( irc->b, a ); 482 } 465 483 } 466 484 else … … 520 538 if( a->ic ) 521 539 irc_usermsg( irc, "Account already online" ); 540 else if( strcmp( a->pass, PASSWORD_PENDING ) == 0 ) 541 irc_usermsg( irc, "Enter password for account %s(%s) " 542 "first (use /OPER)", a->prpl->name, a->user ); 522 543 else 523 544 account_on( irc->b, a );
Note: See TracChangeset
for help on using the changeset viewer.