Changeset 85d7b85 for protocols/oscar
- Timestamp:
- 2008-04-02T14:22:57Z (17 years ago)
- Branches:
- master
- Children:
- f9dbc99
- Parents:
- 875ad42 (diff), dd34575 (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. - Location:
- protocols/oscar
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/oscar/Makefile
r875ad42 r85d7b85 17 17 # [SH] Phony targets 18 18 all: oscar_mod.o 19 check: all 20 lcov: check 21 gcov: 22 gcov *.c 19 23 20 24 .PHONY: all clean distclean -
protocols/oscar/aim.h
r875ad42 r85d7b85 94 94 * 95 95 */ 96 #define AIM_DEFAULT_LOGIN_SERVER "login. oscar.aol.com"96 #define AIM_DEFAULT_LOGIN_SERVER "login.messaging.aol.com" 97 97 #define AIM_LOGIN_PORT 5190 98 98 … … 574 574 575 575 struct aim_chat_invitation { 576 struct gaim_connection * gc;576 struct im_connection * ic; 577 577 char * name; 578 578 guint8 exchange; -
protocols/oscar/chat.c
r875ad42 r85d7b85 54 54 continue; 55 55 if (!cur->priv) { 56 do_error_dialog(sess->aux_data, "chat connection with no name!", "Gaim");56 imcb_error(sess->aux_data, "chat connection with no name!"); 57 57 continue; 58 58 } … … 397 397 398 398 if (detaillevel != 0x02) { 399 do_error_dialog(sess->aux_data, "Only detaillevel 0x2 is support at the moment", "Gaim");399 imcb_error(sess->aux_data, "Only detaillevel 0x2 is support at the moment"); 400 400 return 1; 401 401 } … … 615 615 616 616 if (channel != 0x0003) { 617 do_error_dialog(sess->aux_data, "unknown channel!", "Gaim");617 imcb_error(sess->aux_data, "unknown channel!"); 618 618 return 0; 619 619 } -
protocols/oscar/chatnav.c
r875ad42 r85d7b85 286 286 287 287 if (!(bigblock = aim_gettlv(tlvlist, 0x0004, 1))) { 288 do_error_dialog(sess->aux_data, "no bigblock in top tlv in create room response", "Gaim");288 imcb_error(sess->aux_data, "no bigblock in top tlv in create room response"); 289 289 290 290 aim_freetlvchain(&tlvlist); … … 301 301 302 302 if (detaillevel != 0x02) { 303 do_error_dialog(sess->aux_data, "unknown detaillevel in create room response", "Gaim");303 imcb_error(sess->aux_data, "unknown detaillevel in create room response"); 304 304 aim_freetlvchain(&tlvlist); 305 305 g_free(ck); … … 367 367 368 368 if (!(snac2 = aim_remsnac(sess, snac->id))) { 369 do_error_dialog(sess->aux_data, "received response to unknown request!", "Gaim");369 imcb_error(sess->aux_data, "received response to unknown request!"); 370 370 return 0; 371 371 } 372 372 373 373 if (snac2->family != 0x000d) { 374 do_error_dialog(sess->aux_data, "recieved response that maps to corrupt request!", "Gaim");374 imcb_error(sess->aux_data, "recieved response that maps to corrupt request!"); 375 375 return 0; 376 376 } … … 389 389 ret = parseinfo_create(sess, mod, rx, snac, bs, snac2); 390 390 else 391 do_error_dialog(sess->aux_data, "unknown request subtype", "Gaim");391 imcb_error(sess->aux_data, "unknown request subtype"); 392 392 393 393 if (snac2) -
protocols/oscar/icq.c
r875ad42 r85d7b85 240 240 if (!(tl = aim_readtlvchain(bs)) || !(datatlv = aim_gettlv(tl, 0x0001, 1))) { 241 241 aim_freetlvchain(&tl); 242 do_error_dialog(sess->aux_data, "corrupt ICQ response\n", "Gaim");242 imcb_error(sess->aux_data, "corrupt ICQ response\n"); 243 243 return 0; 244 244 } -
protocols/oscar/im.c
r875ad42 r85d7b85 937 937 938 938 if (channel != 0x01) { 939 do_error_dialog(sess->aux_data, "icbm: ICBM recieved on unsupported channel. Ignoring.", "Gaim");939 imcb_error(sess->aux_data, "icbm: ICBM recieved on unsupported channel. Ignoring."); 940 940 return 0; 941 941 } … … 1345 1345 1346 1346 } else { 1347 // do_error_dialog(sess->aux_data, "Unknown TLV encountered", "Gaim");1347 // imcb_error(sess->aux_data, "Unknown TLV encountered"); 1348 1348 } 1349 1349 … … 1417 1417 guint8 *plugin; 1418 1418 int i = 0, tmp = 0; 1419 struct gaim_connection *gc = sess->aux_data;1419 struct im_connection *ic = sess->aux_data; 1420 1420 1421 1421 /* at the moment we just can deal with requests, not with cancel or accept */ … … 1469 1469 case 0x9c: /* ICQ 5 seems to send this */ 1470 1470 aim_send_im_ch2_statusmessage(sess, userinfo->sn, args->cookie, 1471 gc->away ? gc->away : "", sess->aim_icq_state, dc);1471 ic->away ? ic->away : "", sess->aim_icq_state, dc); 1472 1472 break; 1473 1473 … … 1517 1517 cookie2 = aimbs_getraw(&bbs, 8); 1518 1518 if (memcmp(cookie, cookie2, 8) != 0) 1519 do_error_dialog(sess->aux_data, "rend: warning cookies don't match!", "Gaim");1519 imcb_error(sess->aux_data, "rend: warning cookies don't match!"); 1520 1520 memcpy(args.cookie, cookie2, 8); 1521 1521 g_free(cookie2); … … 1783 1783 } else { 1784 1784 1785 do_error_dialog(sess->aux_data, "ICBM received on an unsupported channel. Ignoring.", "Gaim");1785 imcb_error(sess->aux_data, "ICBM received on an unsupported channel. Ignoring."); 1786 1786 1787 1787 return 0; -
protocols/oscar/info.c
r875ad42 r85d7b85 261 261 if (!identified) { 262 262 /*FIXME*/ 263 /*REMOVEME :-) 263 264 g_strdup_printf("unknown capability: {%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n", 264 265 cap[0], cap[1], cap[2], cap[3], … … 268 269 cap[10], cap[11], cap[12], cap[13], 269 270 cap[14], cap[15]); 270 271 */ 271 272 } 272 273 … … 473 474 */ 474 475 #ifdef DEBUG 475 // do_error_dialog(sess->aux_data, G_STRLOC, "Unknown TLV encountered");476 // imcb_error(sess->aux_data, G_STRLOC); 476 477 #endif 477 478 … … 634 635 635 636 if (!origsnac || !origsnac->data) { 636 do_error_dialog(sess->aux_data, "major problem: no snac stored!", "Gaim");637 imcb_error(sess->aux_data, "major problem: no snac stored!"); 637 638 return 0; 638 639 } … … 643 644 (inforeq->infotype != AIM_GETINFO_AWAYMESSAGE) && 644 645 (inforeq->infotype != AIM_GETINFO_CAPABILITIES)) { 645 do_error_dialog(sess->aux_data, "unknown infotype in request!", "Gaim");646 imcb_error(sess->aux_data, "unknown infotype in request!"); 646 647 return 0; 647 648 } -
protocols/oscar/msgcookie.c
r875ad42 r85d7b85 131 131 } 132 132 133 #if 0 /* debugging feature */134 int aim_dumpcookie(aim_msgcookie_t *cookie)135 {136 137 if (!cookie)138 return -EINVAL;139 140 printf("\tCookie at %p: %d/%s with %p, next %p\n",141 cookie, cookie->type, cookie->cookie,142 cookie->data, cookie->next);143 144 return 0;145 }146 #endif147 148 133 /** 149 134 * aim_cookie_free - free an aim_msgcookie_t struct -
protocols/oscar/oscar.c
r875ad42 r85d7b85 91 91 gboolean icq; 92 92 GSList *evilhack; 93 94 GHashTable *ips; 93 95 94 96 struct { … … 116 118 int inpa; 117 119 int id; 118 struct gaim_connection *gc; /* i hate this. */119 struct conversation*cnv; /* bah. */120 struct im_connection *ic; /* i hate this. */ 121 struct groupchat *cnv; /* bah. */ 120 122 int maxlen; 121 123 int maxvis; … … 123 125 124 126 struct ask_direct { 125 struct gaim_connection *gc;127 struct im_connection *ic; 126 128 char *sn; 127 129 char ip[64]; … … 130 132 131 133 struct icq_auth { 132 struct gaim_connection *gc;134 struct im_connection *ic; 133 135 guint32 uin; 134 136 }; … … 158 160 } 159 161 160 static struct chat_connection *find_oscar_chat(struct gaim_connection *gc, int id) { 161 GSList *g = ((struct oscar_data *)gc->proto_data)->oscar_chats; 162 struct chat_connection *c = NULL; 163 164 while (g) { 165 c = (struct chat_connection *)g->data; 166 if (c->id == id) 167 break; 168 g = g->next; 169 c = NULL; 170 } 171 172 return c; 173 } 174 175 176 static struct chat_connection *find_oscar_chat_by_conn(struct gaim_connection *gc, 162 static struct chat_connection *find_oscar_chat_by_conn(struct im_connection *ic, 177 163 aim_conn_t *conn) { 178 GSList *g = ((struct oscar_data *) gc->proto_data)->oscar_chats;164 GSList *g = ((struct oscar_data *)ic->proto_data)->oscar_chats; 179 165 struct chat_connection *c = NULL; 180 166 … … 255 241 static int msgerrreasonlen = 25; 256 242 257 static voidoscar_callback(gpointer data, gint source,258 GaimInputCondition condition) {243 static gboolean oscar_callback(gpointer data, gint source, 244 b_input_condition condition) { 259 245 aim_conn_t *conn = (aim_conn_t *)data; 260 246 aim_session_t *sess = aim_conn_getsess(conn); 261 struct gaim_connection *gc = sess ? sess->aux_data : NULL;247 struct im_connection *ic = sess ? sess->aux_data : NULL; 262 248 struct oscar_data *odata; 263 249 264 if (! gc) {265 /* gc is null. we return, else we seg SIGSEG on next line. */266 return ;250 if (!ic) { 251 /* ic is null. we return, else we seg SIGSEG on next line. */ 252 return FALSE; 267 253 } 268 254 269 if (!g_slist_find(get_connections(), gc)) {255 if (!g_slist_find(get_connections(), ic)) { 270 256 /* oh boy. this is probably bad. i guess the only thing we 271 257 * can really do is return? */ 272 return ;273 } 274 275 odata = (struct oscar_data *) gc->proto_data;258 return FALSE; 259 } 260 261 odata = (struct oscar_data *)ic->proto_data; 276 262 277 263 if (condition & GAIM_INPUT_READ) { … … 279 265 aim_rxdispatch(odata->sess); 280 266 if (odata->killme) 281 signoff(gc);267 imc_logout(ic, TRUE); 282 268 } else { 283 269 if ((conn->type == AIM_CONN_TYPE_BOS) || 284 270 !(aim_getconn_type(odata->sess, AIM_CONN_TYPE_BOS))) { 285 hide_login_progress_error(gc, _("Disconnected."));286 signoff(gc);271 imcb_error(ic, _("Disconnected.")); 272 imc_logout(ic, TRUE); 287 273 } else if (conn->type == AIM_CONN_TYPE_CHAT) { 288 struct chat_connection *c = find_oscar_chat_by_conn(gc, conn); 289 char buf[BUF_LONG]; 274 struct chat_connection *c = find_oscar_chat_by_conn(ic, conn); 290 275 c->conn = NULL; 291 276 if (c->inpa > 0) 292 gaim_input_remove(c->inpa);277 b_event_remove(c->inpa); 293 278 c->inpa = 0; 294 279 c->fd = -1; 295 280 aim_conn_kill(odata->sess, &conn); 296 sprintf(buf, _("You have been disconnected from chat room %s."), c->name); 297 do_error_dialog(sess->aux_data, buf, _("Chat Error!")); 281 imcb_error(sess->aux_data, _("You have been disconnected from chat room %s."), c->name); 298 282 } else if (conn->type == AIM_CONN_TYPE_CHATNAV) { 299 283 if (odata->cnpa > 0) 300 gaim_input_remove(odata->cnpa);284 b_event_remove(odata->cnpa); 301 285 odata->cnpa = 0; 302 286 while (odata->create_rooms) { … … 306 290 g_slist_remove(odata->create_rooms, cr); 307 291 g_free(cr); 308 do_error_dialog(sess->aux_data, _("Chat is currently unavailable"), 309 _("Gaim - Chat")); 292 imcb_error(sess->aux_data, _("Chat is currently unavailable")); 310 293 } 311 294 aim_conn_kill(odata->sess, &conn); 312 295 } else if (conn->type == AIM_CONN_TYPE_AUTH) { 313 296 if (odata->paspa > 0) 314 gaim_input_remove(odata->paspa);297 b_event_remove(odata->paspa); 315 298 odata->paspa = 0; 316 299 aim_conn_kill(odata->sess, &conn); … … 319 302 } 320 303 } 321 } 322 } 323 324 static void oscar_login_connect(gpointer data, gint source, GaimInputCondition cond) 304 } else { 305 /* WTF??? */ 306 return FALSE; 307 } 308 309 return TRUE; 310 } 311 312 static gboolean oscar_login_connect(gpointer data, gint source, b_input_condition cond) 325 313 { 326 struct gaim_connection *gc = data;314 struct im_connection *ic = data; 327 315 struct oscar_data *odata; 328 316 aim_session_t *sess; 329 317 aim_conn_t *conn; 330 318 331 if (!g_slist_find(get_connections(), gc)) {319 if (!g_slist_find(get_connections(), ic)) { 332 320 closesocket(source); 333 return ;334 } 335 336 odata = gc->proto_data;321 return FALSE; 322 } 323 324 odata = ic->proto_data; 337 325 sess = odata->sess; 338 326 conn = aim_getconn_type_all(sess, AIM_CONN_TYPE_AUTH); 339 327 340 328 if (source < 0) { 341 hide_login_progress(gc, _("Couldn't connect to host"));342 signoff(gc);343 return ;329 imcb_error(ic, _("Couldn't connect to host")); 330 imc_logout(ic, TRUE); 331 return FALSE; 344 332 } 345 333 346 334 aim_conn_completeconnect(sess, conn); 347 gc->inpa = gaim_input_add(conn->fd, GAIM_INPUT_READ,335 ic->inpa = b_input_add(conn->fd, GAIM_INPUT_READ, 348 336 oscar_callback, conn); 349 } 350 351 static void oscar_login(struct aim_user *user) { 337 338 return FALSE; 339 } 340 341 static void oscar_init(account_t *acc) 342 { 343 set_t *s; 344 345 s = set_add( &acc->set, "server", AIM_DEFAULT_LOGIN_SERVER, set_eval_account, acc ); 346 s->flags |= ACC_SET_NOSAVE | ACC_SET_OFFLINE_ONLY; 347 348 if (isdigit(acc->user[0])) { 349 s = set_add( &acc->set, "web_aware", "false", set_eval_bool, acc ); 350 s->flags |= ACC_SET_OFFLINE_ONLY; 351 } 352 } 353 354 static void oscar_login(account_t *acc) { 352 355 aim_session_t *sess; 353 356 aim_conn_t *conn; 354 char buf[256]; 355 struct gaim_connection *gc = new_gaim_conn(user); 356 struct oscar_data *odata = gc->proto_data = g_new0(struct oscar_data, 1); 357 358 if (isdigit(*user->username)) { 357 struct im_connection *ic = imcb_new(acc); 358 struct oscar_data *odata = ic->proto_data = g_new0(struct oscar_data, 1); 359 360 if (isdigit(acc->user[0])) 359 361 odata->icq = TRUE; 360 /* This is odd but it's necessary for a proper do_import and do_export. 361 We don't do those anymore, but let's stick with it, just in case 362 it accidentally fixes something else too... */ 363 gc->password[8] = 0; 364 } else { 365 gc->flags |= OPT_CONN_HTML; 366 } 362 else 363 ic->flags |= OPT_DOES_HTML; 367 364 368 365 sess = g_new0(aim_session_t, 1); … … 374 371 aim_tx_setenqueue(sess, AIM_TX_IMMEDIATE, NULL); 375 372 odata->sess = sess; 376 sess->aux_data = gc;373 sess->aux_data = ic; 377 374 378 375 conn = aim_newconn(sess, AIM_CONN_TYPE_AUTH, NULL); 379 376 if (conn == NULL) { 380 hide_login_progress(gc, _("Unable to login to AIM"));381 signoff(gc);377 imcb_error(ic, _("Unable to login to AIM")); 378 imc_logout(ic, TRUE); 382 379 return; 383 380 } 384 381 385 if (g_strcasecmp(user->proto_opt[USEROPT_AUTH], "login.icq.com") != 0 && 386 g_strcasecmp(user->proto_opt[USEROPT_AUTH], "login.oscar.aol.com") != 0) { 387 serv_got_crap(gc, "Warning: Unknown OSCAR server: `%s'. Please review your configuration if the connection fails.",user->proto_opt[USEROPT_AUTH]); 388 } 389 390 g_snprintf(buf, sizeof(buf), _("Signon: %s"), gc->username); 391 set_login_progress(gc, 2, buf); 382 imcb_log(ic, _("Signon: %s"), ic->acc->user); 392 383 393 384 aim_conn_addhandler(sess, conn, 0x0017, 0x0007, gaim_parse_login, 0); … … 395 386 396 387 conn->status |= AIM_CONN_STATUS_INPROGRESS; 397 conn->fd = proxy_connect(user->proto_opt[USEROPT_AUTH][0] ? 398 user->proto_opt[USEROPT_AUTH] : AIM_DEFAULT_LOGIN_SERVER, 399 user->proto_opt[USEROPT_AUTHPORT][0] ? 400 atoi(user->proto_opt[USEROPT_AUTHPORT]) : AIM_LOGIN_PORT, 401 oscar_login_connect, gc); 388 conn->fd = proxy_connect(set_getstr(&acc->set, "server"), 389 AIM_LOGIN_PORT, oscar_login_connect, ic); 402 390 if (conn->fd < 0) { 403 hide_login_progress(gc, _("Couldn't connect to host"));404 signoff(gc);391 imcb_error(ic, _("Couldn't connect to host")); 392 imc_logout(ic, TRUE); 405 393 return; 406 394 } 407 aim_request_login(sess, conn, gc->username);408 } 409 410 static void oscar_ close(struct gaim_connection *gc) {411 struct oscar_data *odata = (struct oscar_data *) gc->proto_data;395 aim_request_login(sess, conn, ic->acc->user); 396 } 397 398 static void oscar_logout(struct im_connection *ic) { 399 struct oscar_data *odata = (struct oscar_data *)ic->proto_data; 412 400 413 401 while (odata->oscar_chats) { 414 402 struct chat_connection *n = odata->oscar_chats->data; 415 403 if (n->inpa > 0) 416 gaim_input_remove(n->inpa);404 b_event_remove(n->inpa); 417 405 g_free(n->name); 418 406 g_free(n->show); … … 426 414 g_free(cr); 427 415 } 416 if (odata->ips) 417 g_hash_table_destroy(odata->ips); 428 418 if (odata->email) 429 419 g_free(odata->email); … … 432 422 if (odata->oldp) 433 423 g_free(odata->oldp); 434 if ( gc->inpa > 0)435 gaim_input_remove(gc->inpa);424 if (ic->inpa > 0) 425 b_event_remove(ic->inpa); 436 426 if (odata->cnpa > 0) 437 gaim_input_remove(odata->cnpa);427 b_event_remove(odata->cnpa); 438 428 if (odata->paspa > 0) 439 gaim_input_remove(odata->paspa);429 b_event_remove(odata->paspa); 440 430 aim_session_kill(odata->sess); 441 431 g_free(odata->sess); 442 432 odata->sess = NULL; 443 g_free( gc->proto_data);444 gc->proto_data = NULL;445 } 446 447 static void oscar_bos_connect(gpointer data, gint source, GaimInputCondition cond) {448 struct gaim_connection *gc = data;433 g_free(ic->proto_data); 434 ic->proto_data = NULL; 435 } 436 437 static gboolean oscar_bos_connect(gpointer data, gint source, b_input_condition cond) { 438 struct im_connection *ic = data; 449 439 struct oscar_data *odata; 450 440 aim_session_t *sess; 451 441 aim_conn_t *bosconn; 452 442 453 if (!g_slist_find(get_connections(), gc)) {443 if (!g_slist_find(get_connections(), ic)) { 454 444 closesocket(source); 455 return ;456 } 457 458 odata = gc->proto_data;445 return FALSE; 446 } 447 448 odata = ic->proto_data; 459 449 sess = odata->sess; 460 450 bosconn = odata->conn; 461 451 462 452 if (source < 0) { 463 hide_login_progress(gc, _("Could Not Connect"));464 signoff(gc);465 return ;453 imcb_error(ic, _("Could Not Connect")); 454 imc_logout(ic, TRUE); 455 return FALSE; 466 456 } 467 457 468 458 aim_conn_completeconnect(sess, bosconn); 469 gc->inpa = gaim_input_add(bosconn->fd, GAIM_INPUT_READ,459 ic->inpa = b_input_add(bosconn->fd, GAIM_INPUT_READ, 470 460 oscar_callback, bosconn); 471 set_login_progress(gc, 4, _("Connection established, cookie sent")); 461 imcb_log(ic, _("Connection established, cookie sent")); 462 463 return FALSE; 472 464 } 473 465 … … 476 468 struct aim_authresp_info *info; 477 469 int i; char *host; int port; 478 struct aim_user *user;479 470 aim_conn_t *bosconn; 480 471 481 struct gaim_connection *gc = sess->aux_data; 482 struct oscar_data *od = gc->proto_data; 483 user = gc->user; 484 port = user->proto_opt[USEROPT_AUTHPORT][0] ? 485 atoi(user->proto_opt[USEROPT_AUTHPORT]) : AIM_LOGIN_PORT, 472 struct im_connection *ic = sess->aux_data; 473 struct oscar_data *od = ic->proto_data; 474 port = AIM_LOGIN_PORT; 486 475 487 476 va_start(ap, fr); … … 493 482 case 0x05: 494 483 /* Incorrect nick/password */ 495 hide_login_progress(gc, _("Incorrect nickname or password."));484 imcb_error(ic, _("Incorrect nickname or password.")); 496 485 // plugin_event(event_error, (void *)980, 0, 0, 0); 497 486 break; 498 487 case 0x11: 499 488 /* Suspended account */ 500 hide_login_progress(gc, _("Your account is currently suspended."));489 imcb_error(ic, _("Your account is currently suspended.")); 501 490 break; 502 491 case 0x18: 503 492 /* connecting too frequently */ 504 hide_login_progress(gc, _("You have been connecting and disconnecting too frequently. Wait ten minutes and try again. If you continue to try, you will need to wait even longer."));493 imcb_error(ic, _("You have been connecting and disconnecting too frequently. Wait ten minutes and try again. If you continue to try, you will need to wait even longer.")); 505 494 break; 506 495 case 0x1c: 507 496 /* client too old */ 508 hide_login_progress(gc, _("The client version you are using is too old. Please upgrade at " WEBSITE));497 imcb_error(ic, _("The client version you are using is too old. Please upgrade at " WEBSITE)); 509 498 break; 510 499 default: 511 hide_login_progress(gc, _("Authentication Failed"));500 imcb_error(ic, _("Authentication Failed")); 512 501 break; 513 502 } … … 521 510 bosconn = aim_newconn(sess, AIM_CONN_TYPE_BOS, NULL); 522 511 if (bosconn == NULL) { 523 hide_login_progress(gc, _("Internal Error"));512 imcb_error(ic, _("Internal Error")); 524 513 od->killme = TRUE; 525 514 return 0; … … 555 544 aim_conn_addhandler(sess, bosconn, AIM_CB_FAM_MSG, AIM_CB_MSG_MTN, gaim_parsemtn, 0); 556 545 557 ((struct oscar_data *) gc->proto_data)->conn = bosconn;546 ((struct oscar_data *)ic->proto_data)->conn = bosconn; 558 547 for (i = 0; i < (int)strlen(info->bosip); i++) { 559 548 if (info->bosip[i] == ':') { … … 564 553 host = g_strndup(info->bosip, i); 565 554 bosconn->status |= AIM_CONN_STATUS_INPROGRESS; 566 bosconn->fd = proxy_connect(host, port, oscar_bos_connect, gc);555 bosconn->fd = proxy_connect(host, port, oscar_bos_connect, ic); 567 556 g_free(host); 568 557 if (bosconn->fd < 0) { 569 hide_login_progress(gc, _("Could Not Connect"));558 imcb_error(ic, _("Could Not Connect")); 570 559 od->killme = TRUE; 571 560 return 0; 572 561 } 573 562 aim_sendcookie(sess, bosconn, info->cookie); 574 gaim_input_remove(gc->inpa);563 b_event_remove(ic->inpa); 575 564 576 565 return 1; … … 578 567 579 568 struct pieceofcrap { 580 struct gaim_connection *gc;569 struct im_connection *ic; 581 570 unsigned long offset; 582 571 unsigned long len; … … 587 576 }; 588 577 589 static void damn_you(gpointer data, gint source, GaimInputCondition c)578 static gboolean damn_you(gpointer data, gint source, b_input_condition c) 590 579 { 591 580 struct pieceofcrap *pos = data; 592 struct oscar_data *od = pos-> gc->proto_data;581 struct oscar_data *od = pos->ic->proto_data; 593 582 char in = '\0'; 594 583 int x = 0; … … 605 594 } 606 595 if (in != '\n') { 607 do_error_dialog(pos->gc, "Gaim was unable to get a valid hash for logging into AIM."608 " You may be disconnected shortly." , "Login Error");609 gaim_input_remove(pos->inpa);596 imcb_error(pos->ic, "Gaim was unable to get a valid hash for logging into AIM." 597 " You may be disconnected shortly."); 598 b_event_remove(pos->inpa); 610 599 closesocket(pos->fd); 611 600 g_free(pos); 612 return ;601 return FALSE; 613 602 } 614 603 /* [WvG] Wheeeee! Who needs error checking anyway? ;-) */ 615 604 read(pos->fd, m, 16); 616 605 m[16] = '\0'; 617 gaim_input_remove(pos->inpa);606 b_event_remove(pos->inpa); 618 607 closesocket(pos->fd); 619 608 aim_sendmemblock(od->sess, pos->conn, 0, 16, m, AIM_SENDMEMBLOCK_FLAG_ISHASH); 620 609 g_free(pos); 621 } 622 623 static void straight_to_hell(gpointer data, gint source, GaimInputCondition cond) { 610 611 return FALSE; 612 } 613 614 static gboolean straight_to_hell(gpointer data, gint source, b_input_condition cond) { 624 615 struct pieceofcrap *pos = data; 625 616 char buf[BUF_LONG]; 626 617 627 618 if (source < 0) { 628 do_error_dialog(pos->gc, "Gaim was unable to get a valid hash for logging into AIM."629 " You may be disconnected shortly." , "Login Error");619 imcb_error(pos->ic, "Gaim was unable to get a valid hash for logging into AIM." 620 " You may be disconnected shortly."); 630 621 if (pos->modname) 631 622 g_free(pos->modname); 632 623 g_free(pos); 633 return ;624 return FALSE; 634 625 } 635 626 … … 640 631 if (pos->modname) 641 632 g_free(pos->modname); 642 pos->inpa = gaim_input_add(pos->fd, GAIM_INPUT_READ, damn_you, pos);643 return ;633 pos->inpa = b_input_add(pos->fd, GAIM_INPUT_READ, damn_you, pos); 634 return FALSE; 644 635 } 645 636 … … 692 683 693 684 pos = g_new0(struct pieceofcrap, 1); 694 pos-> gc = sess->aux_data;685 pos->ic = sess->aux_data; 695 686 pos->conn = fr->conn; 696 687 … … 704 695 g_free(pos->modname); 705 696 g_free(pos); 706 do_error_dialog(sess->aux_data, "Gaim was unable to get a valid hash for logging into AIM."707 " You may be disconnected shortly." , "Login Error");697 imcb_error(sess->aux_data, "Gaim was unable to get a valid hash for logging into AIM." 698 " You may be disconnected shortly."); 708 699 } 709 700 pos->fd = fd; … … 720 711 char *key; 721 712 va_list ap; 722 struct gaim_connection *gc = sess->aux_data;713 struct im_connection *ic = sess->aux_data; 723 714 724 715 va_start(ap, fr); … … 726 717 va_end(ap); 727 718 728 aim_send_login(sess, fr->conn, gc->username, gc->password, &info, key);719 aim_send_login(sess, fr->conn, ic->acc->user, ic->acc->pass, &info, key); 729 720 730 721 return 1; … … 732 723 733 724 static int conninitdone_chat(aim_session_t *sess, aim_frame_t *fr, ...) { 734 struct gaim_connection *gc = sess->aux_data;725 struct im_connection *ic = sess->aux_data; 735 726 struct chat_connection *chatcon; 736 727 static int id = 1; … … 744 735 aim_clientready(sess, fr->conn); 745 736 746 chatcon = find_oscar_chat_by_conn( gc, fr->conn);737 chatcon = find_oscar_chat_by_conn(ic, fr->conn); 747 738 chatcon->id = id; 748 chatcon->cnv = serv_got_joined_chat(gc, id++, chatcon->show); 739 chatcon->cnv = imcb_chat_new(ic, chatcon->show); 740 chatcon->cnv->data = chatcon; 749 741 750 742 return 1; … … 763 755 } 764 756 765 static void oscar_chatnav_connect(gpointer data, gint source, GaimInputCondition cond) {766 struct gaim_connection *gc = data;757 static gboolean oscar_chatnav_connect(gpointer data, gint source, b_input_condition cond) { 758 struct im_connection *ic = data; 767 759 struct oscar_data *odata; 768 760 aim_session_t *sess; 769 761 aim_conn_t *tstconn; 770 762 771 if (!g_slist_find(get_connections(), gc)) {763 if (!g_slist_find(get_connections(), ic)) { 772 764 closesocket(source); 773 return ;774 } 775 776 odata = gc->proto_data;765 return FALSE; 766 } 767 768 odata = ic->proto_data; 777 769 sess = odata->sess; 778 770 tstconn = aim_getconn_type_all(sess, AIM_CONN_TYPE_CHATNAV); … … 780 772 if (source < 0) { 781 773 aim_conn_kill(sess, &tstconn); 782 return ;774 return FALSE; 783 775 } 784 776 785 777 aim_conn_completeconnect(sess, tstconn); 786 odata->cnpa = gaim_input_add(tstconn->fd, GAIM_INPUT_READ,778 odata->cnpa = b_input_add(tstconn->fd, GAIM_INPUT_READ, 787 779 oscar_callback, tstconn); 788 } 789 790 static void oscar_auth_connect(gpointer data, gint source, GaimInputCondition cond) 780 781 return FALSE; 782 } 783 784 static gboolean oscar_auth_connect(gpointer data, gint source, b_input_condition cond) 791 785 { 792 struct gaim_connection *gc = data;786 struct im_connection *ic = data; 793 787 struct oscar_data *odata; 794 788 aim_session_t *sess; 795 789 aim_conn_t *tstconn; 796 790 797 if (!g_slist_find(get_connections(), gc)) {791 if (!g_slist_find(get_connections(), ic)) { 798 792 closesocket(source); 799 return ;800 } 801 802 odata = gc->proto_data;793 return FALSE; 794 } 795 796 odata = ic->proto_data; 803 797 sess = odata->sess; 804 798 tstconn = aim_getconn_type_all(sess, AIM_CONN_TYPE_AUTH); … … 806 800 if (source < 0) { 807 801 aim_conn_kill(sess, &tstconn); 808 return ;802 return FALSE; 809 803 } 810 804 811 805 aim_conn_completeconnect(sess, tstconn); 812 odata->paspa = gaim_input_add(tstconn->fd, GAIM_INPUT_READ,806 odata->paspa = b_input_add(tstconn->fd, GAIM_INPUT_READ, 813 807 oscar_callback, tstconn); 814 } 815 816 static void oscar_chat_connect(gpointer data, gint source, GaimInputCondition cond) 808 809 return FALSE; 810 } 811 812 static gboolean oscar_chat_connect(gpointer data, gint source, b_input_condition cond) 817 813 { 818 814 struct chat_connection *ccon = data; 819 struct gaim_connection *gc = ccon->gc;815 struct im_connection *ic = ccon->ic; 820 816 struct oscar_data *odata; 821 817 aim_session_t *sess; 822 818 aim_conn_t *tstconn; 823 819 824 if (!g_slist_find(get_connections(), gc)) {820 if (!g_slist_find(get_connections(), ic)) { 825 821 closesocket(source); 826 822 g_free(ccon->show); 827 823 g_free(ccon->name); 828 824 g_free(ccon); 829 return ;830 } 831 832 odata = gc->proto_data;825 return FALSE; 826 } 827 828 odata = ic->proto_data; 833 829 sess = odata->sess; 834 830 tstconn = ccon->conn; … … 839 835 g_free(ccon->name); 840 836 g_free(ccon); 841 return ;837 return FALSE; 842 838 } 843 839 844 840 aim_conn_completeconnect(sess, ccon->conn); 845 ccon->inpa = gaim_input_add(tstconn->fd,841 ccon->inpa = b_input_add(tstconn->fd, 846 842 GAIM_INPUT_READ, 847 843 oscar_callback, tstconn); 848 844 odata->oscar_chats = g_slist_append(odata->oscar_chats, ccon); 845 846 return FALSE; 849 847 } 850 848 … … 853 851 va_list ap; 854 852 struct aim_redirect_data *redir; 855 struct gaim_connection *gc = sess->aux_data; 856 struct aim_user *user = gc->user; 853 struct im_connection *ic = sess->aux_data; 857 854 aim_conn_t *tstconn; 858 855 int i; … … 860 857 int port; 861 858 862 port = user->proto_opt[USEROPT_AUTHPORT][0] ?863 atoi(user->proto_opt[USEROPT_AUTHPORT]) : AIM_LOGIN_PORT,864 865 859 va_start(ap, fr); 866 860 redir = va_arg(ap, struct aim_redirect_data *); 867 861 va_end(ap); 868 862 863 port = AIM_LOGIN_PORT; 869 864 for (i = 0; i < (int)strlen(redir->ip); i++) { 870 865 if (redir->ip[i] == ':') { … … 888 883 889 884 tstconn->status |= AIM_CONN_STATUS_INPROGRESS; 890 tstconn->fd = proxy_connect(host, port, oscar_auth_connect, gc);885 tstconn->fd = proxy_connect(host, port, oscar_auth_connect, ic); 891 886 if (tstconn->fd < 0) { 892 887 aim_conn_kill(sess, &tstconn); … … 905 900 906 901 tstconn->status |= AIM_CONN_STATUS_INPROGRESS; 907 tstconn->fd = proxy_connect(host, port, oscar_chatnav_connect, gc);902 tstconn->fd = proxy_connect(host, port, oscar_chatnav_connect, ic); 908 903 if (tstconn->fd < 0) { 909 904 aim_conn_kill(sess, &tstconn); … … 927 922 ccon = g_new0(struct chat_connection, 1); 928 923 ccon->conn = tstconn; 929 ccon-> gc = gc;924 ccon->ic = ic; 930 925 ccon->fd = -1; 931 926 ccon->name = g_strdup(redir->chat.room); … … 956 951 957 952 static int gaim_parse_oncoming(aim_session_t *sess, aim_frame_t *fr, ...) { 958 struct gaim_connection *gc = sess->aux_data;959 struct oscar_data *od = gc->proto_data;953 struct im_connection *ic = sess->aux_data; 954 struct oscar_data *od = ic->proto_data; 960 955 aim_userinfo_t *info; 961 956 time_t time_idle = 0, signon = 0; 962 int type = 0; 963 int caps = 0; 964 char *tmp; 957 int flags = OPT_LOGGED_IN; 958 char *tmp, *state_string = NULL; 965 959 966 960 va_list ap; … … 969 963 va_end(ap); 970 964 971 if (info->present & AIM_USERINFO_PRESENT_CAPABILITIES)972 caps = info->capabilities;973 if (info->flags & AIM_FLAG_ACTIVEBUDDY)974 type |= UC_AB;975 976 965 if ((!od->icq) && (info->present & AIM_USERINFO_PRESENT_FLAGS)) { 977 if (info->flags & AIM_FLAG_UNCONFIRMED)978 type |= UC_UNCONFIRMED;979 if (info->flags & AIM_FLAG_ADMINISTRATOR)980 type |= UC_ADMIN;981 if (info->flags & AIM_FLAG_AOL)982 type |= UC_AOL;983 if (info->flags & AIM_FLAG_FREE)984 type |= UC_NORMAL;985 966 if (info->flags & AIM_FLAG_AWAY) 986 type |= UC_UNAVAILABLE; 987 if (info->flags & AIM_FLAG_WIRELESS) 988 type |= UC_WIRELESS; 989 } 967 flags |= OPT_AWAY; 968 } 969 990 970 if (info->present & AIM_USERINFO_PRESENT_ICQEXTSTATUS) { 991 type = (info->icqinfo.status << 7);992 971 if (!(info->icqinfo.status & AIM_ICQ_STATE_CHAT) && 993 972 (info->icqinfo.status != AIM_ICQ_STATE_NORMAL)) { 994 type |= UC_UNAVAILABLE; 995 } 996 } 997 998 if (caps & AIM_CAPS_ICQ) 999 caps ^= AIM_CAPS_ICQ; 973 flags |= OPT_AWAY; 974 } 975 976 if( info->icqinfo.status & AIM_ICQ_STATE_DND ) 977 state_string = "Do Not Disturb"; 978 else if( info->icqinfo.status & AIM_ICQ_STATE_OUT ) 979 state_string = "Not Available"; 980 else if( info->icqinfo.status & AIM_ICQ_STATE_BUSY ) 981 state_string = "Occupied"; 982 else if( info->icqinfo.status & AIM_ICQ_STATE_INVISIBLE ) 983 state_string = "Invisible"; 984 } 1000 985 1001 986 if (info->present & AIM_USERINFO_PRESENT_IDLE) { … … 1007 992 signon = time(NULL) - info->sessionlen; 1008 993 1009 tmp = g_strdup(normalize(gc->username)); 994 if (info->present & AIM_USERINFO_PRESENT_ICQIPADDR) { 995 uint32_t *uin = g_new0(uint32_t, 1); 996 997 if (od->ips == NULL) 998 od->ips = g_hash_table_new_full(g_int_hash, g_int_equal, g_free, NULL); 999 1000 if (sscanf(info->sn, "%d", uin) == 1) 1001 g_hash_table_insert(od->ips, uin, (gpointer) (long) info->icqinfo.ipaddr); 1002 } 1003 1004 tmp = g_strdup(normalize(ic->acc->user)); 1010 1005 if (!strcmp(tmp, normalize(info->sn))) 1011 g_snprintf( gc->displayname, sizeof(gc->displayname), "%s", info->sn);1006 g_snprintf(ic->displayname, sizeof(ic->displayname), "%s", info->sn); 1012 1007 g_free(tmp); 1013 1008 1014 serv_got_update(gc, info->sn, 1, info->warnlevel/10, signon,1015 time_idle, type, caps);1009 imcb_buddy_status(ic, info->sn, flags, state_string, NULL); 1010 /* imcb_buddy_times(ic, info->sn, signon, time_idle); */ 1016 1011 1017 1012 return 1; … … 1021 1016 aim_userinfo_t *info; 1022 1017 va_list ap; 1023 struct gaim_connection *gc = sess->aux_data;1018 struct im_connection *ic = sess->aux_data; 1024 1019 1025 1020 va_start(ap, fr); … … 1027 1022 va_end(ap); 1028 1023 1029 serv_got_update(gc, info->sn, 0, 0, 0, 0, 0, 0);1024 imcb_buddy_status(ic, info->sn, 0, NULL, NULL ); 1030 1025 1031 1026 return 1; … … 1034 1029 static int incomingim_chan1(aim_session_t *sess, aim_conn_t *conn, aim_userinfo_t *userinfo, struct aim_incomingim_ch1_args *args) { 1035 1030 char *tmp = g_malloc(BUF_LONG + 1); 1036 struct gaim_connection *gc = sess->aux_data;1031 struct im_connection *ic = sess->aux_data; 1037 1032 int flags = 0; 1038 1033 1039 1034 if (args->icbmflags & AIM_IMFLAGS_AWAY) 1040 flags |= IM_FLAG_AWAY;1035 flags |= OPT_AWAY; 1041 1036 1042 1037 if ((args->icbmflags & AIM_IMFLAGS_UNICODE) || (args->icbmflags & AIM_IMFLAGS_ISO_8859_1)) { … … 1068 1063 g_snprintf(tmp, BUF_LONG, "%s", args->msg); 1069 1064 } 1070 } else 1065 } else if (args->mpmsg.numparts == 0) { 1071 1066 g_snprintf(tmp, BUF_LONG, "%s", args->msg); 1067 } else { 1068 aim_mpmsg_section_t *part; 1069 1070 *tmp = 0; 1071 for (part = args->mpmsg.parts; part; part = part->next) { 1072 if (part->data) { 1073 g_strlcat(tmp, (char*) part->data, BUF_LONG); 1074 g_strlcat(tmp, "\n", BUF_LONG); 1075 } 1076 } 1077 } 1072 1078 1073 1079 strip_linefeed(tmp); 1074 serv_got_im(gc, userinfo->sn, tmp, flags, time(NULL), -1);1080 imcb_buddy_msg(ic, userinfo->sn, tmp, flags, 0); 1075 1081 g_free(tmp); 1076 1082 … … 1082 1088 1083 1089 static int incomingim_chan2(aim_session_t *sess, aim_conn_t *conn, aim_userinfo_t *userinfo, struct aim_incomingim_ch2_args *args) { 1084 struct gaim_connection *gc = sess->aux_data;1090 struct im_connection *ic = sess->aux_data; 1085 1091 1086 1092 if (args->status != AIM_RENDEZVOUS_PROPOSE) … … 1100 1106 g_snprintf( txt, 1024, "Got an invitation to chatroom %s from %s: %s", name, userinfo->sn, args->msg ); 1101 1107 1102 inv-> gc = gc;1108 inv->ic = ic; 1103 1109 inv->exchange = *exch; 1104 1110 inv->name = g_strdup(name); 1105 1111 1106 do_ask_dialog( gc, txt, inv, oscar_accept_chat, oscar_reject_chat);1112 imcb_ask( ic, txt, inv, oscar_accept_chat, oscar_reject_chat); 1107 1113 1108 1114 if (name) … … 1115 1121 static void gaim_icq_authgrant(gpointer w, struct icq_auth *data) { 1116 1122 char *uin, message; 1117 struct oscar_data *od = (struct oscar_data *)data-> gc->proto_data;1123 struct oscar_data *od = (struct oscar_data *)data->ic->proto_data; 1118 1124 1119 1125 uin = g_strdup_printf("%u", data->uin); … … 1121 1127 aim_ssi_auth_reply(od->sess, od->conn, uin, 1, ""); 1122 1128 // aim_send_im_ch4(od->sess, uin, AIM_ICQMSG_AUTHGRANTED, &message); 1123 if( find_buddy(data->gc, uin) == NULL)1124 show_got_added(data->gc, uin, NULL);1129 if(imcb_find_buddy(data->ic, uin) == NULL) 1130 imcb_ask_add(data->ic, uin, NULL); 1125 1131 1126 1132 g_free(uin); … … 1130 1136 static void gaim_icq_authdeny(gpointer w, struct icq_auth *data) { 1131 1137 char *uin, *message; 1132 struct oscar_data *od = (struct oscar_data *)data-> gc->proto_data;1138 struct oscar_data *od = (struct oscar_data *)data->ic->proto_data; 1133 1139 1134 1140 uin = g_strdup_printf("%u", data->uin); … … 1145 1151 * For when other people ask you for authorization 1146 1152 */ 1147 static void gaim_icq_authask(struct gaim_connection *gc, guint32 uin, char *msg) {1153 static void gaim_icq_authask(struct im_connection *ic, guint32 uin, char *msg) { 1148 1154 struct icq_auth *data = g_new(struct icq_auth, 1); 1149 1155 char *reason = NULL; … … 1154 1160 1155 1161 dialog_msg = g_strdup_printf("The user %u wants to add you to their buddy list for the following reason: %s", uin, reason ? reason : "No reason given."); 1156 data-> gc = gc;1162 data->ic = ic; 1157 1163 data->uin = uin; 1158 do_ask_dialog(gc, dialog_msg, data, gaim_icq_authgrant, gaim_icq_authdeny);1164 imcb_ask(ic, dialog_msg, data, gaim_icq_authgrant, gaim_icq_authdeny); 1159 1165 g_free(dialog_msg); 1160 1166 } 1161 1167 1162 1168 static int incomingim_chan4(aim_session_t *sess, aim_conn_t *conn, aim_userinfo_t *userinfo, struct aim_incomingim_ch4_args *args) { 1163 struct gaim_connection *gc = sess->aux_data;1169 struct im_connection *ic = sess->aux_data; 1164 1170 1165 1171 switch (args->type) { … … 1169 1175 message = g_strdup(args->msg); 1170 1176 strip_linefeed(message); 1171 serv_got_im(gc, uin, message, 0, time(NULL), -1);1177 imcb_buddy_msg(ic, uin, message, 0, 0); 1172 1178 g_free(uin); 1173 1179 g_free(message); … … 1188 1194 1189 1195 strip_linefeed(message); 1190 serv_got_im(gc, uin, message, 0, time(NULL), -1);1196 imcb_buddy_msg(ic, uin, message, 0, 0); 1191 1197 g_free(uin); 1192 1198 g_free(m); … … 1195 1201 1196 1202 case 0x0006: { /* Someone requested authorization */ 1197 gaim_icq_authask( gc, args->uin, args->msg);1203 gaim_icq_authask(ic, args->uin, args->msg); 1198 1204 } break; 1199 1205 1200 1206 case 0x0007: { /* Someone has denied you authorization */ 1201 serv_got_crap(sess->aux_data, "The user %u has denied your request to add them to your contact list for the following reason:\n%s", args->uin, args->msg ? args->msg : _("No reason given.") );1207 imcb_log(sess->aux_data, "The user %u has denied your request to add them to your contact list for the following reason:\n%s", args->uin, args->msg ? args->msg : _("No reason given.") ); 1202 1208 } break; 1203 1209 1204 1210 case 0x0008: { /* Someone has granted you authorization */ 1205 serv_got_crap(sess->aux_data, "The user %u has granted your request to add them to your contact list for the following reason:\n%s", args->uin, args->msg ? args->msg : _("No reason given.") );1211 imcb_log(sess->aux_data, "The user %u has granted your request to add them to your contact list for the following reason:\n%s", args->uin, args->msg ? args->msg : _("No reason given.") ); 1206 1212 } break; 1207 1213 … … 1225 1231 channel = va_arg(ap, int); 1226 1232 userinfo = va_arg(ap, aim_userinfo_t *); 1227 1228 if (set_getint(sess->aux_data, "debug")) {1229 serv_got_crap(sess->aux_data, "channel %i called", channel);1230 }1231 1233 1232 1234 switch (channel) { … … 1262 1264 guint16 chan, nummissed, reason; 1263 1265 aim_userinfo_t *userinfo; 1264 char buf[1024];1265 1266 1266 1267 va_start(ap, fr); … … 1274 1275 case 0: 1275 1276 /* Invalid (0) */ 1276 g_snprintf(buf, 1277 sizeof(buf), 1277 imcb_error(sess->aux_data, 1278 1278 nummissed == 1 ? 1279 1279 _("You missed %d message from %s because it was invalid.") : … … 1284 1284 case 1: 1285 1285 /* Message too large */ 1286 g_snprintf(buf, 1287 sizeof(buf), 1286 imcb_error(sess->aux_data, 1288 1287 nummissed == 1 ? 1289 1288 _("You missed %d message from %s because it was too large.") : … … 1294 1293 case 2: 1295 1294 /* Rate exceeded */ 1296 g_snprintf(buf, 1297 sizeof(buf), 1295 imcb_error(sess->aux_data, 1298 1296 nummissed == 1 ? 1299 1297 _("You missed %d message from %s because the rate limit has been exceeded.") : … … 1304 1302 case 3: 1305 1303 /* Evil Sender */ 1306 g_snprintf(buf, 1307 sizeof(buf), 1304 imcb_error(sess->aux_data, 1308 1305 nummissed == 1 ? 1309 1306 _("You missed %d message from %s because it was too evil.") : … … 1314 1311 case 4: 1315 1312 /* Evil Receiver */ 1316 g_snprintf(buf, 1317 sizeof(buf), 1313 imcb_error(sess->aux_data, 1318 1314 nummissed == 1 ? 1319 1315 _("You missed %d message from %s because you are too evil.") : … … 1323 1319 break; 1324 1320 default: 1325 g_snprintf(buf, 1326 sizeof(buf), 1321 imcb_error(sess->aux_data, 1327 1322 nummissed == 1 ? 1328 1323 _("You missed %d message from %s for unknown reasons.") : … … 1332 1327 break; 1333 1328 } 1334 do_error_dialog(sess->aux_data, buf, _("Gaim - Error"));1335 1329 1336 1330 return 1; … … 1340 1334 va_list ap; 1341 1335 guint16 reason; 1342 char *m;1343 1336 1344 1337 va_start(ap, fr); … … 1346 1339 va_end(ap); 1347 1340 1348 m = g_strdup_printf(_("SNAC threw error: %s\n"), 1349 reason < msgerrreasonlen ? msgerrreason[reason] : "Unknown error"); 1350 do_error_dialog(sess->aux_data, m, _("Gaim - Oscar SNAC Error")); 1351 g_free(m); 1341 imcb_error(sess->aux_data, _("SNAC threw error: %s"), 1342 reason < msgerrreasonlen ? msgerrreason[reason] : "Unknown error"); 1352 1343 1353 1344 return 1; … … 1358 1349 char *destn; 1359 1350 guint16 reason; 1360 char buf[1024];1361 1351 1362 1352 va_start(ap, fr); … … 1365 1355 va_end(ap); 1366 1356 1367 sprintf(buf, _("Your message to %s did not get sent: %s"), destn,1357 imcb_error(sess->aux_data, _("Your message to %s did not get sent: %s"), destn, 1368 1358 (reason < msgerrreasonlen) ? msgerrreason[reason] : _("Reason unknown")); 1369 do_error_dialog(sess->aux_data, buf, _("Gaim - Error"));1370 1359 1371 1360 return 1; … … 1376 1365 char *destn; 1377 1366 guint16 reason; 1378 char buf[1024];1379 1367 1380 1368 va_start(ap, fr); … … 1383 1371 va_end(ap); 1384 1372 1385 sprintf(buf, _("User information for %s unavailable: %s"), destn,1373 imcb_error(sess->aux_data, _("User information for %s unavailable: %s"), destn, 1386 1374 (reason < msgerrreasonlen) ? msgerrreason[reason] : _("Reason unknown")); 1387 do_error_dialog(sess->aux_data, buf, _("Gaim - Error"));1388 1389 1375 1390 1376 return 1; … … 1402 1388 1403 1389 if (id < 4) 1404 do_error_dialog(sess->aux_data, _("Your connection may be lost."), 1405 _("AOL error")); 1390 imcb_error(sess->aux_data, _("Your connection may be lost.")); 1406 1391 1407 1392 return 1; … … 1411 1396 va_list ap; 1412 1397 guint16 type; 1413 struct gaim_connection *gc = sess->aux_data;1414 struct oscar_data *odata = (struct oscar_data *) gc->proto_data;1398 struct im_connection *ic = sess->aux_data; 1399 struct oscar_data *odata = (struct oscar_data *)ic->proto_data; 1415 1400 1416 1401 va_start(ap, fr); … … 1470 1455 int count, i; 1471 1456 aim_userinfo_t *info; 1472 struct gaim_connection *g = sess->aux_data;1457 struct im_connection *g = sess->aux_data; 1473 1458 1474 1459 struct chat_connection *c = NULL; … … 1484 1469 1485 1470 for (i = 0; i < count; i++) 1486 add_chat_buddy(c->cnv, info[i].sn);1471 imcb_chat_add_buddy(c->cnv, info[i].sn); 1487 1472 1488 1473 return 1; … … 1493 1478 int count, i; 1494 1479 aim_userinfo_t *info; 1495 struct gaim_connection *g = sess->aux_data;1480 struct im_connection *g = sess->aux_data; 1496 1481 1497 1482 struct chat_connection *c = NULL; … … 1507 1492 1508 1493 for (i = 0; i < count; i++) 1509 remove_chat_buddy(c->cnv, info[i].sn, NULL);1494 imcb_chat_remove_buddy(c->cnv, info[i].sn, NULL); 1510 1495 1511 1496 return 1; … … 1521 1506 guint16 unknown_c9, unknown_d2, unknown_d5, maxmsglen, maxvisiblemsglen; 1522 1507 guint32 creationtime; 1523 struct gaim_connection *gc = sess->aux_data;1524 struct chat_connection *ccon = find_oscar_chat_by_conn( gc, fr->conn);1508 struct im_connection *ic = sess->aux_data; 1509 struct chat_connection *ccon = find_oscar_chat_by_conn(ic, fr->conn); 1525 1510 1526 1511 va_start(ap, fr); … … 1548 1533 aim_userinfo_t *info; 1549 1534 char *msg; 1550 struct gaim_connection *gc = sess->aux_data;1551 struct chat_connection *ccon = find_oscar_chat_by_conn( gc, fr->conn);1535 struct im_connection *ic = sess->aux_data; 1536 struct chat_connection *ccon = find_oscar_chat_by_conn(ic, fr->conn); 1552 1537 char *tmp; 1553 1538 … … 1558 1543 tmp = g_malloc(BUF_LONG); 1559 1544 g_snprintf(tmp, BUF_LONG, "%s", msg); 1560 serv_got_chat_in(gc, ccon->id, info->sn, 0, tmp, time((time_t)NULL));1545 imcb_chat_msg(ccon->cnv, info->sn, tmp, 0, 0); 1561 1546 g_free(tmp); 1562 1547 … … 1597 1582 aim_conn_setlatency(fr->conn, windowsize/4); 1598 1583 } else if (code == AIM_RATE_CODE_LIMIT) { 1599 do_error_dialog(sess->aux_data, _("The last message was not sent because you are over the rate limit. "1600 "Please wait 10 seconds and try again."), _("Gaim - Error"));1584 imcb_error(sess->aux_data, _("The last message was not sent because you are over the rate limit. " 1585 "Please wait 10 seconds and try again.")); 1601 1586 aim_conn_setlatency(fr->conn, windowsize/2); 1602 1587 } else if (code == AIM_RATE_CODE_CLEARLIMIT) { … … 1610 1595 va_list ap; 1611 1596 aim_userinfo_t *info; 1612 struct gaim_connection *gc = sess->aux_data;1597 struct im_connection *ic = sess->aux_data; 1613 1598 1614 1599 va_start(ap, fr); … … 1616 1601 va_end(ap); 1617 1602 1618 gc->evil = info->warnlevel/10;1619 /* gc->correction_time = (info->onlinesince - gc->login_time); */1603 ic->evil = info->warnlevel/10; 1604 /* ic->correction_time = (info->onlinesince - ic->login_time); */ 1620 1605 1621 1606 return 1; … … 1639 1624 1640 1625 static int conninitdone_admin(aim_session_t *sess, aim_frame_t *fr, ...) { 1641 struct gaim_connection *gc = sess->aux_data;1642 struct oscar_data *od = gc->proto_data;1626 struct im_connection *ic = sess->aux_data; 1627 struct oscar_data *od = ic->proto_data; 1643 1628 1644 1629 aim_clientready(sess, fr->conn); … … 1697 1682 va_list ap; 1698 1683 guint16 maxsiglen; 1699 struct gaim_connection *gc = sess->aux_data;1700 struct oscar_data *odata = (struct oscar_data *) gc->proto_data;1684 struct im_connection *ic = sess->aux_data; 1685 struct oscar_data *odata = (struct oscar_data *)ic->proto_data; 1701 1686 1702 1687 va_start(ap, fr); … … 1706 1691 odata->rights.maxsiglen = odata->rights.maxawaymsglen = (guint)maxsiglen; 1707 1692 1708 aim_bos_setprofile(sess, fr->conn, gc->user->user_info, NULL, gaim_caps); 1709 1693 /* FIXME: It seems we're not really using this, and it broke now that 1694 struct aim_user is dead. 1695 aim_bos_setprofile(sess, fr->conn, ic->user->user_info, NULL, gaim_caps); 1696 */ 1697 1710 1698 return 1; 1711 1699 } … … 1714 1702 va_list ap; 1715 1703 guint16 maxbuddies, maxwatchers; 1716 struct gaim_connection *gc = sess->aux_data;1717 struct oscar_data *odata = (struct oscar_data *) gc->proto_data;1704 struct im_connection *ic = sess->aux_data; 1705 struct oscar_data *odata = (struct oscar_data *)ic->proto_data; 1718 1706 1719 1707 va_start(ap, fr); … … 1731 1719 guint16 maxpermits, maxdenies; 1732 1720 va_list ap; 1733 struct gaim_connection *gc = sess->aux_data;1734 struct oscar_data *odata = (struct oscar_data *) gc->proto_data;1721 struct im_connection *ic = sess->aux_data; 1722 struct oscar_data *odata = (struct oscar_data *)ic->proto_data; 1735 1723 1736 1724 va_start(ap, fr); … … 1755 1743 va_list ap; 1756 1744 struct aim_icq_offlinemsg *msg; 1757 struct gaim_connection *gc = sess->aux_data;1745 struct im_connection *ic = sess->aux_data; 1758 1746 1759 1747 va_start(ap, fr); … … 1768 1756 g_snprintf(sender, sizeof(sender), "%u", msg->sender); 1769 1757 strip_linefeed(dialog_msg); 1770 serv_got_im(gc, sender, dialog_msg, 0, t, -1);1758 imcb_buddy_msg(ic, sender, dialog_msg, 0, t); 1771 1759 g_free(dialog_msg); 1772 1760 } break; … … 1789 1777 1790 1778 strip_linefeed(dialog_msg); 1791 serv_got_im(gc, sender, dialog_msg, 0, t, -1);1779 imcb_buddy_msg(ic, sender, dialog_msg, 0, t); 1792 1780 g_free(dialog_msg); 1793 1781 g_free(m); … … 1795 1783 1796 1784 case 0x0006: { /* Authorization request */ 1797 gaim_icq_authask( gc, msg->sender, msg->msg);1785 gaim_icq_authask(ic, msg->sender, msg->msg); 1798 1786 } break; 1799 1787 1800 1788 case 0x0007: { /* Someone has denied you authorization */ 1801 serv_got_crap(sess->aux_data, "The user %u has denied your request to add them to your contact list for the following reason:\n%s", msg->sender, msg->msg ? msg->msg : _("No reason given.") );1789 imcb_log(sess->aux_data, "The user %u has denied your request to add them to your contact list for the following reason:\n%s", msg->sender, msg->msg ? msg->msg : _("No reason given.") ); 1802 1790 } break; 1803 1791 1804 1792 case 0x0008: { /* Someone has granted you authorization */ 1805 serv_got_crap(sess->aux_data, "The user %u has granted your request to add them to your contact list for the following reason:\n%s", msg->sender, msg->msg ? msg->msg : _("No reason given.") );1793 imcb_log(sess->aux_data, "The user %u has granted your request to add them to your contact list for the following reason:\n%s", msg->sender, msg->msg ? msg->msg : _("No reason given.") ); 1806 1794 } break; 1807 1795 … … 1823 1811 } 1824 1812 1825 static void oscar_keepalive(struct gaim_connection *gc) {1826 struct oscar_data *odata = (struct oscar_data *) gc->proto_data;1813 static void oscar_keepalive(struct im_connection *ic) { 1814 struct oscar_data *odata = (struct oscar_data *)ic->proto_data; 1827 1815 aim_flap_nop(odata->sess, odata->conn); 1828 1816 } 1829 1817 1830 static int oscar_ send_im(struct gaim_connection *gc, char *name, char *message, int len, int imflags) {1831 struct oscar_data *odata = (struct oscar_data *) gc->proto_data;1832 int ret = 0 ;1833 if (imflags & IM_FLAG_AWAY) {1818 static int oscar_buddy_msg(struct im_connection *ic, char *name, char *message, int imflags) { 1819 struct oscar_data *odata = (struct oscar_data *)ic->proto_data; 1820 int ret = 0, len = strlen(message); 1821 if (imflags & OPT_AWAY) { 1834 1822 ret = aim_send_im(odata->sess, name, AIM_IMFLAGS_AWAY, message); 1835 1823 } else { … … 1882 1870 } 1883 1871 1884 static void oscar_get_info(struct gaim_connection *g, char *name) {1872 static void oscar_get_info(struct im_connection *g, char *name) { 1885 1873 struct oscar_data *odata = (struct oscar_data *)g->proto_data; 1886 1874 if (odata->icq) … … 1892 1880 } 1893 1881 1894 static void oscar_get_away(struct gaim_connection *g, char *who) {1882 static void oscar_get_away(struct im_connection *g, char *who) { 1895 1883 struct oscar_data *odata = (struct oscar_data *)g->proto_data; 1896 1884 if (odata->icq) { 1897 struct buddy *budlight = find_buddy(g, who);1885 struct buddy *budlight = imcb_find_buddy(g, who); 1898 1886 if (budlight) 1899 1887 if ((budlight->uc & 0xff80) >> 7) … … 1904 1892 } 1905 1893 1906 static void oscar_set_away_aim(struct gaim_connection *gc, struct oscar_data *od, const char *state, const char *message)1894 static void oscar_set_away_aim(struct im_connection *ic, struct oscar_data *od, const char *state, const char *message) 1907 1895 { 1908 1896 … … 1916 1904 1917 1905 if (od->rights.maxawaymsglen == 0) 1918 do_error_dialog(gc, "oscar_set_away_aim called before locate rights received", "Protocol Error");1906 imcb_error(ic, "oscar_set_away_aim called before locate rights received"); 1919 1907 1920 1908 aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_NORMAL); 1921 1909 1922 if ( gc->away)1923 g_free( gc->away);1924 gc->away = NULL;1910 if (ic->away) 1911 g_free(ic->away); 1912 ic->away = NULL; 1925 1913 1926 1914 if (!message) { … … 1930 1918 1931 1919 if (strlen(message) > od->rights.maxawaymsglen) { 1932 gchar *errstr; 1933 1934 errstr = g_strdup_printf("Maximum away message length of %d bytes exceeded, truncating", od->rights.maxawaymsglen); 1935 1936 do_error_dialog(gc, errstr, "Away Message Too Long"); 1937 1938 g_free(errstr); 1939 } 1940 1941 gc->away = g_strndup(message, od->rights.maxawaymsglen); 1942 aim_bos_setprofile(od->sess, od->conn, NULL, gc->away, gaim_caps); 1920 imcb_error(ic, "Maximum away message length of %d bytes exceeded, truncating", od->rights.maxawaymsglen); 1921 } 1922 1923 ic->away = g_strndup(message, od->rights.maxawaymsglen); 1924 aim_bos_setprofile(od->sess, od->conn, NULL, ic->away, gaim_caps); 1943 1925 1944 1926 return; 1945 1927 } 1946 1928 1947 static void oscar_set_away_icq(struct gaim_connection *gc, struct oscar_data *od, const char *state, const char *message)1929 static void oscar_set_away_icq(struct im_connection *ic, struct oscar_data *od, const char *state, const char *message) 1948 1930 { 1949 1931 const char *msg = NULL; … … 1951 1933 1952 1934 /* clean old states */ 1953 if ( gc->away) {1954 g_free( gc->away);1955 gc->away = NULL;1935 if (ic->away) { 1936 g_free(ic->away); 1937 ic->away = NULL; 1956 1938 } 1957 1939 od->sess->aim_icq_state = 0; … … 1969 1951 } else if (!g_strcasecmp(state, "Away")) { 1970 1952 aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_AWAY); 1971 gc->away = g_strdup(msg);1953 ic->away = g_strdup(msg); 1972 1954 od->sess->aim_icq_state = AIM_MTYPE_AUTOAWAY; 1973 1955 } else if (!g_strcasecmp(state, "Do Not Disturb")) { 1974 1956 aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_AWAY | AIM_ICQ_STATE_DND | AIM_ICQ_STATE_BUSY); 1975 gc->away = g_strdup(msg);1957 ic->away = g_strdup(msg); 1976 1958 od->sess->aim_icq_state = AIM_MTYPE_AUTODND; 1977 1959 } else if (!g_strcasecmp(state, "Not Available")) { 1978 1960 aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_OUT | AIM_ICQ_STATE_AWAY); 1979 gc->away = g_strdup(msg);1961 ic->away = g_strdup(msg); 1980 1962 od->sess->aim_icq_state = AIM_MTYPE_AUTONA; 1981 1963 } else if (!g_strcasecmp(state, "Occupied")) { 1982 1964 aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_AWAY | AIM_ICQ_STATE_BUSY); 1983 gc->away = g_strdup(msg);1965 ic->away = g_strdup(msg); 1984 1966 od->sess->aim_icq_state = AIM_MTYPE_AUTOBUSY; 1985 1967 } else if (!g_strcasecmp(state, "Free For Chat")) { 1986 1968 aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_CHAT); 1987 gc->away = g_strdup(msg);1969 ic->away = g_strdup(msg); 1988 1970 od->sess->aim_icq_state = AIM_MTYPE_AUTOFFC; 1989 1971 } else if (!g_strcasecmp(state, "Invisible")) { 1990 1972 aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_INVISIBLE); 1991 gc->away = g_strdup(msg);1973 ic->away = g_strdup(msg); 1992 1974 } else if (!g_strcasecmp(state, GAIM_AWAY_CUSTOM)) { 1993 1975 if (no_message) { … … 1995 1977 } else { 1996 1978 aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_AWAY); 1997 gc->away = g_strdup(msg);1979 ic->away = g_strdup(msg); 1998 1980 od->sess->aim_icq_state = AIM_MTYPE_AUTOAWAY; 1999 1981 } … … 2003 1985 } 2004 1986 2005 static void oscar_set_away(struct gaim_connection *gc, char *state, char *message)1987 static void oscar_set_away(struct im_connection *ic, char *state, char *message) 2006 1988 { 2007 struct oscar_data *od = (struct oscar_data *) gc->proto_data;2008 2009 oscar_set_away_aim( gc, od, state, message);1989 struct oscar_data *od = (struct oscar_data *)ic->proto_data; 1990 1991 oscar_set_away_aim(ic, od, state, message); 2010 1992 if (od->icq) 2011 oscar_set_away_icq( gc, od, state, message);1993 oscar_set_away_icq(ic, od, state, message); 2012 1994 2013 1995 return; 2014 1996 } 2015 1997 2016 static void oscar_add_buddy(struct gaim_connection *g, char *name) {1998 static void oscar_add_buddy(struct im_connection *g, char *name, char *group) { 2017 1999 struct oscar_data *odata = (struct oscar_data *)g->proto_data; 2018 2000 aim_ssi_addbuddies(odata->sess, odata->conn, OSCAR_GROUP, &name, 1, 0); 2019 2001 } 2020 2002 2021 static void oscar_remove_buddy(struct gaim_connection *g, char *name, char *group) {2003 static void oscar_remove_buddy(struct im_connection *g, char *name, char *group) { 2022 2004 struct oscar_data *odata = (struct oscar_data *)g->proto_data; 2023 2005 struct aim_ssi_item *ssigroup; … … 2030 2012 2031 2013 static int gaim_ssi_parselist(aim_session_t *sess, aim_frame_t *fr, ...) { 2032 struct gaim_connection *gc = sess->aux_data;2014 struct im_connection *ic = sess->aux_data; 2033 2015 struct aim_ssi_item *curitem; 2034 2016 int tmp; … … 2039 2021 switch (curitem->type) { 2040 2022 case 0x0000: /* Buddy */ 2041 if ((curitem->name) && (! find_buddy(gc, curitem->name))) {2023 if ((curitem->name) && (!imcb_find_buddy(ic, curitem->name))) { 2042 2024 char *realname = NULL; 2043 2025 … … 2045 2027 realname = aim_gettlv_str(curitem->data, 0x0131, 1); 2046 2028 2047 add_buddy(gc, NULL, curitem->name, realname);2029 imcb_add_buddy(ic, curitem->name, NULL); 2048 2030 2049 if (realname) 2050 g_free(realname); 2031 if (realname) { 2032 imcb_buddy_nick_hint(ic, curitem->name, realname); 2033 imcb_rename_buddy(ic, curitem->name, realname); 2034 g_free(realname); 2035 } 2051 2036 } 2052 2037 break; … … 2055 2040 if (curitem->name) { 2056 2041 GSList *list; 2057 for (list= gc->permit; (list && aim_sncmp(curitem->name, list->data)); list=list->next);2042 for (list=ic->permit; (list && aim_sncmp(curitem->name, list->data)); list=list->next); 2058 2043 if (!list) { 2059 2044 char *name; 2060 2045 name = g_strdup(normalize(curitem->name)); 2061 gc->permit = g_slist_append(gc->permit, name);2046 ic->permit = g_slist_append(ic->permit, name); 2062 2047 tmp++; 2063 2048 } … … 2068 2053 if (curitem->name) { 2069 2054 GSList *list; 2070 for (list= gc->deny; (list && aim_sncmp(curitem->name, list->data)); list=list->next);2055 for (list=ic->deny; (list && aim_sncmp(curitem->name, list->data)); list=list->next); 2071 2056 if (!list) { 2072 2057 char *name; 2073 2058 name = g_strdup(normalize(curitem->name)); 2074 gc->deny = g_slist_append(gc->deny, name);2059 ic->deny = g_slist_append(ic->deny, name); 2075 2060 tmp++; 2076 2061 } … … 2081 2066 if (curitem->data) { 2082 2067 guint8 permdeny; 2083 if ((permdeny = aim_ssi_getpermdeny(sess->ssi.items)) && (permdeny != gc->permdeny)) {2084 gc->permdeny = permdeny;2068 if ((permdeny = aim_ssi_getpermdeny(sess->ssi.items)) && (permdeny != ic->permdeny)) { 2069 ic->permdeny = permdeny; 2085 2070 tmp++; 2086 2071 } … … 2100 2085 2101 2086 /* Now that we have a buddy list, we can tell BitlBee that we're online. */ 2102 account_online(gc);2087 imcb_connected(ic); 2103 2088 2104 2089 return 1; … … 2122 2107 { 2123 2108 /* Hmm, the length should be even... */ 2124 do_error_dialog( sess->aux_data, "Received SSI ACK package with non-even length", "Gaim - Error");2109 imcb_error( sess->aux_data, "Received SSI ACK package with non-even length"); 2125 2110 return( 0 ); 2126 2111 } … … 2131 2116 { 2132 2117 st = aimbs_get16( &fr->data ); 2133 if( st == 0x0 E)2118 if( st == 0x00 ) 2134 2119 { 2135 serv_got_crap( sess->aux_data, "Buddy %s can't be added without authorization, requesting authorization", list ); 2120 imcb_add_buddy( sess->aux_data, list, NULL ); 2121 } 2122 else if( st == 0x0E ) 2123 { 2124 imcb_log( sess->aux_data, "Buddy %s can't be added without authorization, requesting authorization", list ); 2136 2125 2137 2126 aim_ssi_auth_request( sess, fr->conn, list, "" ); 2138 2127 aim_ssi_addbuddies( sess, fr->conn, OSCAR_GROUP, &list, 1, 1 ); 2139 2128 } 2129 else 2130 { 2131 imcb_error( sess->aux_data, "Error while adding buddy: 0x%04x", st ); 2132 } 2140 2133 list += strlen( list ) + 1; 2141 2134 } … … 2145 2138 } 2146 2139 2147 static void oscar_set_permit_deny(struct gaim_connection *gc) {2148 struct oscar_data *od = (struct oscar_data *) gc->proto_data;2140 static void oscar_set_permit_deny(struct im_connection *ic) { 2141 struct oscar_data *od = (struct oscar_data *)ic->proto_data; 2149 2142 if (od->icq) { 2150 2143 GSList *list; … … 2152 2145 int at; 2153 2146 2154 switch( gc->permdeny) {2147 switch(ic->permdeny) { 2155 2148 case 1: 2156 aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_DENYADD, gc->username);2149 aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_DENYADD, ic->acc->user); 2157 2150 break; 2158 2151 case 2: 2159 aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_PERMITADD, gc->username);2152 aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_PERMITADD, ic->acc->user); 2160 2153 break; 2161 2154 case 3: 2162 list = gc->permit;2155 list = ic->permit; 2163 2156 at = 0; 2164 2157 while (list) { … … 2169 2162 break; 2170 2163 case 4: 2171 list = gc->deny;2164 list = ic->deny; 2172 2165 at = 0; 2173 2166 while (list) { … … 2180 2173 break; 2181 2174 } 2182 signoff_blocked(gc);2183 2175 } else { 2184 2176 if (od->sess->ssi.received_data) 2185 aim_ssi_setpermdeny(od->sess, od->conn, gc->permdeny, 0xffffffff);2186 } 2187 } 2188 2189 static void oscar_add_permit(struct gaim_connection *gc, char *who) {2190 struct oscar_data *od = (struct oscar_data *) gc->proto_data;2177 aim_ssi_setpermdeny(od->sess, od->conn, ic->permdeny, 0xffffffff); 2178 } 2179 } 2180 2181 static void oscar_add_permit(struct im_connection *ic, char *who) { 2182 struct oscar_data *od = (struct oscar_data *)ic->proto_data; 2191 2183 if (od->icq) { 2192 2184 aim_ssi_auth_reply(od->sess, od->conn, who, 1, ""); … … 2197 2189 } 2198 2190 2199 static void oscar_add_deny(struct gaim_connection *gc, char *who) {2200 struct oscar_data *od = (struct oscar_data *) gc->proto_data;2191 static void oscar_add_deny(struct im_connection *ic, char *who) { 2192 struct oscar_data *od = (struct oscar_data *)ic->proto_data; 2201 2193 if (od->icq) { 2202 2194 aim_ssi_auth_reply(od->sess, od->conn, who, 0, ""); … … 2207 2199 } 2208 2200 2209 static void oscar_rem_permit(struct gaim_connection *gc, char *who) {2210 struct oscar_data *od = (struct oscar_data *) gc->proto_data;2201 static void oscar_rem_permit(struct im_connection *ic, char *who) { 2202 struct oscar_data *od = (struct oscar_data *)ic->proto_data; 2211 2203 if (!od->icq) { 2212 2204 if (od->sess->ssi.received_data) … … 2215 2207 } 2216 2208 2217 static void oscar_rem_deny(struct gaim_connection *gc, char *who) {2218 struct oscar_data *od = (struct oscar_data *) gc->proto_data;2209 static void oscar_rem_deny(struct im_connection *ic, char *who) { 2210 struct oscar_data *od = (struct oscar_data *)ic->proto_data; 2219 2211 if (!od->icq) { 2220 2212 if (od->sess->ssi.received_data) … … 2223 2215 } 2224 2216 2225 static GList *oscar_away_states(struct gaim_connection *gc)2217 static GList *oscar_away_states(struct im_connection *ic) 2226 2218 { 2227 struct oscar_data *od = gc->proto_data;2219 struct oscar_data *od = ic->proto_data; 2228 2220 GList *m = NULL; 2229 2221 … … 2244 2236 static int gaim_icqinfo(aim_session_t *sess, aim_frame_t *fr, ...) 2245 2237 { 2246 struct gaim_connection *gc = sess->aux_data; 2247 gchar who[16]; 2248 GString *str; 2249 va_list ap; 2250 struct aim_icq_info *info; 2251 2252 va_start(ap, fr); 2253 info = va_arg(ap, struct aim_icq_info *); 2254 va_end(ap); 2255 2256 if (!info->uin) 2257 return 0; 2258 2259 str = g_string_sized_new(100); 2260 g_snprintf(who, sizeof(who), "%u", info->uin); 2261 2262 g_string_sprintfa(str, "%s: %s - %s: %s", _("UIN"), who, _("Nick"), 2263 info->nick ? info->nick : "-"); 2264 info_string_append(str, "\n", _("First Name"), info->first); 2265 info_string_append(str, "\n", _("Last Name"), info->last); 2266 info_string_append(str, "\n", _("Email Address"), info->email); 2267 if (info->numaddresses && info->email2) { 2268 int i; 2269 for (i = 0; i < info->numaddresses; i++) { 2270 info_string_append(str, "\n", _("Email Address"), info->email2[i]); 2271 } 2272 } 2273 info_string_append(str, "\n", _("Mobile Phone"), info->mobile); 2274 info_string_append(str, "\n", _("Gender"), info->gender==1 ? _("Female") : _("Male")); 2275 if (info->birthyear || info->birthmonth || info->birthday) { 2276 char date[30]; 2277 struct tm tm; 2278 tm.tm_mday = (int)info->birthday; 2279 tm.tm_mon = (int)info->birthmonth-1; 2280 tm.tm_year = (int)info->birthyear%100; 2281 strftime(date, sizeof(date), "%Y-%m-%d", &tm); 2282 info_string_append(str, "\n", _("Birthday"), date); 2283 } 2284 if (info->age) { 2285 char age[5]; 2286 g_snprintf(age, sizeof(age), "%hhd", info->age); 2287 info_string_append(str, "\n", _("Age"), age); 2288 } 2289 info_string_append(str, "\n", _("Personal Web Page"), info->personalwebpage); 2290 if (info->info && info->info[0]) { 2291 g_string_sprintfa(str, "\n%s:\n%s\n%s", _("Additional Information"), 2292 info->info, _("End of Additional Information")); 2293 } 2294 g_string_sprintfa(str, "\n"); 2295 if ((info->homeaddr && (info->homeaddr[0])) || (info->homecity && info->homecity[0]) || (info->homestate && info->homestate[0]) || (info->homezip && info->homezip[0])) { 2296 g_string_sprintfa(str, "%s:", _("Home Address")); 2297 info_string_append(str, "\n", _("Address"), info->homeaddr); 2298 info_string_append(str, "\n", _("City"), info->homecity); 2299 info_string_append(str, "\n", _("State"), info->homestate); 2300 info_string_append(str, "\n", _("Zip Code"), info->homezip); 2301 g_string_sprintfa(str, "\n"); 2302 } 2303 if ((info->workaddr && info->workaddr[0]) || (info->workcity && info->workcity[0]) || (info->workstate && info->workstate[0]) || (info->workzip && info->workzip[0])) { 2304 g_string_sprintfa(str, "%s:", _("Work Address")); 2305 info_string_append(str, "\n", _("Address"), info->workaddr); 2306 info_string_append(str, "\n", _("City"), info->workcity); 2307 info_string_append(str, "\n", _("State"), info->workstate); 2308 info_string_append(str, "\n", _("Zip Code"), info->workzip); 2309 g_string_sprintfa(str, "\n"); 2310 } 2311 if ((info->workcompany && info->workcompany[0]) || (info->workdivision && info->workdivision[0]) || (info->workposition && info->workposition[0]) || (info->workwebpage && info->workwebpage[0])) { 2312 g_string_sprintfa(str, "%s:", _("Work Information")); 2313 info_string_append(str, "\n", _("Company"), info->workcompany); 2314 info_string_append(str, "\n", _("Division"), info->workdivision); 2315 info_string_append(str, "\n", _("Position"), info->workposition); 2316 if (info->workwebpage && info->workwebpage[0]) { 2317 info_string_append(str, "\n", _("Web Page"), info->workwebpage); 2318 } 2319 g_string_sprintfa(str, "\n"); 2320 } 2321 2322 serv_got_crap(gc, "%s\n%s", _("User Info"), str->str); 2323 g_string_free(str, TRUE); 2324 2325 return 1; 2238 struct im_connection *ic = sess->aux_data; 2239 struct oscar_data *od = ic->proto_data; 2240 gchar who[16]; 2241 GString *str; 2242 va_list ap; 2243 struct aim_icq_info *info; 2244 uint32_t ip; 2245 2246 va_start(ap, fr); 2247 info = va_arg(ap, struct aim_icq_info *); 2248 va_end(ap); 2249 2250 if (!info->uin) 2251 return 0; 2252 2253 str = g_string_sized_new(512); 2254 g_snprintf(who, sizeof(who), "%u", info->uin); 2255 2256 g_string_printf(str, "%s: %s - %s: %s", _("UIN"), who, _("Nick"), 2257 info->nick ? info->nick : "-"); 2258 g_string_append_printf(str, "\n%s: %s", _("First Name"), info->first); 2259 g_string_append_printf(str, "\n%s: %s", _("Last Name"), info->last); 2260 g_string_append_printf(str, "\n%s: %s", _("Email Address"), info->email); 2261 if (info->numaddresses && info->email2) { 2262 int i; 2263 for (i = 0; i < info->numaddresses; i++) { 2264 g_string_append_printf(str, "\n%s: %s", _("Email Address"), info->email2[i]); 2265 } 2266 } 2267 if ((ip = (long) g_hash_table_lookup(od->ips, &info->uin)) != 0) { 2268 g_string_append_printf(str, "\n%s: %d.%d.%d.%d", _("Last used IP address"), 2269 (ip >> 24), (ip >> 16) & 0xff, (ip >> 8) & 0xff, ip & 0xff); 2270 } 2271 g_string_append_printf(str, "\n%s: %s", _("Mobile Phone"), info->mobile); 2272 if (info->gender != 0) 2273 g_string_append_printf(str, "\n%s: %s", _("Gender"), info->gender==1 ? _("Female") : _("Male")); 2274 if (info->birthyear || info->birthmonth || info->birthday) { 2275 char date[30]; 2276 struct tm tm; 2277 memset(&tm, 0, sizeof(struct tm)); 2278 tm.tm_mday = (int)info->birthday; 2279 tm.tm_mon = (int)info->birthmonth-1; 2280 tm.tm_year = (int)info->birthyear%100; 2281 strftime(date, sizeof(date), "%Y-%m-%d", &tm); 2282 g_string_append_printf(str, "\n%s: %s", _("Birthday"), date); 2283 } 2284 if (info->age) { 2285 char age[5]; 2286 g_snprintf(age, sizeof(age), "%hhd", info->age); 2287 g_string_append_printf(str, "\n%s: %s", _("Age"), age); 2288 } 2289 g_string_append_printf(str, "\n%s: %s", _("Personal Web Page"), info->personalwebpage); 2290 if (info->info && info->info[0]) { 2291 g_string_sprintfa(str, "\n%s:\n%s\n%s", _("Additional Information"), 2292 info->info, _("End of Additional Information")); 2293 } 2294 g_string_append_c(str, '\n'); 2295 if ((info->homeaddr && (info->homeaddr[0])) || (info->homecity && info->homecity[0]) || (info->homestate && info->homestate[0]) || (info->homezip && info->homezip[0])) { 2296 g_string_append_printf(str, "%s:", _("Home Address")); 2297 g_string_append_printf(str, "\n%s: %s", _("Address"), info->homeaddr); 2298 g_string_append_printf(str, "\n%s: %s", _("City"), info->homecity); 2299 g_string_append_printf(str, "\n%s: %s", _("State"), info->homestate); 2300 g_string_append_printf(str, "\n%s: %s", _("Zip Code"), info->homezip); 2301 g_string_append_c(str, '\n'); 2302 } 2303 if ((info->workaddr && info->workaddr[0]) || (info->workcity && info->workcity[0]) || (info->workstate && info->workstate[0]) || (info->workzip && info->workzip[0])) { 2304 g_string_append_printf(str, "%s:", _("Work Address")); 2305 g_string_append_printf(str, "\n%s: %s", _("Address"), info->workaddr); 2306 g_string_append_printf(str, "\n%s: %s", _("City"), info->workcity); 2307 g_string_append_printf(str, "\n%s: %s", _("State"), info->workstate); 2308 g_string_append_printf(str, "\n%s: %s", _("Zip Code"), info->workzip); 2309 g_string_append_c(str, '\n'); 2310 } 2311 if ((info->workcompany && info->workcompany[0]) || (info->workdivision && info->workdivision[0]) || (info->workposition && info->workposition[0]) || (info->workwebpage && info->workwebpage[0])) { 2312 g_string_append_printf(str, "%s:", _("Work Information")); 2313 g_string_append_printf(str, "\n%s: %s", _("Company"), info->workcompany); 2314 g_string_append_printf(str, "\n%s: %s", _("Division"), info->workdivision); 2315 g_string_append_printf(str, "\n%s: %s", _("Position"), info->workposition); 2316 if (info->workwebpage && info->workwebpage[0]) { 2317 g_string_append_printf(str, "\n%s: %s", _("Web Page"), info->workwebpage); 2318 } 2319 g_string_append_c(str, '\n'); 2320 } 2321 2322 imcb_log(ic, "%s\n%s", _("User Info"), str->str); 2323 g_string_free(str, TRUE); 2324 2325 return 1; 2326 2326 2327 2327 } … … 2385 2385 static int gaim_parseaiminfo(aim_session_t *sess, aim_frame_t *fr, ...) 2386 2386 { 2387 struct gaim_connection *gc = sess->aux_data;2387 struct im_connection *ic = sess->aux_data; 2388 2388 va_list ap; 2389 2389 aim_userinfo_t *userinfo; … … 2414 2414 idletime.tm_sec = 0; 2415 2415 strftime(buff, 256, _("%d days %H hours %M minutes"), &idletime); 2416 serv_got_crap(gc, "%s: %s", _("Idle Time"), buff);2416 imcb_log(ic, "%s: %s", _("Idle Time"), buff); 2417 2417 } 2418 2418 2419 2419 if(text) { 2420 2420 utf8 = oscar_encoding_to_utf8(extracted_encoding, text, text_length); 2421 serv_got_crap(gc, "%s\n%s", _("User Info"), utf8);2421 imcb_log(ic, "%s\n%s", _("User Info"), utf8); 2422 2422 } else { 2423 serv_got_crap(gc, _("No user info available."));2423 imcb_log(ic, _("No user info available.")); 2424 2424 } 2425 2425 } else if(infotype == AIM_GETINFO_AWAYMESSAGE && userinfo->flags & AIM_FLAG_AWAY) { 2426 2426 utf8 = oscar_encoding_to_utf8(extracted_encoding, text, text_length); 2427 serv_got_crap(gc, "%s\n%s", _("Away Message"), utf8);2427 imcb_log(ic, "%s\n%s", _("Away Message"), utf8); 2428 2428 } 2429 2429 … … 2435 2435 int gaim_parsemtn(aim_session_t *sess, aim_frame_t *fr, ...) 2436 2436 { 2437 struct gaim_connection * gc = sess->aux_data;2437 struct im_connection * ic = sess->aux_data; 2438 2438 va_list ap; 2439 2439 guint16 type1, type2; … … 2448 2448 if(type2 == 0x0002) { 2449 2449 /* User is typing */ 2450 serv_got_typing(gc, sn, 0, 1);2450 imcb_buddy_typing(ic, sn, OPT_TYPING); 2451 2451 } 2452 2452 else if (type2 == 0x0001) { 2453 2453 /* User has typed something, but is not actively typing (stale) */ 2454 serv_got_typing(gc, sn, 0, 2);2454 imcb_buddy_typing(ic, sn, OPT_THINKING); 2455 2455 } 2456 2456 else { 2457 2457 /* User has stopped typing */ 2458 serv_got_typing(gc, sn, 0, 0);2459 } 2460 2461 return 1; 2462 } 2463 2464 static char *oscar_get_status_string( struct gaim_connection *gc, int number)2458 imcb_buddy_typing(ic, sn, 0); 2459 } 2460 2461 return 1; 2462 } 2463 2464 int oscar_send_typing(struct im_connection *ic, char * who, int typing) 2465 2465 { 2466 struct oscar_data *od = gc->proto_data; 2467 2468 if( ! number & UC_UNAVAILABLE ) 2469 { 2470 return( NULL ); 2471 } 2472 else if( od->icq ) 2473 { 2474 number >>= 7; 2475 if( number & AIM_ICQ_STATE_DND ) 2476 return( "Do Not Disturb" ); 2477 else if( number & AIM_ICQ_STATE_OUT ) 2478 return( "Not Available" ); 2479 else if( number & AIM_ICQ_STATE_BUSY ) 2480 return( "Occupied" ); 2481 else if( number & AIM_ICQ_STATE_INVISIBLE ) 2482 return( "Invisible" ); 2483 else 2484 return( "Away" ); 2485 } 2486 else 2487 { 2488 return( "Away" ); 2489 } 2490 } 2491 2492 int oscar_send_typing(struct gaim_connection *gc, char * who, int typing) 2466 struct oscar_data *od = ic->proto_data; 2467 return( aim_im_sendmtn(od->sess, 1, who, (typing & OPT_TYPING) ? 0x0002 : 0x0000) ); 2468 } 2469 2470 void oscar_chat_msg(struct groupchat *c, char *message, int msgflags) 2493 2471 { 2494 struct oscar_data *od = gc->proto_data; 2495 return( aim_im_sendmtn(od->sess, 1, who, typing ? 0x0002 : 0x0000) ); 2496 } 2497 2498 int oscar_chat_send(struct gaim_connection * gc, int id, char *message) 2499 { 2500 struct oscar_data * od = (struct oscar_data*)gc->proto_data; 2472 struct im_connection *ic = c->ic; 2473 struct oscar_data * od = (struct oscar_data*)ic->proto_data; 2501 2474 struct chat_connection * ccon; 2502 2475 int ret; … … 2505 2478 char *s; 2506 2479 2507 if(!(ccon = find_oscar_chat(gc, id))) 2508 return -1; 2480 ccon = c->data; 2509 2481 2510 2482 for (s = message; *s; s++) … … 2540 2512 } 2541 2513 2542 return (ret >= 0); 2543 } 2544 2545 void oscar_chat_invite(struct g aim_connection * gc, int id, char *message, char *who)2514 /* return (ret >= 0); */ 2515 } 2516 2517 void oscar_chat_invite(struct groupchat *c, char *who, char *message) 2546 2518 { 2547 struct oscar_data * od = (struct oscar_data *)gc->proto_data; 2548 struct chat_connection *ccon = find_oscar_chat(gc, id); 2549 2550 if (ccon == NULL) 2551 return; 2519 struct im_connection *ic = c->ic; 2520 struct oscar_data * od = (struct oscar_data *)ic->proto_data; 2521 struct chat_connection *ccon = c->data; 2552 2522 2553 2523 aim_chat_invite(od->sess, od->conn, who, message ? message : "", … … 2555 2525 } 2556 2526 2557 void oscar_chat_kill(struct gaim_connection *gc, struct chat_connection *cc)2527 void oscar_chat_kill(struct im_connection *ic, struct chat_connection *cc) 2558 2528 { 2559 struct oscar_data *od = (struct oscar_data *) gc->proto_data;2529 struct oscar_data *od = (struct oscar_data *)ic->proto_data; 2560 2530 2561 2531 /* Notify the conversation window that we've left the chat */ 2562 serv_got_chat_left(gc, cc->id);2532 imcb_chat_free(cc->cnv); 2563 2533 2564 2534 /* Destroy the chat_connection */ 2565 2535 od->oscar_chats = g_slist_remove(od->oscar_chats, cc); 2566 2536 if (cc->inpa > 0) 2567 gaim_input_remove(cc->inpa);2537 b_event_remove(cc->inpa); 2568 2538 aim_conn_kill(od->sess, &cc->conn); 2569 2539 g_free(cc->name); … … 2572 2542 } 2573 2543 2574 void oscar_chat_leave(struct g aim_connection * gc, int id)2544 void oscar_chat_leave(struct groupchat *c) 2575 2545 { 2576 struct chat_connection * ccon = find_oscar_chat(gc, id); 2577 2578 if(ccon == NULL) 2579 return; 2580 2581 oscar_chat_kill(gc, ccon); 2582 } 2583 2584 int oscar_chat_join(struct gaim_connection * gc, char * name) 2546 oscar_chat_kill(c->ic, c->data); 2547 } 2548 2549 struct groupchat *oscar_chat_join(struct im_connection * ic, char * room, char * nick, char * password ) 2585 2550 { 2586 struct oscar_data * od = (struct oscar_data *)gc->proto_data; 2587 2551 struct oscar_data * od = (struct oscar_data *)ic->proto_data; 2588 2552 aim_conn_t * cur; 2589 2553 2590 2554 if((cur = aim_getconn_type(od->sess, AIM_CONN_TYPE_CHATNAV))) { 2591 2592 return (aim_chatnav_createroom(od->sess, cur, name, 4) == 0); 2593 2555 int st; 2556 2557 st = aim_chatnav_createroom(od->sess, cur, room, 4); 2558 2559 return NULL; 2594 2560 } else { 2595 2561 struct create_room * cr = g_new0(struct create_room, 1); 2562 2596 2563 cr->exchange = 4; 2597 cr->name = g_strdup( name);2564 cr->name = g_strdup(room); 2598 2565 od->create_rooms = g_slist_append(od->create_rooms, cr); 2599 2566 aim_reqservice(od->sess, od->conn, AIM_CONN_TYPE_CHATNAV); 2600 return 1; 2601 } 2602 } 2603 2604 int oscar_chat_open(struct gaim_connection * gc, char *who) 2567 2568 return NULL; 2569 } 2570 } 2571 2572 struct groupchat *oscar_chat_with(struct im_connection * ic, char *who) 2605 2573 { 2606 struct oscar_data * od = (struct oscar_data *) gc->proto_data;2607 intret;2574 struct oscar_data * od = (struct oscar_data *)ic->proto_data; 2575 struct groupchat *ret; 2608 2576 static int chat_id = 0; 2609 2577 char * chatname; 2610 2578 2611 chatname = g_strdup_printf("%s%d", gc->username, chat_id++);2579 chatname = g_strdup_printf("%s%d", ic->acc->user, chat_id++); 2612 2580 2613 ret = oscar_chat_join( gc, chatname);2581 ret = oscar_chat_join(ic, chatname, NULL, NULL); 2614 2582 2615 2583 aim_chat_invite(od->sess, od->conn, who, "", 4, chatname, 0x0); … … 2617 2585 g_free(chatname); 2618 2586 2619 return ret;2587 return NULL; 2620 2588 } 2621 2589 2622 2590 void oscar_accept_chat(gpointer w, struct aim_chat_invitation * inv) 2623 2591 { 2624 oscar_chat_join(inv-> gc, inv->name);2592 oscar_chat_join(inv->ic, inv->name, NULL, NULL); 2625 2593 g_free(inv->name); 2626 2594 g_free(inv); … … 2633 2601 } 2634 2602 2635 void oscar_init ()2603 void oscar_initmodule() 2636 2604 { 2637 2605 struct prpl *ret = g_new0(struct prpl, 1); 2638 2606 ret->name = "oscar"; 2639 2607 ret->away_states = oscar_away_states; 2608 ret->init = oscar_init; 2640 2609 ret->login = oscar_login; 2641 ret->close = oscar_close; 2642 ret->send_im = oscar_send_im; 2610 ret->keepalive = oscar_keepalive; 2611 ret->logout = oscar_logout; 2612 ret->buddy_msg = oscar_buddy_msg; 2643 2613 ret->get_info = oscar_get_info; 2644 2614 ret->set_away = oscar_set_away; … … 2646 2616 ret->add_buddy = oscar_add_buddy; 2647 2617 ret->remove_buddy = oscar_remove_buddy; 2648 ret->chat_ send = oscar_chat_send;2618 ret->chat_msg = oscar_chat_msg; 2649 2619 ret->chat_invite = oscar_chat_invite; 2650 2620 ret->chat_leave = oscar_chat_leave; 2651 ret->chat_open = oscar_chat_open; 2621 ret->chat_with = oscar_chat_with; 2622 ret->chat_join = oscar_chat_join; 2652 2623 ret->add_permit = oscar_add_permit; 2653 2624 ret->add_deny = oscar_add_deny; … … 2655 2626 ret->rem_deny = oscar_rem_deny; 2656 2627 ret->set_permit_deny = oscar_set_permit_deny; 2657 ret->keepalive = oscar_keepalive;2658 ret->cmp_buddynames = aim_sncmp;2659 ret->get_status_string = oscar_get_status_string;2660 2628 ret->send_typing = oscar_send_typing; 2629 2630 ret->handle_cmp = aim_sncmp; 2661 2631 2662 2632 register_protocol(ret); -
protocols/oscar/rxhandlers.c
r875ad42 r85d7b85 112 112 /* Following SNAC will be related */ 113 113 } 114 115 if (set_getint(sess->aux_data, "debug")) {116 serv_got_crap(sess->aux_data, "snac %x/%x received", snac.family, snac.subtype);117 }118 114 119 115 for (cur = (aim_module_t *)sess->modlistv; cur; cur = cur->next) { -
protocols/oscar/rxqueue.c
r875ad42 r85d7b85 392 392 aim_bstream_rewind(&flaphdr); 393 393 start = aimbs_get8(&flaphdr); 394 do_error_dialog(sess->aux_data, "FLAP framing disrupted", "Gaim");394 imcb_error(sess->aux_data, "FLAP framing disrupted"); 395 395 aim_conn_close(conn); 396 396 return -1; -
protocols/oscar/search.c
r875ad42 r85d7b85 39 39 /* XXX the modules interface should have already retrieved this for us */ 40 40 if (!(snac2 = aim_remsnac(sess, snac->id))) { 41 do_error_dialog(sess->aux_data, "couldn't get snac", "Gaim");41 imcb_error(sess->aux_data, "couldn't get snac"); 42 42 return 0; 43 43 } -
protocols/oscar/service.c
r875ad42 r85d7b85 567 567 group = aimbs_get16(bs); 568 568 569 do_error_dialog(sess->aux_data, "bifurcated migration unsupported", "Gaim");569 imcb_error(sess->aux_data, "bifurcated migration unsupported"); 570 570 } 571 571 … … 732 732 guint32 data; 733 733 int tlvlen; 734 struct im_connection *ic = sess ? sess->aux_data : NULL; 734 735 735 736 data = AIM_ICQ_STATE_HIDEIP | status; /* yay for error checking ;^) */ 737 738 if (ic && set_getbool(&ic->acc->set, "web_aware")) 739 data |= AIM_ICQ_STATE_WEBAWARE; 736 740 737 741 tlvlen = aim_addtlvtochain32(&tl, 0x0006, data); … … 890 894 */ 891 895 } else 892 do_error_dialog(sess->aux_data, "WARNING: unknown hash request", "Gaim");896 imcb_error(sess->aux_data, "Warning: unknown hash request"); 893 897 894 898 } -
protocols/oscar/txqueue.c
r875ad42 r85d7b85 30 30 31 31 if (!conn) { 32 do_error_dialog(sess->aux_data, "no connection specified", "Gaim");32 imcb_error(sess->aux_data, "no connection specified"); 33 33 return NULL; 34 34 } … … 46 46 47 47 } else 48 do_error_dialog(sess->aux_data, "unknown framing", "Gaim");48 imcb_error(sess->aux_data, "unknown framing"); 49 49 50 50 if (datalen > 0) { … … 80 80 81 81 if (!fr->conn) { 82 do_error_dialog(sess->aux_data, "WARNING: enqueueing packet with no connection", "Gaim");82 imcb_error(sess->aux_data, "Warning: enqueueing packet with no connection"); 83 83 fr->conn = aim_getconn_type(sess, AIM_CONN_TYPE_BOS); 84 84 } … … 120 120 121 121 if (!fr->conn) { 122 do_error_dialog(sess->aux_data, "packet has no connection", "Gaim");122 imcb_error(sess->aux_data, "packet has no connection"); 123 123 aim_frame_destroy(fr); 124 124 return 0;
Note: See TracChangeset
for help on using the changeset viewer.