Changeset 1dd3470


Ignore:
Timestamp:
2010-06-03T21:47:53Z (14 years ago)
Author:
Sven Moritz Hallberg <pesco@…>
Branches:
master
Children:
3759849
Parents:
bb09b3c
Message:

add an option to disable otr on twitter (and other unsuitable protocols)

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • otr.c

    rbb09b3c r1dd3470  
    304304        OtrlPrivKey *k;
    305305       
     306        /* don't do OTR on certain (not classic IM) protocols, e.g. twitter */
     307        if(a->prpl->options & OPT_NOOTR) {
     308                return 0;
     309        }
     310       
    306311        k = otrl_privkey_find(irc->otr->us, a->user, a->prpl->name);
    307312        if(k) {
     
    324329        OtrlTLV *tlvs = NULL;
    325330        char *colormsg;
     331       
     332        /* don't do OTR on certain (not classic IM) protocols, e.g. twitter */
     333        if(ic->acc->prpl->options & OPT_NOOTR) {
     334                return (g_strdup(msg));
     335        }
    326336       
    327337        ignore_msg = otrl_message_receiving(ic->irc->otr->us, &global.otr_ops, ic,
     
    371381        char *otrmsg = NULL;
    372382        ConnContext *ctx = NULL;
     383
     384        /* don't do OTR on certain (not classic IM) protocols, e.g. twitter */
     385        if(ic->acc->prpl->options & OPT_NOOTR) {
     386                return (ic->acc->prpl->buddy_msg(ic, handle, msg, flags));
     387        }
    373388       
    374389        st = otrl_message_sending(ic->irc->otr->us, &global.otr_ops, ic,
  • protocols/nogaim.h

    rbb09b3c r1dd3470  
    5959#define OPT_TYPING      0x00000100 /* Some pieces of code make assumptions */
    6060#define OPT_THINKING    0x00000200 /* about these values... Stupid me! */
     61#define OPT_NOOTR       0x00001000 /* protocol not suitable for OTR */
    6162
    6263/* ok. now the fun begins. first we create a connection structure */
     
    132133         * - The user sees this name ie. when imcb_log() is used. */
    133134        const char *name;
    134     /* Maximum Message Size of this protocol.
    135     * - Introduced for OTR, in order to fragment large protocol messages.
    136     * - 0 means "unlimited". */
    137     unsigned int mms;
     135        /* Maximum Message Size of this protocol.
     136        * - Introduced for OTR, in order to fragment large protocol messages.
     137        * - 0 means "unlimited". */
     138        unsigned int mms;
    138139
    139140        /* Added this one to be able to add per-account settings, don't think
  • protocols/twitter/twitter.c

    rbb09b3c r1dd3470  
    336336        struct prpl *ret = g_new0(struct prpl, 1);
    337337       
     338        ret->options = OPT_NOOTR;
    338339        ret->name = "twitter";
    339340        ret->login = twitter_login;
Note: See TracChangeset for help on using the changeset viewer.