- Timestamp:
- 2010-12-13T02:22:20Z (14 years ago)
- Branches:
- master
- Children:
- a618ea6
- Parents:
- 71c4bb6
- Location:
- skype
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
skype/README
r71c4bb6 r451f121 32 32 33 33 * 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@. Use34 * BitlBee >= 3.0. The latest version I've tested is @BITLBEE_VERSION@. Use 35 35 old versions (see the NEWS file about which one) if you have older BitlBee 36 36 installed. -
skype/skype.c
r71c4bb6 r451f121 30 30 #define IRC_LINE_SIZE 1024 31 31 #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_READ38 #endif39 32 40 33 /* … … 243 236 imcb_ask(ic, message, bla, skype_call_ask_yes, skype_call_ask_no); 244 237 } 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 #else256 return bee_chat_by_title(ic->bee, ic, name);257 #endif258 }259 238 260 239 static char *skype_call_strerror(int err) … … 342 321 } else if (!strncmp(ptr, "MOOD_TEXT ", 10)) { 343 322 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 else354 u->status_msg = NULL;355 }356 #else357 323 bee_user_t *bu = bee_user_by_handle(ic->bee, ic, buf); 358 324 g_free(buf); 359 325 buf = ptr + 10; 360 if (bu) {326 if (bu) 361 327 imcb_buddy_status(ic, bu->handle, bu->flags, NULL, 362 328 *buf ? buf : NULL); 363 }364 #endif365 329 if (set_getbool(&ic->acc->set, "show_moods")) 366 330 imcb_log(ic, "User `%s' changed mood text to `%s'", user, buf); … … 589 553 info += 9; 590 554 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); 592 556 int i; 593 557 for (i = 0; i < g_list_length(sd->body); i++) { … … 788 752 info++; 789 753 /* 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, ""); 791 755 if (gc) 792 756 imcb_chat_free(gc); … … 815 779 skype_printf(ic, "GET CHAT %s TOPIC\n", id); 816 780 } else if (!strcmp(info, "STATUS UNSUBSCRIBED")) { 817 gc = skype_chat_by_name(ic, id);781 gc = bee_chat_by_title(ic->bee, ic, id); 818 782 if (gc) 819 783 gc->data = (void *)FALSE; … … 824 788 } else if (!strncmp(info, "TOPIC ", 6)) { 825 789 info += 6; 826 gc = skype_chat_by_name(ic, id);790 gc = bee_chat_by_title(ic->bee, ic, id); 827 791 if (gc && (sd->adder || sd->topic_wait)) { 828 792 if (sd->topic_wait) { … … 836 800 } else if (!strncmp(info, "ACTIVEMEMBERS ", 14)) { 837 801 info += 14; 838 gc = skype_chat_by_name(ic, id);802 gc = bee_chat_by_title(ic->bee, ic, id); 839 803 /* Hack! We set ->data to TRUE 840 804 * while we're on the channel … … 1145 1109 account_t *acc = set->data; 1146 1110 struct im_connection *ic = acc->ic; 1147 char *nick;1148 1111 1149 1112 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); 1160 1114 } else 1161 1115 skype_hangup(ic);
Note: See TracChangeset
for help on using the changeset viewer.