aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ipc.c2
-rw-r--r--ipc.h6
-rw-r--r--irc_commands.c7
3 files changed, 13 insertions, 2 deletions
diff --git a/ipc.c b/ipc.c
index 4777113a..e0bf1319 100644
--- a/ipc.c
+++ b/ipc.c
@@ -58,7 +58,7 @@ static int ipc_master_cmd_die( irc_t *data, char **cmd )
return 1;
}
-static int ipc_master_cmd_rehash( irc_t *data, char **cmd )
+int ipc_master_cmd_rehash( irc_t *data, char **cmd )
{
runmode_t oldmode;
diff --git a/ipc.h b/ipc.h
index 56449a7c..308b6e4b 100644
--- a/ipc.h
+++ b/ipc.h
@@ -26,6 +26,7 @@
#define BITLBEE_CORE
#include "bitlbee.h"
+
struct bitlbee_child
{
pid_t pid;
@@ -37,6 +38,7 @@ struct bitlbee_child
char *realname;
};
+
void ipc_master_read( gpointer data, gint source, GaimInputCondition cond );
void ipc_child_read( gpointer data, gint source, GaimInputCondition cond );
@@ -48,4 +50,8 @@ void ipc_to_master_str( char *format, ... );
void ipc_to_children( char **cmd );
void ipc_to_children_str( char *format, ... );
+/* We need this function in inetd mode, so let's just make it non-static. */
+int ipc_master_cmd_rehash( irc_t *data, char **cmd );
+
+
extern GSList *child_list;
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 );