=== modified file 'otr.c'
|
|
|
453 | 453 | |
454 | 454 | st = otrl_message_sending(irc->otr->us, &otr_ops, ic, |
455 | 455 | ic->acc->user, ic->acc->prpl->name, iu->bu->handle, instag, |
456 | | emsg, NULL, &otrmsg, OTRL_FRAGMENT_SEND_ALL, &ctx, NULL, NULL); |
| 456 | emsg, NULL, &otrmsg, OTRL_FRAGMENT_SEND_SKIP, &ctx, NULL, NULL); |
457 | 457 | /* in libotr 4.0.0 with OTRL_FRAGMENT_SEND_ALL, otrmsg must be passed |
458 | 458 | * but the value it gets carries no meaning. it can be set even though |
459 | | * the message has been injected. */ |
| 459 | * the message has been injected. |
| 460 | * With OTRL_FRAGMENT_SEND_SKIP, libotr doesn't handle the sending, it's |
| 461 | * up to us. |
| 462 | */ |
| 463 | printf("otrmsg %s\n", otrmsg); |
460 | 464 | |
461 | 465 | if(emsg != msg) { |
462 | 466 | g_free(emsg); /* we're done with this one */ |
| 467 | emsg = NULL; |
463 | 468 | } |
464 | 469 | if(st) { |
465 | | /* TODO: Error reporting? */ |
| 470 | irc_rootmsg(irc, "Error encrypting text for OTR: %d", st); |
466 | 471 | } |
467 | 472 | |
468 | | return NULL; |
| 473 | printf("Reached end\n"); |
| 474 | if (otrmsg != NULL) { |
| 475 | return otrmsg; |
| 476 | } |
| 477 | return emsg; |
469 | 478 | } |
470 | 479 | |
471 | 480 | static const struct irc_plugin otr_plugin = |