Changes in ipc.c [cd63d58:edc767b]
Legend:
- Unmodified
- Added
- Removed
-
ipc.c
rcd63d58 redc767b 33 33 34 34 GSList *child_list = NULL; 35 static char *statefile = NULL; 35 36 36 37 static void ipc_master_cmd_client( irc_t *data, char **cmd ) … … 62 63 } 63 64 64 static void ipc_master_cmd_deaf( irc_t *data, char **cmd )65 {66 if( global.conf->runmode == RUNMODE_DAEMON )67 {68 b_event_remove( global.listen_watch_source_id );69 close( global.listen_socket );70 71 global.listen_socket = global.listen_watch_source_id = -1;72 73 ipc_to_children_str( "OPERMSG :Closed listening socket, waiting "74 "for all users to disconnect." );75 }76 else77 {78 ipc_to_children_str( "OPERMSG :The DEAF command only works in "79 "normal daemon mode. Try DIE instead." );80 }81 }82 83 65 void ipc_master_cmd_rehash( irc_t *data, char **cmd ) 84 66 { … … 116 98 { "hello", 0, ipc_master_cmd_client, 0 }, 117 99 { "die", 0, ipc_master_cmd_die, 0 }, 118 { "deaf", 0, ipc_master_cmd_deaf, 0 },119 100 { "wallops", 1, NULL, IPC_CMD_TO_CHILDREN }, 120 101 { "wall", 1, NULL, IPC_CMD_TO_CHILDREN }, … … 500 481 } 501 482 483 void ipc_master_set_statefile( char *fn ) 484 { 485 statefile = g_strdup( fn ); 486 } 487 502 488 503 489 static gboolean new_ipc_client( gpointer data, gint serversock, b_input_condition cond ) … … 560 546 #endif 561 547 562 int ipc_master_load_state( char *statefile)548 int ipc_master_load_state() 563 549 { 564 550 struct bitlbee_child *child; … … 568 554 if( statefile == NULL ) 569 555 return 0; 570 571 556 fp = fopen( statefile, "r" ); 572 557 unlink( statefile ); /* Why do it later? :-) */
Note: See TracChangeset
for help on using the changeset viewer.