aboutsummaryrefslogtreecommitdiffstats
path: root/irc_commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'irc_commands.c')
-rw-r--r--irc_commands.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/irc_commands.c b/irc_commands.c
index d9ff929f..3b561d00 100644
--- a/irc_commands.c
+++ b/irc_commands.c
@@ -400,6 +400,17 @@ static void irc_cmd_nickserv( irc_t *irc, char **cmd )
static void irc_cmd_oper( irc_t *irc, char **cmd )
{
+ account_t *a;
+
+ /* /OPER can now also be used to enter IM passwords without echoing.
+ It's a hack but the extra password security is worth it. */
+ for( a = irc->b->accounts; a; a = a->next )
+ if( strcmp( a->pass, PASSWORD_PENDING ) == 0 )
+ {
+ set_setstr( &a->set, "password", cmd[2] );
+ return;
+ }
+
if( global.conf->oper_pass &&
( strncmp( global.conf->oper_pass, "md5:", 4 ) == 0 ?
md5_verify_password( cmd[2], global.conf->oper_pass + 4 ) == 0 :