From c22c210f560aee8a43b9fbff63c3dc408b434094 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sat, 14 Jan 2006 18:48:29 +0100 Subject: Checks if there's an OPER password set before checking it, to prevent crashes. --- irc_commands.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'irc_commands.c') diff --git a/irc_commands.c b/irc_commands.c index b6eeab37..37d530ea 100644 --- a/irc_commands.c +++ b/irc_commands.c @@ -106,7 +106,7 @@ static int irc_cmd_ping( irc_t *irc, char **cmd ) static int irc_cmd_oper( irc_t *irc, char **cmd ) { - if( strcmp( cmd[2], global.conf->oper_pass ) == 0 ) + if( global.conf->oper_pass && strcmp( cmd[2], global.conf->oper_pass ) == 0 ) irc_umode_set( irc, "+o", 1 ); // else /* FIXME/TODO: Find out which reply to send now. */ -- cgit v1.2.3