diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2012-03-19 21:01:50 +0000 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2012-03-19 21:01:50 +0000 |
commit | fda194fe19a3e91b12387aeb9eda544580e48381 (patch) | |
tree | 7f0651fc729cdca3dd1bfcfd0c7e347a8d8e06d1 /irc_commands.c | |
parent | d18dee42088f0bef9d09dbc7903590d755d19a50 (diff) |
Allow identify -noload/-force without typing a password. (/OPER)
Patch from trac3r, bug #814.
Diffstat (limited to 'irc_commands.c')
-rw-r--r-- | irc_commands.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/irc_commands.c b/irc_commands.c index 18a7acd5..0dbf8ee6 100644 --- a/irc_commands.c +++ b/irc_commands.c @@ -447,7 +447,18 @@ static void irc_cmd_oper_hack( irc_t *irc, char **cmd ) } else if( irc->status & OPER_HACK_IDENTIFY ) { - char *send_cmd[] = { "identify", password, NULL }; + char *send_cmd[] = { "identify", password, NULL, NULL }; + irc->status &= ~OPER_HACK_IDENTIFY; + if( irc->status & OPER_HACK_IDENTIFY_NOLOAD ) + { + send_cmd[1] = "-noload"; + send_cmd[2] = password; + } + else if( irc->status & OPER_HACK_IDENTIFY_FORCE ) + { + send_cmd[1] = "-force"; + send_cmd[2] = password; + } irc_send_num( irc, 491, ":Trying to identify" ); root_command( irc, send_cmd ); } |