Parcourir la source

Merge branch 'ducch-fish-for-chans' into next

* ducch-fish-for-chans:
  * Fix bot-initiated key exchange due to FiSH support in notice()
Bryan Drewery il y a 14 ans
Parent
commit
8a9466b797
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      src/chanprog.c

+ 2 - 2
src/chanprog.c

@@ -972,10 +972,10 @@ void keyx(const bd::String &target) {
 
   DH1080_gen(myPrivateKey, myPublicKeyB64);
 
-  putlog(LOG_MSGS, "*", "[FiSH] Initiating DH1080 key-exchange with %s - sending my public key", target.c_str());
-  notice(target, "DH1080_INIT " + myPublicKeyB64, DP_HELP);
   fish_data_t* fishData = FishKeys.contains(target) ? FishKeys[target] : new fish_data_t;
   fishData->sharedKey.clear();
+  putlog(LOG_MSGS, "*", "[FiSH] Initiating DH1080 key-exchange with %s - sending my public key", target.c_str());
+  notice(target, "DH1080_INIT " + myPublicKeyB64, DP_HELP);
   fishData->myPublicKeyB64 = myPublicKeyB64;
   fishData->myPrivateKey = myPrivateKey;
   fishData->timestamp = now;