Changeset e180c59


Ignore:
Timestamp:
2008-09-28T10:56:46Z (16 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
94acdd0
Parents:
2bebe15
Message:

Fixed irc_cmd_join(). Giving a more proper response to invalid channel
names, and checking if an account is on-line before attempting to join
one of its chatrooms.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc_commands.c

    r2bebe15 re180c59  
    197197               
    198198                if( strchr( CTYPES, cmd[1][0] ) == NULL || cmd[1][1] == 0 )
    199                 {
     199                        irc_reply( irc, 479, "%s :Invalid channel name", cmd[1] );
     200                else if( ( c = chat_bychannel( irc, cmd[1] ) ) && c->acc && c->acc->ic )
     201                        chat_join( irc, c );
     202                else
    200203                        irc_reply( irc, 403, "%s :No such channel", cmd[1] );
    201                         return;
    202                 }
    203                
    204                 if( ( c = chat_bychannel( irc, cmd[1] ) ) )
    205                 {
    206                         chat_join( irc, c );
    207                 }
    208                 else
    209                 {
    210                         irc_reply( irc, 403, "%s :No such channel", cmd[1] );
    211                 }
    212204        }
    213205}
Note: See TracChangeset for help on using the changeset viewer.