Changeset 3064ea4
- Timestamp:
- 2008-02-16T15:20:58Z (17 years ago)
- Branches:
- master
- Children:
- 1221ef0
- Parents:
- dc9797f
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
irc.c
rdc9797f r3064ea4 788 788 789 789 irc_usermsg( irc, "Welcome to the BitlBee gateway!\n\nIf you've never used BitlBee before, please do read the help information using the \x02help\x02 command. Lots of FAQs are answered there." ); 790 #ifdef WITH_OTR 791 irc_usermsg( irc, "\nOTR users please note: Private key files are owned by the user BitlBee is running as." ); 792 #endif 790 793 791 794 if( global.conf->runmode == RUNMODE_FORKDAEMON || global.conf->runmode == RUNMODE_DAEMON ) -
otr.c
rdc9797f r3064ea4 230 230 gcry_error_t e; 231 231 gcry_error_t enoent = gcry_error_from_errno(ENOENT); 232 int kg=0; 232 233 233 234 log_message(LOGLVL_DEBUG, "otr_load '%s'", irc->nick); … … 246 247 /* check for otr keys on all accounts */ 247 248 for(a=irc->accounts; a; a=a->next) { 248 otr_check_for_key(a); 249 kg = otr_check_for_key(a) || kg; 250 } 251 if(kg) { 252 irc_usermsg(irc, "Notice: " 253 "The accounts above do not have OTR encryption keys associated with them, yet. " 254 "These keys are now being generated in the background. " 255 "You will be notified as they are completed. " 256 "It is not necessary to wait; " 257 "BitlBee can be used normally during key generation. " 258 "You may safely ignore this message if you don't know what OTR is. ;)"); 249 259 } 250 260 } … … 291 301 } 292 302 293 voidotr_check_for_key(account_t *a)303 int otr_check_for_key(account_t *a) 294 304 { 295 305 irc_t *irc = a->irc; … … 299 309 if(k) { 300 310 irc_usermsg(irc, "otr: %s/%s ready", a->user, a->prpl->name); 311 return 0; 301 312 } if(keygen_in_progress(irc, a->user, a->prpl->name)) { 302 irc_usermsg(irc, "otr: keygen for %s/%s in progress", a->user, a->prpl->name); 313 irc_usermsg(irc, "otr: keygen for %s/%s already in progress", a->user, a->prpl->name); 314 return 0; 303 315 } else { 316 irc_usermsg(irc, "otr: starting background keygen for %s/%s", a->user, a->prpl->name); 304 317 otr_keygen(irc, a->user, a->prpl->name); 318 return 1; 305 319 } 306 320 } … … 1245 1259 } 1246 1260 if(count==0) 1247 irc_usermsg(irc, " no fingerprints");1261 irc_usermsg(irc, " (none)"); 1248 1262 } 1249 1263 … … 1385 1399 OtrlPrivKey *key; 1386 1400 char human[45]; 1387 1388 /* list all privkeys */ 1401 kg_t *kg; 1402 1403 /* list all privkeys (including ones being generated) */ 1389 1404 irc_usermsg(irc, "\x1fprivate keys:\x1f"); 1390 1405 for(key=irc->otr->us->privkey_root; key; key=key->next) { … … 1407 1422 irc_usermsg(irc, " %s", human); 1408 1423 } 1424 for(kg=irc->otr->todo; kg; kg=kg->next) { 1425 irc_usermsg(irc, " %s/%s - DSA", kg->accountname, kg->protocol); 1426 irc_usermsg(irc, " (being generated)"); 1427 } 1428 if(key == irc->otr->us->privkey_root && kg == irc->otr->todo) 1429 irc_usermsg(irc, " (none)"); 1409 1430 1410 1431 /* list all contexts */ … … 1431 1452 g_free(userstring); 1432 1453 } 1454 if(ctx == irc->otr->us->context_root) 1455 irc_usermsg(irc, " (none)"); 1433 1456 } 1434 1457 … … 1499 1522 if(keygen_in_progress(irc, handle, protocol)) 1500 1523 return; 1501 1502 irc_usermsg(irc, "generating new private key for %s/%s...", handle, protocol);1503 1524 1504 1525 /* see if we already have a keygen child running. if not, start one and put a … … 1687 1708 acc->user, acc->prpl->name); 1688 1709 } else { 1710 irc_usermsg(acc->irc, "starting background keygen for %s/%s", 1711 acc->user, acc->prpl->name); 1712 irc_usermsg(acc->irc, "you will be notified when it completes"); 1689 1713 otr_keygen(acc->irc, acc->user, acc->prpl->name); 1690 1714 } -
otr.h
rdc9797f r3064ea4 86 86 87 87 /* called from account_add() */ 88 voidotr_check_for_key(struct account *a);88 int otr_check_for_key(struct account *a); 89 89 90 90 /* called from imcb_buddy_msg() */ -
root_commands.c
rdc9797f r3064ea4 243 243 irc_usermsg( irc, "Account successfully added" ); 244 244 245 otr_check_for_key(a); 245 if(otr_check_for_key(a)) { 246 irc_usermsg(irc, "otr: you will be notified when it completes"); 247 } 246 248 } 247 249 else if( g_strcasecmp( cmd[1], "del" ) == 0 )
Note: See TracChangeset
for help on using the changeset viewer.