Changeset 84b045d for protocols/oscar
- Timestamp:
- 2007-04-16T01:03:08Z (18 years ago)
- Branches:
- master
- Children:
- 6bbb939
- Parents:
- c2fb3809
- Location:
- protocols/oscar
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/oscar/chat.c
rc2fb3809 r84b045d 54 54 continue; 55 55 if (!cur->priv) { 56 imc _error(sess->aux_data, "chat connection with no name!");56 imcb_error(sess->aux_data, "chat connection with no name!"); 57 57 continue; 58 58 } … … 397 397 398 398 if (detaillevel != 0x02) { 399 imc _error(sess->aux_data, "Only detaillevel 0x2 is support at the moment");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 imc _error(sess->aux_data, "unknown channel!");617 imcb_error(sess->aux_data, "unknown channel!"); 618 618 return 0; 619 619 } -
protocols/oscar/chatnav.c
rc2fb3809 r84b045d 286 286 287 287 if (!(bigblock = aim_gettlv(tlvlist, 0x0004, 1))) { 288 imc _error(sess->aux_data, "no bigblock in top tlv in create room response");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 imc _error(sess->aux_data, "unknown detaillevel in create room response");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 imc _error(sess->aux_data, "received response to unknown request!");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 imc _error(sess->aux_data, "recieved response that maps to corrupt request!");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 imc _error(sess->aux_data, "unknown request subtype");391 imcb_error(sess->aux_data, "unknown request subtype"); 392 392 393 393 if (snac2) -
protocols/oscar/icq.c
rc2fb3809 r84b045d 240 240 if (!(tl = aim_readtlvchain(bs)) || !(datatlv = aim_gettlv(tl, 0x0001, 1))) { 241 241 aim_freetlvchain(&tl); 242 imc _error(sess->aux_data, "corrupt ICQ response\n");242 imcb_error(sess->aux_data, "corrupt ICQ response\n"); 243 243 return 0; 244 244 } -
protocols/oscar/im.c
rc2fb3809 r84b045d 937 937 938 938 if (channel != 0x01) { 939 imc _error(sess->aux_data, "icbm: ICBM recieved on unsupported channel. Ignoring.");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 // imc _error(sess->aux_data, "Unknown TLV encountered");1347 // imcb_error(sess->aux_data, "Unknown TLV encountered"); 1348 1348 } 1349 1349 … … 1517 1517 cookie2 = aimbs_getraw(&bbs, 8); 1518 1518 if (memcmp(cookie, cookie2, 8) != 0) 1519 imc _error(sess->aux_data, "rend: warning cookies don't match!");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 imc _error(sess->aux_data, "ICBM received on an unsupported channel. Ignoring.");1785 imcb_error(sess->aux_data, "ICBM received on an unsupported channel. Ignoring."); 1786 1786 1787 1787 return 0; -
protocols/oscar/info.c
rc2fb3809 r84b045d 474 474 */ 475 475 #ifdef DEBUG 476 // imc _error(sess->aux_data, G_STRLOC);476 // imcb_error(sess->aux_data, G_STRLOC); 477 477 #endif 478 478 … … 635 635 636 636 if (!origsnac || !origsnac->data) { 637 imc _error(sess->aux_data, "major problem: no snac stored!");637 imcb_error(sess->aux_data, "major problem: no snac stored!"); 638 638 return 0; 639 639 } … … 644 644 (inforeq->infotype != AIM_GETINFO_AWAYMESSAGE) && 645 645 (inforeq->infotype != AIM_GETINFO_CAPABILITIES)) { 646 imc _error(sess->aux_data, "unknown infotype in request!");646 imcb_error(sess->aux_data, "unknown infotype in request!"); 647 647 return 0; 648 648 } -
protocols/oscar/oscar.c
rc2fb3809 r84b045d 267 267 if ((conn->type == AIM_CONN_TYPE_BOS) || 268 268 !(aim_getconn_type(odata->sess, AIM_CONN_TYPE_BOS))) { 269 imc _error(ic, _("Disconnected."));269 imcb_error(ic, _("Disconnected.")); 270 270 imc_logout(ic, TRUE); 271 271 } else if (conn->type == AIM_CONN_TYPE_CHAT) { … … 277 277 c->fd = -1; 278 278 aim_conn_kill(odata->sess, &conn); 279 imc _error(sess->aux_data, _("You have been disconnected from chat room %s."), c->name);279 imcb_error(sess->aux_data, _("You have been disconnected from chat room %s."), c->name); 280 280 } else if (conn->type == AIM_CONN_TYPE_CHATNAV) { 281 281 if (odata->cnpa > 0) … … 288 288 g_slist_remove(odata->create_rooms, cr); 289 289 g_free(cr); 290 imc _error(sess->aux_data, _("Chat is currently unavailable"));290 imcb_error(sess->aux_data, _("Chat is currently unavailable")); 291 291 } 292 292 aim_conn_kill(odata->sess, &conn); … … 325 325 326 326 if (source < 0) { 327 imc _error(ic, _("Couldn't connect to host"));327 imcb_error(ic, _("Couldn't connect to host")); 328 328 imc_logout(ic, TRUE); 329 329 return FALSE; … … 353 353 aim_session_t *sess; 354 354 aim_conn_t *conn; 355 struct im_connection *ic = imc _new(acc);355 struct im_connection *ic = imcb_new(acc); 356 356 struct oscar_data *odata = ic->proto_data = g_new0(struct oscar_data, 1); 357 357 … … 380 380 conn = aim_newconn(sess, AIM_CONN_TYPE_AUTH, NULL); 381 381 if (conn == NULL) { 382 imc _error(ic, _("Unable to login to AIM"));382 imcb_error(ic, _("Unable to login to AIM")); 383 383 imc_logout(ic, TRUE); 384 384 return; … … 386 386 387 387 if (acc->server == NULL) { 388 imc _error(ic, "No servername specified");388 imcb_error(ic, "No servername specified"); 389 389 imc_logout(ic, FALSE); 390 390 return; … … 393 393 if (g_strcasecmp(acc->server, "login.icq.com") != 0 && 394 394 g_strcasecmp(acc->server, "login.oscar.aol.com") != 0) { 395 imc _log(ic, "Warning: Unknown OSCAR server: `%s'. Please review your configuration if the connection fails.",acc->server);396 } 397 398 imc _log(ic, _("Signon: %s"), ic->acc->user);395 imcb_log(ic, "Warning: Unknown OSCAR server: `%s'. Please review your configuration if the connection fails.",acc->server); 396 } 397 398 imcb_log(ic, _("Signon: %s"), ic->acc->user); 399 399 400 400 aim_conn_addhandler(sess, conn, 0x0017, 0x0007, gaim_parse_login, 0); … … 404 404 conn->fd = proxy_connect(acc->server, AIM_LOGIN_PORT, oscar_login_connect, ic); 405 405 if (conn->fd < 0) { 406 imc _error(ic, _("Couldn't connect to host"));406 imcb_error(ic, _("Couldn't connect to host")); 407 407 imc_logout(ic, TRUE); 408 408 return; … … 464 464 465 465 if (source < 0) { 466 imc _error(ic, _("Could Not Connect"));466 imcb_error(ic, _("Could Not Connect")); 467 467 imc_logout(ic, TRUE); 468 468 return FALSE; … … 472 472 ic->inpa = b_input_add(bosconn->fd, GAIM_INPUT_READ, 473 473 oscar_callback, bosconn); 474 imc _log(ic, _("Connection established, cookie sent"));474 imcb_log(ic, _("Connection established, cookie sent")); 475 475 476 476 return FALSE; … … 495 495 case 0x05: 496 496 /* Incorrect nick/password */ 497 imc _error(ic, _("Incorrect nickname or password."));497 imcb_error(ic, _("Incorrect nickname or password.")); 498 498 // plugin_event(event_error, (void *)980, 0, 0, 0); 499 499 break; 500 500 case 0x11: 501 501 /* Suspended account */ 502 imc _error(ic, _("Your account is currently suspended."));502 imcb_error(ic, _("Your account is currently suspended.")); 503 503 break; 504 504 case 0x18: 505 505 /* connecting too frequently */ 506 imc _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."));506 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.")); 507 507 break; 508 508 case 0x1c: 509 509 /* client too old */ 510 imc _error(ic, _("The client version you are using is too old. Please upgrade at " WEBSITE));510 imcb_error(ic, _("The client version you are using is too old. Please upgrade at " WEBSITE)); 511 511 break; 512 512 default: 513 imc _error(ic, _("Authentication Failed"));513 imcb_error(ic, _("Authentication Failed")); 514 514 break; 515 515 } … … 523 523 bosconn = aim_newconn(sess, AIM_CONN_TYPE_BOS, NULL); 524 524 if (bosconn == NULL) { 525 imc _error(ic, _("Internal Error"));525 imcb_error(ic, _("Internal Error")); 526 526 od->killme = TRUE; 527 527 return 0; … … 569 569 g_free(host); 570 570 if (bosconn->fd < 0) { 571 imc _error(ic, _("Could Not Connect"));571 imcb_error(ic, _("Could Not Connect")); 572 572 od->killme = TRUE; 573 573 return 0; … … 607 607 } 608 608 if (in != '\n') { 609 imc _error(pos->ic, "Gaim was unable to get a valid hash for logging into AIM."609 imcb_error(pos->ic, "Gaim was unable to get a valid hash for logging into AIM." 610 610 " You may be disconnected shortly."); 611 611 b_event_remove(pos->inpa); … … 630 630 631 631 if (source < 0) { 632 imc _error(pos->ic, "Gaim was unable to get a valid hash for logging into AIM."632 imcb_error(pos->ic, "Gaim was unable to get a valid hash for logging into AIM." 633 633 " You may be disconnected shortly."); 634 634 if (pos->modname) … … 708 708 g_free(pos->modname); 709 709 g_free(pos); 710 imc _error(sess->aux_data, "Gaim was unable to get a valid hash for logging into AIM."710 imcb_error(sess->aux_data, "Gaim was unable to get a valid hash for logging into AIM." 711 711 " You may be disconnected shortly."); 712 712 } … … 1112 1112 inv->name = g_strdup(name); 1113 1113 1114 do_ask_dialog( ic, txt, inv, oscar_accept_chat, oscar_reject_chat);1114 imcb_ask( ic, txt, inv, oscar_accept_chat, oscar_reject_chat); 1115 1115 1116 1116 if (name) … … 1130 1130 // aim_send_im_ch4(od->sess, uin, AIM_ICQMSG_AUTHGRANTED, &message); 1131 1131 if(find_buddy(data->ic, uin) == NULL) 1132 show_got_added(data->ic, uin, NULL);1132 imcb_ask_add(data->ic, uin, NULL); 1133 1133 1134 1134 g_free(uin); … … 1164 1164 data->ic = ic; 1165 1165 data->uin = uin; 1166 do_ask_dialog(ic, dialog_msg, data, gaim_icq_authgrant, gaim_icq_authdeny);1166 imcb_ask(ic, dialog_msg, data, gaim_icq_authgrant, gaim_icq_authdeny); 1167 1167 g_free(dialog_msg); 1168 1168 } … … 1207 1207 1208 1208 case 0x0007: { /* Someone has denied you authorization */ 1209 imc _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.") );1209 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.") ); 1210 1210 } break; 1211 1211 1212 1212 case 0x0008: { /* Someone has granted you authorization */ 1213 imc _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.") );1213 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.") ); 1214 1214 } break; 1215 1215 … … 1277 1277 case 0: 1278 1278 /* Invalid (0) */ 1279 imc _error(sess->aux_data,1279 imcb_error(sess->aux_data, 1280 1280 nummissed == 1 ? 1281 1281 _("You missed %d message from %s because it was invalid.") : … … 1286 1286 case 1: 1287 1287 /* Message too large */ 1288 imc _error(sess->aux_data,1288 imcb_error(sess->aux_data, 1289 1289 nummissed == 1 ? 1290 1290 _("You missed %d message from %s because it was too large.") : … … 1295 1295 case 2: 1296 1296 /* Rate exceeded */ 1297 imc _error(sess->aux_data,1297 imcb_error(sess->aux_data, 1298 1298 nummissed == 1 ? 1299 1299 _("You missed %d message from %s because the rate limit has been exceeded.") : … … 1304 1304 case 3: 1305 1305 /* Evil Sender */ 1306 imc _error(sess->aux_data,1306 imcb_error(sess->aux_data, 1307 1307 nummissed == 1 ? 1308 1308 _("You missed %d message from %s because it was too evil.") : … … 1313 1313 case 4: 1314 1314 /* Evil Receiver */ 1315 imc _error(sess->aux_data,1315 imcb_error(sess->aux_data, 1316 1316 nummissed == 1 ? 1317 1317 _("You missed %d message from %s because you are too evil.") : … … 1321 1321 break; 1322 1322 default: 1323 imc _error(sess->aux_data,1323 imcb_error(sess->aux_data, 1324 1324 nummissed == 1 ? 1325 1325 _("You missed %d message from %s for unknown reasons.") : … … 1341 1341 va_end(ap); 1342 1342 1343 imc _error(sess->aux_data, _("SNAC threw error: %s"),1343 imcb_error(sess->aux_data, _("SNAC threw error: %s"), 1344 1344 reason < msgerrreasonlen ? msgerrreason[reason] : "Unknown error"); 1345 1345 … … 1357 1357 va_end(ap); 1358 1358 1359 imc _error(sess->aux_data, _("Your message to %s did not get sent: %s"), destn,1359 imcb_error(sess->aux_data, _("Your message to %s did not get sent: %s"), destn, 1360 1360 (reason < msgerrreasonlen) ? msgerrreason[reason] : _("Reason unknown")); 1361 1361 … … 1373 1373 va_end(ap); 1374 1374 1375 imc _error(sess->aux_data, _("User information for %s unavailable: %s"), destn,1375 imcb_error(sess->aux_data, _("User information for %s unavailable: %s"), destn, 1376 1376 (reason < msgerrreasonlen) ? msgerrreason[reason] : _("Reason unknown")); 1377 1377 … … 1390 1390 1391 1391 if (id < 4) 1392 imc _error(sess->aux_data, _("Your connection may be lost."));1392 imcb_error(sess->aux_data, _("Your connection may be lost.")); 1393 1393 1394 1394 return 1; … … 1584 1584 aim_conn_setlatency(fr->conn, windowsize/4); 1585 1585 } else if (code == AIM_RATE_CODE_LIMIT) { 1586 imc _error(sess->aux_data, _("The last message was not sent because you are over the rate limit. "1586 imcb_error(sess->aux_data, _("The last message was not sent because you are over the rate limit. " 1587 1587 "Please wait 10 seconds and try again.")); 1588 1588 aim_conn_setlatency(fr->conn, windowsize/2); … … 1789 1789 1790 1790 case 0x0007: { /* Someone has denied you authorization */ 1791 imc _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.") );1791 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.") ); 1792 1792 } break; 1793 1793 1794 1794 case 0x0008: { /* Someone has granted you authorization */ 1795 imc _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.") );1795 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.") ); 1796 1796 } break; 1797 1797 … … 1906 1906 1907 1907 if (od->rights.maxawaymsglen == 0) 1908 imc _error(ic, "oscar_set_away_aim called before locate rights received");1908 imcb_error(ic, "oscar_set_away_aim called before locate rights received"); 1909 1909 1910 1910 aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_NORMAL); … … 1920 1920 1921 1921 if (strlen(message) > od->rights.maxawaymsglen) { 1922 imc _error(ic, "Maximum away message length of %d bytes exceeded, truncating", od->rights.maxawaymsglen);1922 imcb_error(ic, "Maximum away message length of %d bytes exceeded, truncating", od->rights.maxawaymsglen); 1923 1923 } 1924 1924 … … 2084 2084 2085 2085 /* Now that we have a buddy list, we can tell BitlBee that we're online. */ 2086 imc _connected(ic);2086 imcb_connected(ic); 2087 2087 2088 2088 return 1; … … 2106 2106 { 2107 2107 /* Hmm, the length should be even... */ 2108 imc _error( sess->aux_data, "Received SSI ACK package with non-even length");2108 imcb_error( sess->aux_data, "Received SSI ACK package with non-even length"); 2109 2109 return( 0 ); 2110 2110 } … … 2117 2117 if( st == 0x0E ) 2118 2118 { 2119 imc _log( sess->aux_data, "Buddy %s can't be added without authorization, requesting authorization", list );2119 imcb_log( sess->aux_data, "Buddy %s can't be added without authorization, requesting authorization", list ); 2120 2120 2121 2121 aim_ssi_auth_request( sess, fr->conn, list, "" ); … … 2303 2303 } 2304 2304 2305 imc _log(ic, "%s\n%s", _("User Info"), str->str);2305 imcb_log(ic, "%s\n%s", _("User Info"), str->str); 2306 2306 g_string_free(str, TRUE); 2307 2307 … … 2397 2397 idletime.tm_sec = 0; 2398 2398 strftime(buff, 256, _("%d days %H hours %M minutes"), &idletime); 2399 imc _log(ic, "%s: %s", _("Idle Time"), buff);2399 imcb_log(ic, "%s: %s", _("Idle Time"), buff); 2400 2400 } 2401 2401 2402 2402 if(text) { 2403 2403 utf8 = oscar_encoding_to_utf8(extracted_encoding, text, text_length); 2404 imc _log(ic, "%s\n%s", _("User Info"), utf8);2404 imcb_log(ic, "%s\n%s", _("User Info"), utf8); 2405 2405 } else { 2406 imc _log(ic, _("No user info available."));2406 imcb_log(ic, _("No user info available.")); 2407 2407 } 2408 2408 } else if(infotype == AIM_GETINFO_AWAYMESSAGE && userinfo->flags & AIM_FLAG_AWAY) { 2409 2409 utf8 = oscar_encoding_to_utf8(extracted_encoding, text, text_length); 2410 imc _log(ic, "%s\n%s", _("Away Message"), utf8);2410 imcb_log(ic, "%s\n%s", _("Away Message"), utf8); 2411 2411 } 2412 2412 -
protocols/oscar/rxqueue.c
rc2fb3809 r84b045d 392 392 aim_bstream_rewind(&flaphdr); 393 393 start = aimbs_get8(&flaphdr); 394 imc _error(sess->aux_data, "FLAP framing disrupted");394 imcb_error(sess->aux_data, "FLAP framing disrupted"); 395 395 aim_conn_close(conn); 396 396 return -1; -
protocols/oscar/search.c
rc2fb3809 r84b045d 39 39 /* XXX the modules interface should have already retrieved this for us */ 40 40 if (!(snac2 = aim_remsnac(sess, snac->id))) { 41 imc _error(sess->aux_data, "couldn't get snac");41 imcb_error(sess->aux_data, "couldn't get snac"); 42 42 return 0; 43 43 } -
protocols/oscar/service.c
rc2fb3809 r84b045d 567 567 group = aimbs_get16(bs); 568 568 569 imc _error(sess->aux_data, "bifurcated migration unsupported");569 imcb_error(sess->aux_data, "bifurcated migration unsupported"); 570 570 } 571 571 … … 894 894 */ 895 895 } else 896 imc _error(sess->aux_data, "WARNING: unknown hash request");896 imcb_error(sess->aux_data, "WARNING: unknown hash request"); 897 897 898 898 } -
protocols/oscar/txqueue.c
rc2fb3809 r84b045d 30 30 31 31 if (!conn) { 32 imc _error(sess->aux_data, "no connection specified");32 imcb_error(sess->aux_data, "no connection specified"); 33 33 return NULL; 34 34 } … … 46 46 47 47 } else 48 imc _error(sess->aux_data, "unknown framing");48 imcb_error(sess->aux_data, "unknown framing"); 49 49 50 50 if (datalen > 0) { … … 80 80 81 81 if (!fr->conn) { 82 imc _error(sess->aux_data, "WARNING: enqueueing packet with no connection");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 imc _error(sess->aux_data, "packet has no connection");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.