mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Mark InvalidAlias Message as to be done
This commit is contained in:
parent
bf82f5925d
commit
ed0d842e57
1
.gitignore
vendored
1
.gitignore
vendored
@ -31,6 +31,5 @@
|
||||
# Veloren
|
||||
*.rar
|
||||
*.log
|
||||
*.ron
|
||||
run.sh
|
||||
screenshots
|
||||
|
@ -7,7 +7,7 @@ pub enum Error {
|
||||
ServerTimeout,
|
||||
ServerShutdown,
|
||||
TooManyPlayers,
|
||||
InvalidAlias,
|
||||
//TODO: InvalidAlias,
|
||||
Other(String),
|
||||
}
|
||||
|
||||
|
@ -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),
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -49,5 +49,5 @@ pub enum ServerMsg {
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub enum ServerError {
|
||||
TooManyPlayers,
|
||||
InvalidAlias,
|
||||
//TODO: InvalidAlias,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user