Changeset fda194f


Ignore:
Timestamp:
2012-03-19T21:01:50Z (9 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
4c73ba62
Parents:
d18dee42
Message:

Allow identify -noload/-force without typing a password. (/OPER)
Patch from trac3r, bug #814.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • irc.h

    rd18dee42 rfda194f  
    5757           stuff that matters. */
    5858        OPER_HACK_IDENTIFY = 0x100,
     59        OPER_HACK_IDENTIFY_NOLOAD = 0x01100,
     60        OPER_HACK_IDENTIFY_FORCE  = 0x02100,
    5961        OPER_HACK_REGISTER = 0x200,
    6062        OPER_HACK_ACCOUNT_ADD = 0x400,
    61         OPER_HACK_ANY = 0x700,  /* To check for them all at once. */
     63        OPER_HACK_ANY = 0x3700, /* To check for them all at once. */
    6264} irc_status_t;
    6365
  • irc_commands.c

    rd18dee42 rfda194f  
    448448        else if( irc->status & OPER_HACK_IDENTIFY )
    449449        {
    450                 char *send_cmd[] = { "identify", password, NULL };
     450                char *send_cmd[] = { "identify", password, NULL, NULL };
     451                irc->status &= ~OPER_HACK_IDENTIFY;
     452                if( irc->status & OPER_HACK_IDENTIFY_NOLOAD )
     453                {
     454                        send_cmd[1] = "-noload";
     455                        send_cmd[2] = password;
     456                }
     457                else if( irc->status & OPER_HACK_IDENTIFY_FORCE )
     458                {
     459                        send_cmd[1] = "-force";
     460                        send_cmd[2] = password;
     461                }
    451462                irc_send_num( irc, 491, ":Trying to identify" );
    452463                root_command( irc, send_cmd );
  • root_commands.c

    rd18dee42 rfda194f  
    121121                load = FALSE;
    122122                password = cmd[2];
     123                if( password == NULL )
     124                        irc->status |= OPER_HACK_IDENTIFY_NOLOAD;
    123125        }
    124126        else if( strncmp( cmd[1], "-force", 6 ) == 0 )
    125127        {
    126128                password = cmd[2];
     129                if( password == NULL )
     130                        irc->status |= OPER_HACK_IDENTIFY_FORCE;
    127131        }
    128132        else if( irc->b->accounts != NULL )
Note: See TracChangeset for help on using the changeset viewer.