Changeset b8a491d for root_commands.c


Ignore:
Timestamp:
2010-03-18T00:30:38Z (9 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
699376f7
Parents:
78d254f1
Message:

Some compiler warning fixes and renamed "transfers" command to just
"transfer" since all root commands are singular so far.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • root_commands.c

    r78d254f1 rb8a491d  
    11281128}
    11291129
    1130 static void cmd_transfers( irc_t *irc, char **cmd )
     1130static void cmd_transfer( irc_t *irc, char **cmd )
    11311131{
    11321132        GSList *files = irc->file_transfers;
     
    11411141        }
    11421142
    1143         if( cmd[1] &&
    1144             ( strcmp( cmd[1], "reject" ) == 0 ) )
     1143        if( cmd[1] && ( strcmp( cmd[1], "reject" ) == 0 ) )
    11451144        {
    11461145                subcmd = REJECT;
    11471146        }
    1148         else if( cmd[1] &&
    1149                  ( strcmp( cmd[1], "cancel" ) == 0 ) &&
    1150                  cmd[2] &&
    1151                  ( fid = atoi( cmd[2] ) ) )
     1147        else if( cmd[1] && ( strcmp( cmd[1], "cancel" ) == 0 ) &&
     1148                 cmd[2] && ( sscanf( cmd[2], "%d", &fid ) == 1 ) )
    11521149        {
    11531150                subcmd = CANCEL;
     
    12141211        { "join_chat",      2, cmd_join_chat,      0 },
    12151212        { "chat",           1, cmd_chat,           0 },
    1216         { "transfers",      0, cmd_transfers,      0 },
     1213        { "transfer",       0, cmd_transfer,       0 },
    12171214        { NULL }
    12181215};
Note: See TracChangeset for help on using the changeset viewer.