Fix some broken shite (builtin commands args)
This commit is contained in:
parent
35fa7cc6c9
commit
bc13af5972
@ -18,6 +18,13 @@ pub fn handle_command(
|
|||||||
let vectorized_command = command_string.trim().split(" ").collect::<Vec<&str>>();
|
let vectorized_command = command_string.trim().split(" ").collect::<Vec<&str>>();
|
||||||
match vectorized_command[0] {
|
match vectorized_command[0] {
|
||||||
"kick" => {
|
"kick" => {
|
||||||
|
if (vectorized_command.len()) == 1 {
|
||||||
|
let _ = &mut stream.write(&send_chat_message(
|
||||||
|
SpecialPlayers::SelfPlayer as u8,
|
||||||
|
"".to_string(),
|
||||||
|
"&cUsage: kick [player]".to_string(),
|
||||||
|
));
|
||||||
|
} else {
|
||||||
let mut players = players_arc_clone
|
let mut players = players_arc_clone
|
||||||
.lock()
|
.lock()
|
||||||
.map_err(|e| AppError::MutexPoisoned(e.to_string()))?;
|
.map_err(|e| AppError::MutexPoisoned(e.to_string()))?;
|
||||||
@ -33,7 +40,15 @@ pub fn handle_command(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
"tp" => {
|
"tp" => {
|
||||||
|
if (vectorized_command.len()) == 1 {
|
||||||
|
let _ = &mut stream.write(&send_chat_message(
|
||||||
|
SpecialPlayers::SelfPlayer as u8,
|
||||||
|
"".to_string(),
|
||||||
|
"&cUsage: kick [player]".to_string(),
|
||||||
|
));
|
||||||
|
} else {
|
||||||
let players = players_arc_clone
|
let players = players_arc_clone
|
||||||
.lock()
|
.lock()
|
||||||
.map_err(|e| AppError::MutexPoisoned(e.to_string()))?;
|
.map_err(|e| AppError::MutexPoisoned(e.to_string()))?;
|
||||||
@ -53,6 +68,7 @@ pub fn handle_command(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
_ => {
|
_ => {
|
||||||
let mut vectorized_command_object: Vec<String> = Vec::new();
|
let mut vectorized_command_object: Vec<String> = Vec::new();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user