Changeset d0faf62 for otr.c


Ignore:
Timestamp:
2008-02-17T01:58:41Z (15 years ago)
Author:
Sven Moritz Hallberg <sm@…>
Branches:
master
Children:
37bff51
Parents:
82e8fe8
Message:

put 'otr forget key' back in, which now works

File:
1 edited

Legend:

Unmodified
Added
Removed
  • otr.c

    r82e8fe8 rd0faf62  
    127127void yes_forget_fingerprint(gpointer w, void *data);
    128128void yes_forget_context(gpointer w, void *data);
     129void yes_forget_key(gpointer w, void *data);
    129130
    130131/* helper to make sure accountname and protocol match the incoming "opdata" */
     
    899900}
    900901
     902void yes_forget_key(gpointer w, void *data)
     903{
     904        OtrlPrivKey *key = (OtrlPrivKey *)data;
     905       
     906        otrl_privkey_forget(key);
     907}
     908
    901909void cmd_otr_forget(irc_t *irc, char **args)
    902910{
     
    972980                s = g_strdup_printf("about to forget otr data about %s, are you sure?", args[2]);
    973981                query_add(irc, NULL, s, yes_forget_context, NULL, ctx);
     982                g_free(s);
     983        }
     984       
     985        else if(!strcmp(args[1], "key"))
     986        {
     987                OtrlPrivKey *key;
     988                char *s;
     989               
     990                key = match_privkey(irc, ((const char **)args)+2);
     991                if(!key) {
     992                        /* match_privkey does error messages */
     993                        return;
     994                }
     995               
     996                s = g_strdup_printf("about to forget the private key for %s/%s, are you sure?",
     997                        key->accountname, key->protocol);
     998                query_add(irc, NULL, s, yes_forget_key, NULL, key);
    974999                g_free(s);
    9751000        }
Note: See TracChangeset for help on using the changeset viewer.