mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
server(cmd): add server version cmd
This commit is contained in:
parent
89980284aa
commit
1d88ec6295
@ -270,6 +270,13 @@ lazy_static! {
|
||||
true,
|
||||
handle_sudo,
|
||||
),
|
||||
ChatCommand::new(
|
||||
"version",
|
||||
"",
|
||||
"/version : Prints server version",
|
||||
false,
|
||||
handle_version,
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
@ -1412,3 +1419,20 @@ fn handle_sudo(
|
||||
server.notify_client(client, ServerMsg::private(String::from(action.help_string)));
|
||||
}
|
||||
}
|
||||
|
||||
fn handle_version(
|
||||
server: &mut Server,
|
||||
client: EcsEntity,
|
||||
_target: EcsEntity,
|
||||
_args: String,
|
||||
_action: &ChatCommand,
|
||||
) {
|
||||
server.notify_client(
|
||||
client,
|
||||
ServerMsg::private(format!(
|
||||
"Server is running {}[{}]",
|
||||
common::util::GIT_HASH.to_string(),
|
||||
common::util::GIT_DATE.to_string(),
|
||||
)),
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user