瀏覽代碼

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

parazyd 2 年之前
父節點
當前提交
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);
 
                 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();
+
                 debug!("Successfully decrypted message from {}", name);
                 return
             }