Changeset 6c2404e for root_commands.c


Ignore:
Timestamp:
2010-07-06T21:44:52Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
0b09da0
Parents:
006a84f
Message:

First part of the handshake, including sending a file descriptor to the
IPC master.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • root_commands.c

    r006a84f r6c2404e  
    105105{
    106106        storage_status_t status;
    107         char *account_on[] = { "account", "on", NULL };
    108107        gboolean load = TRUE;
    109108        char *password = cmd[1];
     
    158157                irc_umode_set( irc, "+R", 1 );
    159158                irc_channel_auto_joins( irc, NULL );
    160                 if( load && set_getbool( &irc->b->set, "auto_connect" ) )
    161                         cmd_account( irc, account_on );
     159               
     160                if( ipc_child_identify( irc ) )
     161                {
     162                        if( load && set_getbool( &irc->b->set, "auto_connect" ) )
     163                                irc->login_source_id = b_timeout_add( 200,
     164                                        cmd_identify_finish, irc );
     165                }
     166                else if( load && set_getbool( &irc->b->set, "auto_connect" ) )
     167                        cmd_identify_finish( irc, 0, 0 );
     168               
    162169                break;
    163170        case STORAGE_OTHER_ERROR:
     
    166173                break;
    167174        }
     175}
     176
     177gboolean cmd_identify_finish( gpointer data, gint fd, b_input_condition cond )
     178{
     179        char *account_on[] = { "account", "on", NULL };
     180        irc_t *irc = data;
     181       
     182        cmd_account( irc, account_on );
     183       
     184        return FALSE;
    168185}
    169186
     
    672689        else if( iu == irc->user )
    673690        {
    674                 irc_usermsg( irc, "Nick `%s' can't be changed", cmd[1] );
     691                irc_usermsg( irc, "Use /nick to change your own nickname" );
    675692        }
    676693        else if( !nick_ok( cmd[2] ) )
Note: See TracChangeset for help on using the changeset viewer.