mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
bin/ircd: join only channels that start with #
This commit is contained in:
@@ -71,6 +71,10 @@ impl IrcServerConnection {
|
||||
"JOIN" => {
|
||||
let channels = tokens.next().ok_or(Error::MalformedPacket)?;
|
||||
for chan in channels.split(',') {
|
||||
if !chan.starts_with('#') {
|
||||
warn!("{} is not a valid name for channel", chan);
|
||||
continue
|
||||
}
|
||||
let join_reply = format!(":{}!anon@dark.fi JOIN {}\r\n", self.nickname, chan);
|
||||
self.reply(&join_reply).await?;
|
||||
if !self.configured_chans.contains_key(chan) {
|
||||
|
||||
Reference in New Issue
Block a user