Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • storage_text.c

    reeb85a8 r3183c21  
    2727#include "bitlbee.h"
    2828#include "crypting.h"
     29#ifdef _WIN32
     30# define umask _umask
     31# define mode_t int
     32#endif
     33
     34#ifndef F_OK
     35#define F_OK 0
     36#endif
    2937
    3038static void text_init (void)
     
    3644}
    3745
    38 static storage_status_t text_load ( const char *my_nick, const char* password, irc_t *irc )
     46static storage_status_t text_load( irc_t *irc, const char* password )
    3947{
    4048        char s[512];
     
    4654        account_t *acc, *acc_lookup[9];
    4755       
    48         if( irc->status & USTATUS_IDENTIFIED )
    49                 return( 1 );
    50        
    51         g_snprintf( s, 511, "%s%s%s", global.conf->configdir, my_nick, ".accounts" );
     56        g_snprintf( s, 511, "%s%s%s", global.conf->configdir, irc->nick, ".accounts" );
    5257        fp = fopen( s, "r" );
    5358        if( !fp ) return STORAGE_NO_SUCH_USER;
     
    6065                return STORAGE_INVALID_PASSWORD;
    6166        }
    62        
    63         /* Do this now. If the user runs with AuthMode = Registered, the
    64            account command will not work otherwise. */
    65         irc->status |= USTATUS_IDENTIFIED;
    6667       
    6768        while( fscanf( fp, "%511[^\n]s", s ) > 0 )
     
    9394        }
    9495       
    95         g_snprintf( s, 511, "%s%s%s", global.conf->configdir, my_nick, ".nicks" );
     96        g_snprintf( s, 511, "%s%s%s", global.conf->configdir, irc->nick, ".nicks" );
    9697        fp = fopen( s, "r" );
    9798        if( !fp ) return STORAGE_NO_SUCH_USER;
Note: See TracChangeset for help on using the changeset viewer.