Changeset 451f121


Ignore:
Timestamp:
2010-12-13T02:22:20Z (13 years ago)
Author:
Miklos Vajna <vmiklos@…>
Branches:
master
Children:
a618ea6
Parents:
71c4bb6
Message:

Drop <3.0 compatibility

Location:
skype
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • skype/README

    r71c4bb6 r451f121  
    3232
    3333* Skype >= 1.4.0.99. The latest version I've tested is 2.1.0.81.
    34 * BitlBee >= 1.2.6. The lastest version I've tested is @BITLBEE_VERSION@. Use
     34* BitlBee >= 3.0. The latest version I've tested is @BITLBEE_VERSION@. Use
    3535  old versions (see the NEWS file about which one) if you have older BitlBee
    3636  installed.
  • skype/skype.c

    r71c4bb6 r451f121  
    3030#define IRC_LINE_SIZE 1024
    3131#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
    32 
    33 /*
    34  * Compatibility with BitlBee 1.3+
    35  */
    36 #if BITLBEE_VERSION_CODE < BITLBEE_VER(1, 3, 0)
    37 #define B_EV_IO_READ GAIM_INPUT_READ
    38 #endif
    3932
    4033/*
     
    243236        imcb_ask(ic, message, bla, skype_call_ask_yes, skype_call_ask_no);
    244237}
    245 struct groupchat *skype_chat_by_name(struct im_connection *ic, char *name)
    246 {
    247 #if BITLBEE_VERSION_CODE < BITLBEE_VER(1, 3, 0)
    248         struct groupchat *ret;
    249 
    250         for (ret = ic->groupchats; ret; ret = ret->next)
    251                 if (strcmp(name, ret->title) == 0)
    252                         break;
    253 
    254         return ret;
    255 #else
    256         return bee_chat_by_title(ic->bee, ic, name);
    257 #endif
    258 }
    259238
    260239static char *skype_call_strerror(int err)
     
    342321        } else if (!strncmp(ptr, "MOOD_TEXT ", 10)) {
    343322                char *buf = g_strdup_printf("%s@skype.com", user);
    344 #if BITLBEE_VERSION_CODE < BITLBEE_VER(1, 3, 0)
    345                 user_t *u = user_findhandle(ic, buf);
    346                 g_free(buf);
    347                 buf = ptr + 10;
    348                 if (u) {
    349                         if (u->status_msg)
    350                                 g_free(u->status_msg);
    351                         if (strlen(buf))
    352                                 u->status_msg = g_strdup(buf);
    353                         else
    354                                 u->status_msg = NULL;
    355                 }
    356 #else
    357323                bee_user_t *bu = bee_user_by_handle(ic->bee, ic, buf);
    358324                g_free(buf);
    359325                buf = ptr + 10;
    360                 if (bu) {
     326                if (bu)
    361327                        imcb_buddy_status(ic, bu->handle, bu->flags, NULL,
    362328                                        *buf ? buf : NULL);
    363                 }
    364 #endif
    365329                if (set_getbool(&ic->acc->set, "show_moods"))
    366330                        imcb_log(ic, "User `%s' changed mood text to `%s'", user, buf);
     
    589553                info += 9;
    590554                if (sd->handle && sd->body && sd->type) {
    591                         struct groupchat *gc = skype_chat_by_name(ic, info);
     555                        struct groupchat *gc = bee_chat_by_title(ic->bee, ic, info);
    592556                        int i;
    593557                        for (i = 0; i < g_list_length(sd->body); i++) {
     
    788752        info++;
    789753        /* Remove fake chat if we created one in skype_chat_with() */
    790         gc = skype_chat_by_name(ic, "");
     754        gc = bee_chat_by_title(ic->bee, ic, "");
    791755        if (gc)
    792756                imcb_chat_free(gc);
     
    815779                skype_printf(ic, "GET CHAT %s TOPIC\n", id);
    816780        } else if (!strcmp(info, "STATUS UNSUBSCRIBED")) {
    817                 gc = skype_chat_by_name(ic, id);
     781                gc = bee_chat_by_title(ic->bee, ic, id);
    818782                if (gc)
    819783                        gc->data = (void *)FALSE;
     
    824788        } else if (!strncmp(info, "TOPIC ", 6)) {
    825789                info += 6;
    826                 gc = skype_chat_by_name(ic, id);
     790                gc = bee_chat_by_title(ic->bee, ic, id);
    827791                if (gc && (sd->adder || sd->topic_wait)) {
    828792                        if (sd->topic_wait) {
     
    836800        } else if (!strncmp(info, "ACTIVEMEMBERS ", 14)) {
    837801                info += 14;
    838                 gc = skype_chat_by_name(ic, id);
     802                gc = bee_chat_by_title(ic->bee, ic, id);
    839803                /* Hack! We set ->data to TRUE
    840804                 * while we're on the channel
     
    11451109        account_t *acc = set->data;
    11461110        struct im_connection *ic = acc->ic;
    1147         char *nick;
    11481111
    11491112        if (value) {
    1150 #if BITLBEE_VERSION_CODE < BITLBEE_VER(1, 3, 0)
    1151                 /* IRC stuff shouldn't be touched from inside IM modules. */
    1152                 user_t *u = user_find(acc->irc, value);
    1153                 /* We are starting a call */
    1154                 if (u)
    1155                         nick = u->handle;
    1156                 else
    1157 #endif
    1158                         nick = value;
    1159                 skype_call(ic, nick);
     1113                skype_call(ic, value);
    11601114        } else
    11611115                skype_hangup(ic);
Note: See TracChangeset for help on using the changeset viewer.