modify msg source to show actual source id as well as (character) source
This commit is contained in:
parent
ac813064fd
commit
69baf79b8f
1 changed files with 6 additions and 2 deletions
|
@ -41,8 +41,12 @@ impl GameServer {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if msg.source.is_empty() {
|
if msg.source.is_empty() {
|
||||||
msg.source = id.clone();
|
msg.source = format!("({})", id.clone());
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
msg.source = format!("{} ({})", msg.source, id.clone());
|
||||||
|
}
|
||||||
|
|
||||||
self.chat.push((id.clone(), msg.clone()));
|
self.chat.push((id.clone(), msg.clone()));
|
||||||
_ = broadcast.send((None, api::Response::Message(msg)));
|
_ = broadcast.send((None, api::Response::Message(msg)));
|
||||||
},
|
},
|
||||||
|
@ -70,4 +74,4 @@ impl GameServer {
|
||||||
}
|
}
|
||||||
_ = broadcast.send((None, api::Response::Shutdown));
|
_ = broadcast.send((None, api::Response::Shutdown));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue