Changeset 5424c76


Ignore:
Timestamp:
2006-01-19T17:52:19Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
b8c2ace
Parents:
bd9b00f
Message:

Rehash command now also works in inetd mode. Other "IPC" commands only make
sense in daemon mode.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • ipc.c

    rbd9b00f r5424c76  
    5959}
    6060
    61 static int ipc_master_cmd_rehash( irc_t *data, char **cmd )
     61int ipc_master_cmd_rehash( irc_t *data, char **cmd )
    6262{
    6363        runmode_t oldmode;
  • ipc.h

    rbd9b00f r5424c76  
    2727#include "bitlbee.h"
    2828
     29
    2930struct bitlbee_child
    3031{
     
    3738        char *realname;
    3839};
     40
    3941
    4042void ipc_master_read( gpointer data, gint source, GaimInputCondition cond );
     
    4951void ipc_to_children_str( char *format, ... );
    5052
     53/* We need this function in inetd mode, so let's just make it non-static. */
     54int ipc_master_cmd_rehash( irc_t *data, char **cmd );
     55
     56
    5157extern GSList *child_list;
  • irc_commands.c

    rbd9b00f r5424c76  
    580580static int irc_cmd_rehash( irc_t *irc, char **cmd )
    581581{
    582         ipc_to_master( cmd );
     582        if( global.conf->runmode == RUNMODE_INETD )
     583                ipc_master_cmd_rehash( NULL, NULL );
     584        else
     585                ipc_to_master( cmd );
    583586       
    584587        irc_reply( irc, 382, "%s :Rehashing", CONF_FILE );
     
    656659                       
    657660                        if( irc_commands[i].flags & IRC_CMD_TO_MASTER )
     661                                /* IPC doesn't make sense in inetd mode,
     662                                    but the function will catch that. */
    658663                                ipc_to_master( cmd );
    659664                        else
Note: See TracChangeset for help on using the changeset viewer.