Changes in storage_text.c [eeb85a8:3183c21]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
storage_text.c
reeb85a8 r3183c21 27 27 #include "bitlbee.h" 28 28 #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 29 37 30 38 static void text_init (void) … … 36 44 } 37 45 38 static storage_status_t text_load ( const char *my_nick, const char* password, irc_t *irc)46 static storage_status_t text_load( irc_t *irc, const char* password ) 39 47 { 40 48 char s[512]; … … 46 54 account_t *acc, *acc_lookup[9]; 47 55 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" ); 52 57 fp = fopen( s, "r" ); 53 58 if( !fp ) return STORAGE_NO_SUCH_USER; … … 60 65 return STORAGE_INVALID_PASSWORD; 61 66 } 62 63 /* Do this now. If the user runs with AuthMode = Registered, the64 account command will not work otherwise. */65 irc->status |= USTATUS_IDENTIFIED;66 67 67 68 while( fscanf( fp, "%511[^\n]s", s ) > 0 ) … … 93 94 } 94 95 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" ); 96 97 fp = fopen( s, "r" ); 97 98 if( !fp ) return STORAGE_NO_SUCH_USER;
Note: See TracChangeset
for help on using the changeset viewer.