aboutsummaryrefslogtreecommitdiffstats
path: root/irc_commands.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2006-01-14 18:48:29 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2006-01-14 18:48:29 +0100
commitc22c210f560aee8a43b9fbff63c3dc408b434094 (patch)
tree596f9742649acdeda984ea154de0aa4b2ee1f03a /irc_commands.c
parent0298d1195bb76c1e400695916b4cf65480b0dd76 (diff)
Checks if there's an OPER password set before checking it, to prevent crashes.
Diffstat (limited to 'irc_commands.c')
-rw-r--r--irc_commands.c2
1 files changed, 1 insertions, 1 deletions
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. */