Changeset 9564e55 for irc_commands.c


Ignore:
Timestamp:
2010-11-22T13:17:45Z (8 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
bedad20
Parents:
09d4922
Message:

Allow omitting the password argument to "account add", to then separately
enter the password using the /OPER command (which will not echo to the
screen and/or logs).

It's a fairly ugly hack but the improved password security is worth it
IMHO.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc_commands.c

    r09d4922 r9564e55  
    401401static void irc_cmd_oper( irc_t *irc, char **cmd )
    402402{
     403        account_t *a;
     404       
     405        /* /OPER can now also be used to enter IM passwords without echoing.
     406           It's a hack but the extra password security is worth it. */
     407        for( a = irc->b->accounts; a; a = a->next )
     408                if( strcmp( a->pass, PASSWORD_PENDING ) == 0 )
     409                {
     410                        set_setstr( &a->set, "password", cmd[2] );
     411                        return;
     412                }
     413       
    403414        if( global.conf->oper_pass &&
    404415            ( strncmp( global.conf->oper_pass, "md5:", 4 ) == 0 ?
Note: See TracChangeset for help on using the changeset viewer.