diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2008-09-07 15:34:50 +0100 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2008-09-07 15:34:50 +0100 | 
| commit | ced1e17474366772791186f865bd45d4decfcaf2 (patch) | |
| tree | 3461a801f9f6df2f084d1fa3a015cf4401f36d20 /storage_text.c | |
| parent | d4810dff26f128061d122cf120e1e0174d9df1f2 (diff) | |
| parent | ba3a8a578430418050a7fda3c949d65434b23cb3 (diff) | |
Merging BitlBee 1.2.3 release.
Diffstat (limited to 'storage_text.c')
| -rw-r--r-- | storage_text.c | 13 | 
1 files changed, 3 insertions, 10 deletions
| diff --git a/storage_text.c b/storage_text.c index 78f7e3bd..8ce4edcf 100644 --- a/storage_text.c +++ b/storage_text.c @@ -43,7 +43,7 @@ static void text_init (void)  	   it's read only! */  } -static storage_status_t text_load ( const char *my_nick, const char* password, irc_t *irc ) +static storage_status_t text_load( irc_t *irc, const char* password )  {  	char s[512];  	char *line; @@ -53,10 +53,7 @@ static storage_status_t text_load ( const char *my_nick, const char* password, i  	user_t *ru = user_find( irc, ROOT_NICK );  	account_t *acc, *acc_lookup[9]; -	if( irc->status & USTATUS_IDENTIFIED ) -		return( 1 ); -	 -	g_snprintf( s, 511, "%s%s%s", global.conf->configdir, my_nick, ".accounts" ); +	g_snprintf( s, 511, "%s%s%s", global.conf->configdir, irc->nick, ".accounts" );     	fp = fopen( s, "r" );     	if( !fp ) return STORAGE_NO_SUCH_USER; @@ -68,10 +65,6 @@ static storage_status_t text_load ( const char *my_nick, const char* password, i  		return STORAGE_INVALID_PASSWORD;  	} -	/* Do this now. If the user runs with AuthMode = Registered, the -	   account command will not work otherwise. */ -	irc->status |= USTATUS_IDENTIFIED; -	  	while( fscanf( fp, "%511[^\n]s", s ) > 0 )  	{  		fgetc( fp ); @@ -100,7 +93,7 @@ static storage_status_t text_load ( const char *my_nick, const char* password, i  			acc_lookup[8] = acc;  	} -	g_snprintf( s, 511, "%s%s%s", global.conf->configdir, my_nick, ".nicks" ); +	g_snprintf( s, 511, "%s%s%s", global.conf->configdir, irc->nick, ".nicks" );  	fp = fopen( s, "r" );  	if( !fp ) return STORAGE_NO_SUCH_USER;  	while( fscanf( fp, "%s %d %s", s, &proto, nick ) > 0 ) | 
