Просмотр исходного кода

darkirc: Replace DM nick with the one from the config when decrypting.

parazyd 2 лет назад
Родитель
Сommit
7b3a4cffd0
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      bin/darkirc/src/irc/server.rs

+ 3 - 1
bin/darkirc/src/irc/server.rs

@@ -357,8 +357,10 @@ impl IrcServer {
                 Self::unpad(&mut nick_dec);
                 Self::unpad(&mut nick_dec);
 
 
                 privmsg.channel = String::from_utf8_lossy(&channel_dec).into();
                 privmsg.channel = String::from_utf8_lossy(&channel_dec).into();
-                privmsg.nick = String::from_utf8_lossy(&nick_dec).into();
+                //privmsg.nick = String::from_utf8_lossy(&nick_dec).into();
+                privmsg.nick = name.to_string();
                 privmsg.msg = String::from_utf8_lossy(&msg_dec).into();
                 privmsg.msg = String::from_utf8_lossy(&msg_dec).into();
+
                 debug!("Successfully decrypted message from {}", name);
                 debug!("Successfully decrypted message from {}", name);
                 return
                 return
             }
             }