Changeset 3923003 for irc_commands.c


Ignore:
Timestamp:
2010-03-28T02:49:19Z (15 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
38ee021
Parents:
6761a40
Message:

Restored server-initiated PINGs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc_commands.c

    r6761a40 r3923003  
    106106        irc_write( irc, ":%s PONG %s :%s", irc->root->host,
    107107                   irc->root->host, cmd[1]?cmd[1]:irc->root->host );
     108}
     109
     110static void irc_cmd_pong( irc_t *irc, char **cmd )
     111{
     112        /* We could check the value we get back from the user, but in
     113           fact we don't care, we're just happy s/he's still alive. */
     114        irc->last_pong = gettime();
     115        irc->pinging = 0;
    108116}
    109117
     
    517525}
    518526
    519 static void irc_cmd_pong( irc_t *irc, char **cmd )
    520 {
    521         /* We could check the value we get back from the user, but in
    522            fact we don't care, we're just happy he's still alive. */
    523         irc->last_pong = gettime();
    524         irc->pinging = 0;
    525 }
    526 
    527527static void irc_cmd_version( irc_t *irc, char **cmd )
    528528{
     
    568568        { "quit",        0, irc_cmd_quit,        0 },
    569569        { "ping",        0, irc_cmd_ping,        0 },
     570        { "pong",        0, irc_cmd_pong,        IRC_CMD_LOGGED_IN },
    570571        { "join",        1, irc_cmd_join,        IRC_CMD_LOGGED_IN },
    571572        { "names",       1, irc_cmd_names,       IRC_CMD_LOGGED_IN },
     
    588589        { "nickserv",    1, irc_cmd_nickserv,    IRC_CMD_LOGGED_IN },
    589590        { "ns",          1, irc_cmd_nickserv,    IRC_CMD_LOGGED_IN },
    590         { "pong",        0, irc_cmd_pong,        IRC_CMD_LOGGED_IN },
    591591        { "version",     0, irc_cmd_version,     IRC_CMD_LOGGED_IN },
    592592        { "completions", 0, irc_cmd_completions, IRC_CMD_LOGGED_IN },
Note: See TracChangeset for help on using the changeset viewer.