Changeset 5a75d15 for root_commands.c


Ignore:
Timestamp:
2010-06-05T22:32:36Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
c1a8a16
Parents:
f5d87ea
Message:

Chatroom improvements. Merged chatroom stub into normal chatroom stuff,
restored "chat add" behaviour a little bit better (don't clean up a
channel when its room disappears, just disconnect it from the groupchat).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • root_commands.c

    rf5d87ea r5a75d15  
    980980                        return;
    981981                }
     982                else if( !acc->prpl->chat_join )
     983                {
     984                        irc_usermsg( irc, "Named chatrooms not supported on that account." );
     985                        return;
     986                }
    982987               
    983988                if( cmd[4] == NULL )
     
    9991004                }
    10001005               
    1001                 if( ( ic = irc_channel_new( irc, channel ) ) )
    1002                 {
    1003                         struct irc_groupchat_stub *igs;
     1006                if( ( ic = irc_channel_new( irc, channel ) ) &&
     1007                    set_setstr( &ic->set, "chat_type", "room" ) &&
     1008                    set_setstr( &ic->set, "account", cmd[2] ) &&
     1009                    set_setstr( &ic->set, "room", cmd[3] ) )
     1010                {
     1011                        irc_usermsg( irc, "Chatroom successfully added." );
     1012                }
     1013                else
     1014                {
     1015                        if( ic )
     1016                                irc_channel_free( ic );
    10041017                       
    1005                         ic->data = igs = g_new0( struct irc_groupchat_stub, 1 );
    1006                         igs->acc = acc;
    1007                         igs->room = g_strdup( cmd[3] );
     1018                        irc_usermsg( irc, "Could not add chatroom." );
    10081019                }
    10091020        }
Note: See TracChangeset for help on using the changeset viewer.