Changeset d0faf62
- Timestamp:
- 2008-02-17T01:58:41Z (17 years ago)
- Branches:
- master
- Children:
- 37bff51
- Parents:
- 82e8fe8
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/user-guide/commands.xml
r82e8fe8 rd0faf62 346 346 347 347 <para> 348 Forgets some part of our OTR userstate. Available things: fingerprint and context. See <emphasis>help otr forget <thing></emphasis> for more information.348 Forgets some part of our OTR userstate. Available things: fingerprint, context, and key. 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 379 392 </bitlbee-command> 380 393 -
otr.c
r82e8fe8 rd0faf62 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); 129 130 130 131 /* helper to make sure accountname and protocol match the incoming "opdata" */ … … 899 900 } 900 901 902 void yes_forget_key(gpointer w, void *data) 903 { 904 OtrlPrivKey *key = (OtrlPrivKey *)data; 905 906 otrl_privkey_forget(key); 907 } 908 901 909 void cmd_otr_forget(irc_t *irc, char **args) 902 910 { … … 972 980 s = g_strdup_printf("about to forget otr data about %s, are you sure?", args[2]); 973 981 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); 974 999 g_free(s); 975 1000 }
Note: See TracChangeset
for help on using the changeset viewer.