Changeset e0ca412
- Timestamp:
- 2006-01-15T11:33:54Z (19 years ago)
- Branches:
- master
- Children:
- 13caf0a
- Parents:
- 0431ea1
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
ipc.c
r0431ea1 re0ca412 33 33 static int ipc_master_cmd_die( irc_t *data, char **cmd ) 34 34 { 35 /* This shouldn't really be the final implementation... */ 35 36 exit( 0 ); 36 37 } 37 38 38 static int ipc_master_cmd_wallop ( irc_t *data, char **cmd )39 static int ipc_master_cmd_wallops( irc_t *data, char **cmd ) 39 40 { 40 41 GSList *l; … … 42 43 int msg_len; 43 44 44 if( ( msg_len = g_snprintf( msg_buf, sizeof( msg_buf ) - 1, " WALLOP :%s\r\n", cmd[1] ) ) > ( sizeof( msg_buf ) - 1 ) )45 if( ( msg_len = g_snprintf( msg_buf, sizeof( msg_buf ) - 1, "%s :%s\r\n", cmd[0], cmd[1] ) ) > ( sizeof( msg_buf ) - 1 ) ) 45 46 return 0; 46 47 … … 56 57 static const command_t ipc_master_commands[] = { 57 58 { "die", 0, ipc_master_cmd_die, 0 }, 58 { "wallop", 1, ipc_master_cmd_wallop, 1 }, 59 { "wallops", 1, ipc_master_cmd_wallops, 1 }, 60 { "lilo", 1, ipc_master_cmd_wallops, 1 }, 59 61 { NULL } 60 62 }; 61 63 62 static int ipc_child_cmd_wallop ( irc_t *data, char **cmd )64 static int ipc_child_cmd_wallops( irc_t *data, char **cmd ) 63 65 { 64 66 irc_t *irc = data; 65 67 66 68 if( strchr( irc->umode, 'w' ) ) 67 irc_write( irc, ":%s WALLOP :%s", irc->myhost, cmd[1] );69 irc_write( irc, ":%s WALLOPS :%s", irc->myhost, cmd[1] ); 68 70 69 71 return 1; 70 72 } 71 73 74 static int ipc_child_cmd_lilo( irc_t *data, char **cmd ) 75 { 76 irc_t *irc = data; 77 78 irc_write( irc, ":%s NOTICE %s :%s", irc->myhost, irc->nick, cmd[1] ); 79 80 return 1; 81 } 82 72 83 static const command_t ipc_child_commands[] = { 73 { "wallop", 1, ipc_child_cmd_wallop, 1 }, 84 { "wallops", 1, ipc_child_cmd_wallops, 1 }, 85 { "lilo", 1, ipc_child_cmd_lilo, 1 }, 74 86 { NULL } 75 87 }; -
irc_commands.c
r0431ea1 re0ca412 608 608 { "completions", 0, irc_cmd_completions, IRC_CMD_LOGGED_IN }, 609 609 { "die", 0, NULL, IRC_CMD_OPER_ONLY | IRC_CMD_TO_MASTER }, 610 { "wallop", 0, NULL, IRC_CMD_OPER_ONLY | IRC_CMD_TO_MASTER }, 610 { "wallops", 0, NULL, IRC_CMD_OPER_ONLY | IRC_CMD_TO_MASTER }, 611 { "lilo", 0, NULL, IRC_CMD_OPER_ONLY | IRC_CMD_TO_MASTER }, 611 612 { NULL } 612 613 };
Note: See TracChangeset
for help on using the changeset viewer.