From 5424c76c7813f82e2f98546f6a46b73d80181877 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Thu, 19 Jan 2006 18:52:19 +0100 Subject: Rehash command now also works in inetd mode. Other "IPC" commands only make sense in daemon mode. --- irc_commands.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'irc_commands.c') diff --git a/irc_commands.c b/irc_commands.c index 152df767..e31a92e8 100644 --- a/irc_commands.c +++ b/irc_commands.c @@ -579,7 +579,10 @@ static int irc_cmd_completions( irc_t *irc, char **cmd ) static int irc_cmd_rehash( irc_t *irc, char **cmd ) { - ipc_to_master( cmd ); + if( global.conf->runmode == RUNMODE_INETD ) + ipc_master_cmd_rehash( NULL, NULL ); + else + ipc_to_master( cmd ); irc_reply( irc, 382, "%s :Rehashing", CONF_FILE ); @@ -655,6 +658,8 @@ int irc_exec( irc_t *irc, char *cmd[] ) } if( irc_commands[i].flags & IRC_CMD_TO_MASTER ) + /* IPC doesn't make sense in inetd mode, + but the function will catch that. */ ipc_to_master( cmd ); else return irc_commands[i].execute( irc, cmd ); -- cgit v1.2.3