Mark InvalidAlias Message as to be done

This commit is contained in:
Songtronix 2019-07-05 14:16:08 +02:00
parent bf82f5925d
commit ed0d842e57
5 changed files with 3 additions and 5 deletions

1
.gitignore vendored
View File

@ -31,6 +31,5 @@
# Veloren
*.rar
*.log
*.ron
run.sh
screenshots

View File

@ -7,7 +7,7 @@ pub enum Error {
ServerTimeout,
ServerShutdown,
TooManyPlayers,
InvalidAlias,
//TODO: InvalidAlias,
Other(String),
}

View File

@ -366,7 +366,7 @@ impl Client {
match msg {
ServerMsg::Error(e) => match e {
ServerError::TooManyPlayers => return Err(Error::ServerWentMad),
ServerError::InvalidAlias => return Err(Error::InvalidAlias),
//TODO: ServerError::InvalidAlias => return Err(Error::InvalidAlias),
},
ServerMsg::Shutdown => return Err(Error::ServerShutdown),
ServerMsg::InitialSync { .. } => return Err(Error::ServerWentMad),

View File

@ -19,7 +19,6 @@ impl Player {
pub fn is_valid(&self) -> bool {
self.alias.chars().all(|c| c.is_alphanumeric() || c == '_')
&& self.alias.len() <= MAX_ALIAS_LEN
// TODO: Check view distance here based on server config too
}
}

View File

@ -49,5 +49,5 @@ pub enum ServerMsg {
#[derive(Debug, Clone, Serialize, Deserialize)]
pub enum ServerError {
TooManyPlayers,
InvalidAlias,
//TODO: InvalidAlias,
}