Changeset 68b518d6 for protocols/oscar


Ignore:
Timestamp:
2006-05-26T09:03:38Z (19 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
cdca30b
Parents:
41ca004 (diff), c53911e (diff), 7bfd574 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merging from main development tree.

Location:
protocols/oscar
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • protocols/oscar/aim.h

    r41ca004 r68b518d6  
    728728};
    729729
    730 #define AIM_CHATFLAGS_NOREFLECT 0x0001
    731 #define AIM_CHATFLAGS_AWAY      0x0002
     730#define AIM_CHATFLAGS_NOREFLECT         0x0001
     731#define AIM_CHATFLAGS_AWAY              0x0002
     732#define AIM_CHATFLAGS_UNICODE           0x0004
     733#define AIM_CHATFLAGS_ISO_8859_1        0x0008
     734
    732735int aim_chat_send_im(aim_session_t *sess, aim_conn_t *conn, guint16 flags, const char *msg, int msglen);
    733736int aim_chat_join(aim_session_t *sess, aim_conn_t *conn, guint16 exchange, const char *roomname, guint16 instance);
  • protocols/oscar/chat.c

    r41ca004 r68b518d6  
    159159        if (flags & AIM_CHATFLAGS_AWAY)
    160160                aim_addtlvtochain_noval(&otl, 0x0007);
    161 
     161       
     162        /* [WvG] This wasn't there originally, but we really should send
     163                 the right charset flags, as we also do with normal
     164                 messages. Hope this will work. :-) */
     165        /*
     166        if (flags & AIM_CHATFLAGS_UNICODE)
     167                aimbs_put16(&fr->data, 0x0002);
     168        else if (flags & AIM_CHATFLAGS_ISO_8859_1)
     169                aimbs_put16(&fr->data, 0x0003);
     170        else
     171                aimbs_put16(&fr->data, 0x0000);
     172       
     173        aimbs_put16(&fr->data, 0x0000);
     174        */
     175       
    162176        /*
    163177         * SubTLV: Type 1: Message
  • protocols/oscar/im.c

    r41ca004 r68b518d6  
    14691469            case 0x9c:  /* ICQ 5 seems to send this */
    14701470                aim_send_im_ch2_statusmessage(sess, userinfo->sn, args->cookie,
    1471                         gc->away, sess->aim_icq_state, dc);
     1471                        gc->away ? gc->away : "", sess->aim_icq_state, dc);
    14721472                break;
    14731473
  • protocols/oscar/oscar.c

    r41ca004 r68b518d6  
    22 * gaim
    33 *
     4 * Some code copyright (C) 2002-2006, Jelmer Vernooij <jelmer@samba.org>
     5 *                                    and the BitlBee team.
    46 * Some code copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
    57 * libfaim code copyright 1998, 1999 Adam Fritzler <afritz@auk.cx>
     
    136138        int i, j;
    137139        char *x = strchr(name, '-');
    138         if (!x) return NULL;
     140        if (!x) return g_strdup(name);
    139141        x = strchr(++x, '-');
    140         if (!x) return NULL;
     142        if (!x) return g_strdup(name);
    141143        tmp = g_strdup(++x);
    142144
     
    390392        if (g_strcasecmp(user->proto_opt[USEROPT_AUTH], "login.icq.com") != 0 &&
    391393            g_strcasecmp(user->proto_opt[USEROPT_AUTH], "login.oscar.aol.com") != 0) {
    392                 serv_got_crap(gc, "Warning: Unknown OSCAR server: `%s'. Please review your configuration if the connection fails.");
     394                serv_got_crap(gc, "Warning: Unknown OSCAR server: `%s'. Please review your configuration if the connection fails.",user->proto_opt[USEROPT_AUTH]);
    393395        }
    394396       
     
    25172519        int ret;
    25182520        guint8 len = strlen(message);
     2521        guint16 flags;
    25192522        char *s;
    25202523       
     
    25252528                if (*s & 128)
    25262529                        break;
    2527                
     2530       
     2531        flags = AIM_CHATFLAGS_NOREFLECT;
     2532       
    25282533        /* Message contains high ASCII chars, time for some translation! */
    25292534        if (*s) {
     
    25322537                   If we can't, fall back to UTF16. */
    25332538                if ((ret = do_iconv("UTF-8", "ISO8859-1", message, s, len, BUF_LONG)) >= 0) {
     2539                        flags |= AIM_CHATFLAGS_ISO_8859_1;
    25342540                        len = ret;
    25352541                } else if ((ret = do_iconv("UTF-8", "UNICODEBIG", message, s, len, BUF_LONG)) >= 0) {
     2542                        flags |= AIM_CHATFLAGS_UNICODE;
    25362543                        len = ret;
    25372544                } else {
     
    25442551        }
    25452552               
    2546         ret = aim_chat_send_im(od->sess, ccon->conn, AIM_CHATFLAGS_NOREFLECT, s, len);
     2553        ret = aim_chat_send_im(od->sess, ccon->conn, flags, s, len);
    25472554               
    25482555        if (s != message) {     
     
    26172624        int ret;
    26182625        static int chat_id = 0;
    2619         char * chatname = g_new0(char, strlen(gc->username)+4);
    2620        
    2621         g_snprintf(chatname, strlen(gc->username) + 4, "%s%d", gc->username, chat_id++);
     2626        char * chatname;
     2627       
     2628        chatname = g_strdup_printf("%s%d", gc->username, chat_id++);
    26222629 
    26232630        ret = oscar_chat_join(gc, chatname);
Note: See TracChangeset for help on using the changeset viewer.