mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'tell_fix' into 'master'
Fix tell command, rename to /tell See merge request veloren/veloren!343
This commit is contained in:
commit
58a41d4bec
@ -119,10 +119,10 @@ lazy_static! {
|
|||||||
handle_build,
|
handle_build,
|
||||||
),
|
),
|
||||||
ChatCommand::new(
|
ChatCommand::new(
|
||||||
"msg",
|
"tell",
|
||||||
"{}",
|
"{}",
|
||||||
"/msg <alias> : Send a message to another player",
|
"/tell <alias> <message>: Send a message to another player",
|
||||||
handle_msg,
|
handle_tell,
|
||||||
),
|
),
|
||||||
ChatCommand::new(
|
ChatCommand::new(
|
||||||
"killnpcs",
|
"killnpcs",
|
||||||
@ -437,7 +437,7 @@ fn handle_killnpcs(server: &mut Server, entity: EcsEntity, _args: String, _actio
|
|||||||
server.clients.notify(entity, ServerMsg::Chat(text));
|
server.clients.notify(entity, ServerMsg::Chat(text));
|
||||||
}
|
}
|
||||||
|
|
||||||
fn handle_msg(server: &mut Server, entity: EcsEntity, args: String, action: &ChatCommand) {
|
fn handle_tell(server: &mut Server, entity: EcsEntity, args: String, action: &ChatCommand) {
|
||||||
let opt_alias = scan_fmt!(&args, action.arg_fmt, String);
|
let opt_alias = scan_fmt!(&args, action.arg_fmt, String);
|
||||||
match opt_alias {
|
match opt_alias {
|
||||||
Some(alias) => {
|
Some(alias) => {
|
||||||
@ -462,8 +462,8 @@ fn handle_msg(server: &mut Server, entity: EcsEntity, args: String, action: &Cha
|
|||||||
ServerMsg::Chat(format!("{} tells you:{}", name, msg)),
|
ServerMsg::Chat(format!("{} tells you:{}", name, msg)),
|
||||||
);
|
);
|
||||||
server.clients.notify(
|
server.clients.notify(
|
||||||
player,
|
entity,
|
||||||
ServerMsg::Chat(format!("You tell {} {}", alias, msg)),
|
ServerMsg::Chat(format!("You tell {}:{}", alias, msg)),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
None => {
|
None => {
|
||||||
|
Loading…
Reference in New Issue
Block a user