Changeset b73ac9c for storage_text.c


Ignore:
Timestamp:
2005-12-13T23:05:27Z (18 years ago)
Author:
Jelmer Vernooij <jelmer@…>
Branches:
master
Children:
d3307e2
Parents:
a301379c
Message:

Add support for 'primary' and 'migrate' account storages.
Fix two bugs in the text storage backend that were introduced by my previous
changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • storage_text.c

    ra301379c rb73ac9c  
    6767        {
    6868                fgetc( fp );
    69                 line = deobfucrypt( irc, s );
     69                line = deobfucrypt( s, password );
     70                if (line == NULL) return STORAGE_OTHER_ERROR;
    7071                root_command_string( irc, ru, line, 0 );
    7172                g_free( line );
     
    129130        \*/
    130131       
    131         hash = hashpass( irc );
     132        hash = hashpass( irc->password );
    132133        if( hash == NULL )
    133134        {
    134135                irc_usermsg( irc, "Please register yourself if you want to save your settings." );
    135                 return( 0 );
     136                return STORAGE_OTHER_ERROR;
    136137        }
    137138       
     
    192193                                    proto_name[a->protocol], a->user, a->pass, a->server ? a->server : "" );
    193194               
    194                 line = obfucrypt( irc, s );
     195                line = obfucrypt( s, irc->password );
    195196                if( *line )
    196197                {
     
    210211                {
    211212                        g_snprintf( s, sizeof( s ), "set %s \"%s\"", set->key, set->value );
    212                         line = obfucrypt( irc, s );
     213                        line = obfucrypt( s, irc->password );
    213214                        if( *line )
    214215                        {
     
    227228        {
    228229                g_snprintf( s, sizeof( s ), "rename %s %s", ROOT_NICK, irc->mynick );
    229                 line = obfucrypt( irc, s );
     230                line = obfucrypt( s, irc->password );
    230231                if( *line )
    231232                {
     
    270271        FILE *fp;
    271272       
    272         g_snprintf( s, 511, "%s%s%s", global.conf->configdir, nick, ".nicks" );
     273        g_snprintf( s, 511, "%s%s%s", global.conf->configdir, nick, ".accounts" );
    273274        fp = fopen( s, "r" );
    274275        if (!fp)
Note: See TracChangeset for help on using the changeset viewer.