bin/ircd: fix a bug in DM

This commit is contained in:
ghassmo
2022-06-29 15:21:59 +03:00
parent 010ddad754
commit cdd139eefb
3 changed files with 6 additions and 14 deletions

View File

@@ -1,9 +0,0 @@
#!/bin/bash
# Change this value to the hostname of the seed server
SEED_HOSTNAME=XXX
LOCAL_IP=$(ip route get 8.8.8.8 | head -1 | awk '{print $7}')
SEED_IP=$(getent hosts $SEED_HOSTNAME.local | awk '{print $1}' | head -n 1)
cargo run -- --accept 0.0.0.0:11004 --slots 5 --external $LOCAL_IP:11004 --seeds $SEED_IP:9999 --irc 127.0.0.1:6667

View File

@@ -1,4 +0,0 @@
#!/bin/bash
LOCAL_IP=$(ip route get 8.8.8.8 | head -1 | awk '{print $7}')
cargo run -- --accept 0.0.0.0:9999 --irc 127.0.0.1:6688

View File

@@ -354,9 +354,14 @@ impl IrcServerConnection {
if !chan_info.names.contains(&msg.nickname) {
chan_info.names.push(msg.nickname.clone());
}
self.reply(&msg.to_irc_msg()).await?;
}
if self.is_nick_init && self.nickname == msg.target {
self.reply(&msg.to_irc_msg()).await?;
}
self.reply(&msg.to_irc_msg()).await?;
Ok(())
}