From fda194fe19a3e91b12387aeb9eda544580e48381 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Mon, 19 Mar 2012 21:01:50 +0000 Subject: Allow identify -noload/-force without typing a password. (/OPER) Patch from trac3r, bug #814. --- irc_commands.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'irc_commands.c') 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 ); } -- cgit v1.2.3