sorta handle malformed players

This commit is contained in:
Robin Appelman 2023-03-21 20:24:11 +01:00
commit 2d8ede8027
2 changed files with 42 additions and 24 deletions

View file

@ -99,7 +99,7 @@ pub fn split_player_subject(input: &str) -> Result<(&str, &str, &str, &str)> {
(parts.next(), parts.next(), parts.next(), parts.next())
{
if steam_id.is_empty() || user_id.is_empty() || team.is_empty() {
(name, "0", "", "")
return Err(Error::Malformed);
} else {
(
name,