Changeset 823de9d for storage_text.c
- Timestamp:
- 2009-03-12T19:10:06Z (15 years ago)
- Branches:
- master
- Children:
- 673a54c
- Parents:
- 9b55485
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
storage_text.c
r9b55485 r823de9d 27 27 #include "bitlbee.h" 28 28 #include "crypting.h" 29 #ifdef _WIN3230 # define umask _umask31 # define mode_t int32 #endif33 34 #ifndef F_OK35 #define F_OK 036 #endif37 29 38 30 static void text_init (void) … … 44 36 } 45 37 46 static storage_status_t text_load ( const char *my_nick, const char* password, irc_t *irc)38 static storage_status_t text_load( irc_t *irc, const char* password ) 47 39 { 48 40 char s[512]; … … 54 46 account_t *acc, *acc_lookup[9]; 55 47 56 if( irc->status & USTATUS_IDENTIFIED ) 57 return( 1 ); 58 59 g_snprintf( s, 511, "%s%s%s", global.conf->configdir, my_nick, ".accounts" ); 48 g_snprintf( s, 511, "%s%s%s", global.conf->configdir, irc->nick, ".accounts" ); 60 49 fp = fopen( s, "r" ); 61 50 if( !fp ) return STORAGE_NO_SUCH_USER; … … 68 57 return STORAGE_INVALID_PASSWORD; 69 58 } 70 71 /* Do this now. If the user runs with AuthMode = Registered, the72 account command will not work otherwise. */73 irc->status |= USTATUS_IDENTIFIED;74 59 75 60 while( fscanf( fp, "%511[^\n]s", s ) > 0 ) … … 101 86 } 102 87 103 g_snprintf( s, 511, "%s%s%s", global.conf->configdir, my_nick, ".nicks" );88 g_snprintf( s, 511, "%s%s%s", global.conf->configdir, irc->nick, ".nicks" ); 104 89 fp = fopen( s, "r" ); 105 90 if( !fp ) return STORAGE_NO_SUCH_USER;
Note: See TracChangeset
for help on using the changeset viewer.