Changeset 48721c3
- Timestamp:
- 2006-01-17T21:15:42Z (19 years ago)
- Branches:
- master
- Children:
- 1ea13be
- Parents:
- daa9e02
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
ipc.c
rdaa9e02 r48721c3 32 32 33 33 34 static int ipc_master_cmd_die( irc_t * data, char **cmd )34 static int ipc_master_cmd_die( irc_t *irc, char **cmd ) 35 35 { 36 36 if( global.conf->runmode == RUNMODE_FORKDAEMON ) … … 42 42 } 43 43 44 static int ipc_master_cmd_rehash( irc_t * data, char **cmd )44 static int ipc_master_cmd_rehash( irc_t *irc, char **cmd ) 45 45 { 46 46 runmode_t oldmode; … … 68 68 { "lilo", 1, NULL, IPC_CMD_TO_CHILDREN }, 69 69 { "rehash", 0, ipc_master_cmd_rehash, 0 }, 70 { "kill", 2, NULL, IPC_CMD_TO_CHILDREN }, 70 71 { NULL } 71 72 }; 72 73 73 74 74 static int ipc_child_cmd_die( irc_t * data, char **cmd )75 static int ipc_child_cmd_die( irc_t *irc, char **cmd ) 75 76 { 76 77 bitlbee_shutdown( NULL ); … … 79 80 } 80 81 81 static int ipc_child_cmd_wallops( irc_t *data, char **cmd ) 82 { 83 irc_t *irc = data; 84 82 static int ipc_child_cmd_wallops( irc_t *irc, char **cmd ) 83 { 85 84 if( irc->status < USTATUS_LOGGED_IN ) 86 85 return 1; … … 92 91 } 93 92 94 static int ipc_child_cmd_lilo( irc_t *data, char **cmd ) 95 { 96 irc_t *irc = data; 97 93 static int ipc_child_cmd_lilo( irc_t *irc, char **cmd ) 94 { 98 95 if( irc->status < USTATUS_LOGGED_IN ) 99 96 return 1; … … 105 102 } 106 103 107 static int ipc_child_cmd_rehash( irc_t * data, char **cmd )104 static int ipc_child_cmd_rehash( irc_t *irc, char **cmd ) 108 105 { 109 106 runmode_t oldmode; … … 117 114 118 115 return 1; 116 } 117 118 static int ipc_child_cmd_kill( irc_t *irc, char **cmd ) 119 { 120 if( irc->status < USTATUS_LOGGED_IN ) 121 return 1; 122 123 if( nick_cmp( cmd[1], irc->nick ) != 0 ) 124 return 1; /* It's not for us. */ 125 126 irc_write( irc, ":%s!%s@%s KILL %s :%s", irc->mynick, irc->mynick, irc->myhost, irc->nick, cmd[2] ); 127 g_io_channel_close( irc->io_channel ); 128 129 return 0; 119 130 } 120 131 … … 123 134 { "wallops", 1, ipc_child_cmd_wallops, 0 }, 124 135 { "lilo", 1, ipc_child_cmd_lilo, 0 }, 125 { "rehash", 0, ipc_child_cmd_rehash, 0 }, 136 { "rehash", 0, ipc_child_cmd_rehash, 0 }, 137 { "kill", 2, ipc_child_cmd_kill, 0 }, 126 138 { NULL } 127 139 }; -
irc_commands.c
rdaa9e02 r48721c3 615 615 { "completions", 0, irc_cmd_completions, IRC_CMD_LOGGED_IN }, 616 616 { "die", 0, NULL, IRC_CMD_OPER_ONLY | IRC_CMD_TO_MASTER }, 617 { "wallops", 0, NULL, IRC_CMD_OPER_ONLY | IRC_CMD_TO_MASTER },618 { "lilo", 0, NULL, IRC_CMD_OPER_ONLY | IRC_CMD_TO_MASTER },617 { "wallops", 1, NULL, IRC_CMD_OPER_ONLY | IRC_CMD_TO_MASTER }, 618 { "lilo", 1, NULL, IRC_CMD_OPER_ONLY | IRC_CMD_TO_MASTER }, 619 619 { "rehash", 0, irc_cmd_rehash, IRC_CMD_OPER_ONLY }, 620 { "kill", 2, NULL, IRC_CMD_OPER_ONLY | IRC_CMD_TO_MASTER }, 620 621 { NULL } 621 622 };
Note: See TracChangeset
for help on using the changeset viewer.