aboutsummaryrefslogtreecommitdiffstats
path: root/irc_commands.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2006-01-19 18:52:19 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2006-01-19 18:52:19 +0100
commit5424c76c7813f82e2f98546f6a46b73d80181877 (patch)
treec7853e03c0202e8586103bb88e311f1183fe94d0 /irc_commands.c
parentbd9b00f4fed3560eab98f15cf9923aed13467d5d (diff)
Rehash command now also works in inetd mode. Other "IPC" commands only make
sense in daemon mode.
Diffstat (limited to 'irc_commands.c')
-rw-r--r--irc_commands.c7
1 files changed, 6 insertions, 1 deletions
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 );