Changeset 7989fcf3


Ignore:
Timestamp:
2005-12-08T14:37:39Z (14 years ago)
Author:
Jelmer Vernooij <jelmer@…>
Branches:
master
Children:
8efa2f4
Parents:
a1f17d4
Message:

Add check_pass function

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • storage.h

    ra1f17d4 r7989fcf3  
    4343        void (*init) (void);
    4444
     45        storage_status_t (*check_pass) (const char *nick, const char *password);
     46
    4547        storage_status_t (*load) (const char *nick, const char *password, irc_t * irc);
    4648        storage_status_t (*save) (irc_t *irc, int overwrite);
  • storage_text.c

    ra1f17d4 r7989fcf3  
    264264}
    265265
    266 static storage_status_t text_remove( const char *nick, const char *password )
     266static storage_status_t text_check_pass( const char *nick, const char *password )
    267267{
    268268        char s[512];
     
    279279        /*FIXME Test if password is correct */
    280280
     281        return STORAGE_OK;
     282}
     283
     284static storage_status_t text_remove( const char *nick, const char *password )
     285{
     286        char s[512];
     287        storage_status_t status;
     288
     289        status = text_check_pass( nick, password );
     290        if (status != STORAGE_OK)
     291                return status;
     292
    281293        g_snprintf( s, 511, "%s%s%s", global.conf->configdir, nick, ".accounts" );
    282294        if (unlink( s ) == -1)
     
    293305        .name = "text",
    294306        .init = text_init,
     307        .check_pass = text_check_pass,
    295308        .remove = text_remove,
    296309        .load = text_load,
Note: See TracChangeset for help on using the changeset viewer.