aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--root_commands.c5
-rw-r--r--storage_text.c6
-rw-r--r--storage_xml.c8
3 files changed, 5 insertions, 14 deletions
diff --git a/root_commands.c b/root_commands.c
index e69b9981..47143531 100644
--- a/root_commands.c
+++ b/root_commands.c
@@ -126,9 +126,12 @@ static void cmd_help( irc_t *irc, char **cmd )
}
}
+static void cmd_account( irc_t *irc, char **cmd );
+
static void cmd_identify( irc_t *irc, char **cmd )
{
storage_status_t status = storage_load( irc->nick, cmd[1], irc );
+ char *account_on[] = { "account", "on", NULL };
switch (status) {
case STORAGE_INVALID_PASSWORD:
@@ -140,6 +143,8 @@ static void cmd_identify( irc_t *irc, char **cmd )
case STORAGE_OK:
irc_usermsg( irc, "Password accepted, settings and accounts loaded" );
irc_umode_set( irc, "+R", 1 );
+ if( set_getint( irc, "auto_connect" ) )
+ cmd_account( irc, account_on );
break;
case STORAGE_OTHER_ERROR:
default:
diff --git a/storage_text.c b/storage_text.c
index 506c9f03..06d278aa 100644
--- a/storage_text.c
+++ b/storage_text.c
@@ -116,12 +116,6 @@ static storage_status_t text_load ( const char *my_nick, const char* password, i
}
fclose( fp );
- if( set_getint( irc, "auto_connect" ) )
- {
- strcpy( s, "account on" ); /* Can't do this directly because r_c_s alters the string */
- root_command_string( irc, ru, s, 0 );
- }
-
return STORAGE_OK;
}
diff --git a/storage_xml.c b/storage_xml.c
index 20f3c6a9..cc3498af 100644
--- a/storage_xml.c
+++ b/storage_xml.c
@@ -332,14 +332,6 @@ static storage_status_t xml_load_real( const char *my_nick, const char *password
irc->status |= USTATUS_IDENTIFIED;
- /* TODO: This really shouldn't be here, I think... */
- if( set_getint( irc, "auto_connect" ) )
- {
- /* Can't do this directly because r_c_s alters the string */
- strcpy( buf, "account on" );
- root_command_string( irc, NULL, buf, 0 );
- }
-
return STORAGE_OK;
}