Changeset 0e078a7


Ignore:
Timestamp:
2010-09-19T20:04:32Z (14 years ago)
Author:
Sven Moritz Hallberg <pesco@…>
Branches:
master
Children:
4752063
Parents:
10d89be
Message:

complain when trying smp without an otr channel

File:
1 edited

Legend:

Unmodified
Added
Removed
  • otr.c

    r10d89be r0e078a7  
    10641064        if(!context) {
    10651065                /* huh? out of memory or what? */
     1066                irc_usermsg(irc, "smp: failed to get otr context for %s", u->nick);
     1067                otrl_message_abort_smp(us, ops, u->bu->ic, context);
     1068                otrl_sm_state_free(context->smstate);
    10661069                return;
    10671070        }
     
    11741177       
    11751178        ctx = otrl_context_find(irc->otr->us, u->bu->handle,
    1176                 u->bu->ic->acc->user, u->bu->ic->acc->prpl->name, 1, NULL, NULL, NULL);
    1177         if(!ctx) {
    1178                 /* huh? out of memory or what? */
     1179                u->bu->ic->acc->user, u->bu->ic->acc->prpl->name, 0, NULL, NULL, NULL);
     1180        if(!ctx || ctx->msgstate != OTRL_MSGSTATE_ENCRYPTED) {
     1181                irc_usermsg(irc, "smp: otr inactive with %s, try \x02otr connect"
     1182                                " %s\x02", nick, nick);
    11791183                return;
    11801184        }
Note: See TracChangeset for help on using the changeset viewer.