Changeset 39f93f0 for root_commands.c


Ignore:
Timestamp:
2008-08-31T13:42:33Z (16 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
d995c9b
Parents:
0e639f5
Message:

/join can now be used to join chatrooms, join_chat should not be used
anymore. /join should not be used for unnamed groupchats anymore, use
"chat with" instead.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • root_commands.c

    r0e639f5 r39f93f0  
    10511051                cmd_set_real( irc, cmd + 1, cmd_chat_set_findhead );
    10521052        }
     1053        else if( g_strcasecmp( cmd[1], "with" ) == 0 )
     1054        {
     1055                user_t *u;
     1056
     1057                if( !cmd[2] )
     1058                {
     1059                        irc_usermsg( irc, "Not enough parameters given (need %d)", 2 );
     1060                        return;
     1061                }
     1062               
     1063                if( ( u = user_find( irc, cmd[2] ) ) && u->ic && u->ic->acc->prpl->chat_with )
     1064                {
     1065                        if( !u->ic->acc->prpl->chat_with( u->ic, u->handle ) )
     1066                        {
     1067                                irc_usermsg( irc, "(Possible) failure while trying to open "
     1068                                                  "a groupchat with %s.", u->nick );
     1069                        }
     1070                }
     1071                else
     1072                {
     1073                        irc_usermsg( irc, "Can't open a groupchat with %s.", cmd[2] );
     1074                }
     1075        }
    10531076        else
    10541077        {
     
    10841107        if( cmd[3] )
    10851108        {
    1086                 if( cmd[3][0] != '#' && cmd[3][0] != '&' )
     1109                if( strchr( CTYPES, cmd[3][0] ) == NULL )
    10871110                        channel = g_strdup_printf( "&%s", cmd[3] );
    10881111                else
Note: See TracChangeset for help on using the changeset viewer.