Changeset c737ba7 for protocols/oscar


Ignore:
Timestamp:
2007-04-22T02:15:36Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
05bcd20, e35d1a1
Parents:
df1fb67
Message:

join_chat root command works for AIM chats now. (Was trivial to add and
useful for testing.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/oscar/oscar.c

    rdf1fb67 rc737ba7  
    25302530}
    25312531
    2532 int oscar_chat_join(struct im_connection * ic, char * name)
     2532struct groupchat *oscar_chat_join(struct im_connection * ic, char * room, char * nick, char * password )
    25332533{
    25342534        struct oscar_data * od = (struct oscar_data *)ic->proto_data;
    2535        
    25362535        aim_conn_t * cur;
    25372536
    25382537        if((cur = aim_getconn_type(od->sess, AIM_CONN_TYPE_CHATNAV))) {
    2539        
    2540                 return (aim_chatnav_createroom(od->sess, cur, name, 4) == 0);
    2541        
     2538                int st;
     2539               
     2540                st = aim_chatnav_createroom(od->sess, cur, room, 4);
     2541               
     2542                return NULL;
    25422543        } else {
    25432544                struct create_room * cr = g_new0(struct create_room, 1);
     2545               
    25442546                cr->exchange = 4;
    2545                 cr->name = g_strdup(name);
     2547                cr->name = g_strdup(room);
    25462548                od->create_rooms = g_slist_append(od->create_rooms, cr);
    25472549                aim_reqservice(od->sess, od->conn, AIM_CONN_TYPE_CHATNAV);
    2548                 return 1;
     2550               
     2551                return NULL;
    25492552        }
    25502553}
     
    25532556{
    25542557        struct oscar_data * od = (struct oscar_data *)ic->proto_data;
    2555         int ret;
     2558        struct groupchat *ret;
    25562559        static int chat_id = 0;
    25572560        char * chatname;
     
    25592562        chatname = g_strdup_printf("%s%d", ic->acc->user, chat_id++);
    25602563 
    2561         ret = oscar_chat_join(ic, chatname);
     2564        ret = oscar_chat_join(ic, chatname, NULL, NULL);
    25622565
    25632566        aim_chat_invite(od->sess, od->conn, who, "", 4, chatname, 0x0);
     
    25702573void oscar_accept_chat(gpointer w, struct aim_chat_invitation * inv)
    25712574{
    2572         oscar_chat_join(inv->ic, inv->name);
     2575        oscar_chat_join(inv->ic, inv->name, NULL, NULL);
    25732576        g_free(inv->name);
    25742577        g_free(inv);
     
    26002603        ret->chat_leave = oscar_chat_leave;
    26012604        ret->chat_with = oscar_chat_with;
     2605        ret->chat_join = oscar_chat_join;
    26022606        ret->add_permit = oscar_add_permit;
    26032607        ret->add_deny = oscar_add_deny;
Note: See TracChangeset for help on using the changeset viewer.