Changeset bd69a21 for irc.c


Ignore:
Timestamp:
2005-12-15T12:24:25Z (18 years ago)
Author:
Jelmer Vernooij <jelmer@…>
Branches:
master
Children:
4146a07
Parents:
2983f5e (diff), bf02a67 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge Wilmer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc.c

    r2983f5e rbd69a21  
    3131
    3232GSList *irc_connection_list = NULL;
     33
     34static char *passchange (irc_t *irc, void *set, char *value)
     35{
     36        irc_setpass (irc, value);
     37        return (NULL);
     38}
    3339
    3440irc_t *irc_new( int fd )
     
    129135        set_add( irc, "to_char", ": ", set_eval_to_char );
    130136        set_add( irc, "typing_notice", "false", set_eval_bool );
     137        set_add( irc, "password", NULL, passchange);
    131138       
    132139        conf_loaddefaults( irc );
     
    154161       
    155162        if( irc->status >= USTATUS_IDENTIFIED && set_getint( irc, "save_on_quit" ) )
    156                 if( !bitlbee_save( irc ) )
     163                if( storage_save( irc, TRUE ) != STORAGE_OK )
    157164                        irc_usermsg( irc, "Error while saving settings!" );
    158165       
     
    259266        if( global.conf->runmode == RUNMODE_INETD )
    260267                g_main_quit( global.loop );
     268}
     269
     270/* USE WITH CAUTION!
     271   Sets pass without checking */
     272void irc_setpass (irc_t *irc, const char *pass)
     273{
     274        if (irc->password) g_free (irc->password);
     275       
     276        if (pass) {
     277                irc->password = g_strdup (pass);
     278                irc_usermsg (irc, "Password successfully changed");
     279        } else {
     280                irc->password = NULL;
     281        }
    261282}
    262283
     
    15101531                        {
    15111532                                irc_write( irc, ":%s!%s@%s %s %s :%s%s", u->nick, u->user, u->host,
    1512                                            type, to, prefix, line );
     1533                                           type, to, prefix ? prefix : "", line );
    15131534                        }
    15141535                        line = s + 1;
Note: See TracChangeset for help on using the changeset viewer.