Changeset e0ca412


Ignore:
Timestamp:
2006-01-15T11:33:54Z (18 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
13caf0a
Parents:
0431ea1
Message:

s/WALLOP/WALLOPS/, added LILO command.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ipc.c

    r0431ea1 re0ca412  
    3333static int ipc_master_cmd_die( irc_t *data, char **cmd )
    3434{
     35        /* This shouldn't really be the final implementation... */
    3536        exit( 0 );
    3637}
    3738
    38 static int ipc_master_cmd_wallop( irc_t *data, char **cmd )
     39static int ipc_master_cmd_wallops( irc_t *data, char **cmd )
    3940{
    4041        GSList *l;
     
    4243        int msg_len;
    4344       
    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 ) )
    4546                return 0;
    4647       
     
    5657static const command_t ipc_master_commands[] = {
    5758        { "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 },
    5961        { NULL }
    6062};
    6163
    62 static int ipc_child_cmd_wallop( irc_t *data, char **cmd )
     64static int ipc_child_cmd_wallops( irc_t *data, char **cmd )
    6365{
    6466        irc_t *irc = data;
    6567       
    6668        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] );
    6870       
    6971        return 1;
    7072}
    7173
     74static 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
    7283static 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 },
    7486        { NULL }
    7587};
  • irc_commands.c

    r0431ea1 re0ca412  
    608608        { "completions", 0, irc_cmd_completions, IRC_CMD_LOGGED_IN },
    609609        { "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 },
    611612        { NULL }
    612613};
Note: See TracChangeset for help on using the changeset viewer.