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