Changeset f03a498
- Timestamp:
- 2011-09-21T20:09:18Z (13 years ago)
- Branches:
- master
- Children:
- da44b08
- Parents:
- ff18fc1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
otr.c
rff18fc1 rf03a498 431 431 int st; 432 432 char *otrmsg = NULL; 433 char *emsg = msg; /* the message as we hand it to libotr */ 433 434 ConnContext *ctx = NULL; 434 435 irc_t *irc = iu->irc; … … 440 441 } 441 442 442 /* HTML encoding */443 /* consider OTR plaintext to be HTML if otr_does_html is set */444 if(set_getbool(&ic->bee->set, "otr_does_html") &&445 (g_strncasecmp(msg, "<html>", 6) != 0)) {446 msg = escape_html(msg);447 }448 449 st = otrl_message_sending(irc->otr->us, &otr_ops, ic,450 ic->acc->user, ic->acc->prpl->name, iu->bu->handle,451 msg, NULL, &otrmsg, NULL, NULL);452 if(st) {453 return NULL;454 }455 456 443 ctx = otrl_context_find(irc->otr->us, 457 444 iu->bu->handle, ic->acc->user, ic->acc->prpl->name, 458 445 1, NULL, NULL, NULL); 446 447 /* HTML encoding */ 448 /* consider OTR plaintext to be HTML if otr_does_html is set */ 449 if(ctx && ctx->msgstate == OTRL_MSGSTATE_ENCRYPTED && 450 set_getbool(&ic->bee->set, "otr_does_html") && 451 (g_strncasecmp(msg, "<html>", 6) != 0)) { 452 emsg = escape_html(msg); 453 } 454 455 st = otrl_message_sending(irc->otr->us, &otr_ops, ic, 456 ic->acc->user, ic->acc->prpl->name, iu->bu->handle, 457 emsg, NULL, &otrmsg, NULL, NULL); 458 if(emsg != msg) { 459 g_free(emsg); /* we're done with this one */ 460 } 461 if(st) { 462 return NULL; 463 } 459 464 460 465 if(otrmsg) {
Note: See TracChangeset
for help on using the changeset viewer.