Changeset e65039a
- Timestamp:
- 2013-08-03T12:49:03Z (11 years ago)
- Branches:
- master
- Children:
- e4752a6
- Parents:
- fbcb481
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
otr.c
rfbcb481 re65039a 77 77 const char *op_account_name(void *opdata, const char *account, const char *protocol); 78 78 79 void op_create_instag(void *opdata, const char *account, const char *protocol); 80 79 81 void op_convert_msg(void *opdata, ConnContext *ctx, OtrlConvertType typ, 80 82 char **dst, const char *src); … … 241 243 otr_ops.handle_smp_event = &op_handle_smp_event; 242 244 otr_ops.handle_msg_event = &op_handle_msg_event; 243 otr_ops.create_instag = NULL; // XXX245 otr_ops.create_instag = &op_create_instag; 244 246 otr_ops.convert_msg = &op_convert_msg; 245 247 otr_ops.convert_free = &op_convert_free; … … 314 316 g_snprintf(s, 511, "%s%s.otr_fprints", global.conf->configdir, irc->user->nick); 315 317 e = otrl_privkey_read_fingerprints(irc->otr->us, s, NULL, NULL); 318 if(e && e!=enoent) { 319 irc_rootmsg(irc, "otr load: %s: %s", s, gcry_strerror(e)); 320 } 321 g_snprintf(s, 511, "%s%s.otr_instags", global.conf->configdir, irc->user->nick); 322 e = otrl_instag_read(irc->otr->us, s); 316 323 if(e && e!=enoent) { 317 324 irc_rootmsg(irc, "otr load: %s: %s", s, gcry_strerror(e)); … … 678 685 679 686 return peernick(irc, account, protocol); 687 } 688 689 void op_create_instag(void *opdata, const char *account, const char *protocol) 690 { 691 struct im_connection *ic = 692 check_imc(opdata, account, protocol); 693 irc_t *irc = ic->bee->ui_data; 694 gcry_error_t e; 695 char s[512]; 696 697 g_snprintf(s, 511, "%s%s.otr_instags", global.conf->configdir, 698 irc->user->nick); 699 e = otrl_instag_generate(irc->otr->us, s, account, protocol); 700 if(e) { 701 irc_rootmsg(irc, "otr: %s/%s: otrl_instag_generate failed: %s", 702 account, protocol, gcry_strerror(e)); 703 } 680 704 } 681 705
Note: See TracChangeset
for help on using the changeset viewer.