Changeset 903a2fc
- Timestamp:
- 2008-02-16T16:24:38Z (17 years ago)
- Branches:
- master
- Children:
- 8961950
- Parents:
- 1221ef0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/user-guide/commands.xml
r1221ef0 r903a2fc 346 346 347 347 <para> 348 Forgets some part of our OTR userstate. Available things: fingerprint , context, and key. See <emphasis>help otr forget <thing></emphasis> for more information.348 Forgets some part of our OTR userstate. Available things: fingerprint and context. See <emphasis>help otr forget <thing></emphasis> for more information. 349 349 </para> 350 350 … … 377 377 </bitlbee-command> 378 378 379 <bitlbee-command name="key">380 <syntax>otr forget key <fingerprint></syntax>381 382 <description>383 384 <para>385 Forgets an OTR private key matching the specified fingerprint. It is allowed to specify only a (unique) prefix of the fingerprint.386 </para>387 388 </description>389 390 </bitlbee-command>391 392 379 </bitlbee-command> 393 380 -
otr.c
r1221ef0 r903a2fc 127 127 void yes_forget_fingerprint(gpointer w, void *data); 128 128 void yes_forget_context(gpointer w, void *data); 129 void yes_forget_key(gpointer w, void *data);130 129 131 130 /* helper to make sure accountname and protocol match the incoming "opdata" */ … … 899 898 } 900 899 901 void yes_forget_key(gpointer w, void *data)902 {903 OtrlPrivKey *key = (OtrlPrivKey *)data;904 905 /* FIXME: For some reason which /completely eludes me/, this call keeps906 barfing on the gcry_sexp_release inside (invalid pointer free). */907 otrl_privkey_forget(key);908 }909 910 900 void cmd_otr_forget(irc_t *irc, char **args) 911 901 { … … 980 970 s = g_strdup_printf("about to forget otr data about %s, are you sure?", args[2]); 981 971 query_add(irc, NULL, s, yes_forget_context, NULL, ctx); 982 }983 984 else if(!strcmp(args[1], "key"))985 {986 OtrlPrivKey *key;987 char *s;988 989 key = match_privkey(irc, ((const char **)args)+2);990 if(!key) {991 /* match_privkey does error messages */992 return;993 }994 995 /* TODO: Find out why 'otr forget key' barfs (cf. yes_forget_key) */996 irc_usermsg(irc, "otr %s %s: not implemented, please edit \x02%s%s.otr_keys\x02 manually :-/",997 args[0], args[1], global.conf->configdir, irc->nick);998 return;999 1000 s = g_strdup_printf("about to forget the private key for %s/%s, are you sure?",1001 key->accountname, key->protocol);1002 query_add(irc, NULL, s, yes_forget_key, NULL, key);1003 972 } 1004 973
Note: See TracChangeset
for help on using the changeset viewer.