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
|
# Veloren
|
||||||
*.rar
|
*.rar
|
||||||
*.log
|
*.log
|
||||||
*.ron
|
|
||||||
run.sh
|
run.sh
|
||||||
screenshots
|
screenshots
|
||||||
|
@ -7,7 +7,7 @@ pub enum Error {
|
|||||||
ServerTimeout,
|
ServerTimeout,
|
||||||
ServerShutdown,
|
ServerShutdown,
|
||||||
TooManyPlayers,
|
TooManyPlayers,
|
||||||
InvalidAlias,
|
//TODO: InvalidAlias,
|
||||||
Other(String),
|
Other(String),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -366,7 +366,7 @@ impl Client {
|
|||||||
match msg {
|
match msg {
|
||||||
ServerMsg::Error(e) => match e {
|
ServerMsg::Error(e) => match e {
|
||||||
ServerError::TooManyPlayers => return Err(Error::ServerWentMad),
|
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::Shutdown => return Err(Error::ServerShutdown),
|
||||||
ServerMsg::InitialSync { .. } => return Err(Error::ServerWentMad),
|
ServerMsg::InitialSync { .. } => return Err(Error::ServerWentMad),
|
||||||
|
@ -19,7 +19,6 @@ impl Player {
|
|||||||
pub fn is_valid(&self) -> bool {
|
pub fn is_valid(&self) -> bool {
|
||||||
self.alias.chars().all(|c| c.is_alphanumeric() || c == '_')
|
self.alias.chars().all(|c| c.is_alphanumeric() || c == '_')
|
||||||
&& self.alias.len() <= MAX_ALIAS_LEN
|
&& 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)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
pub enum ServerError {
|
pub enum ServerError {
|
||||||
TooManyPlayers,
|
TooManyPlayers,
|
||||||
InvalidAlias,
|
//TODO: InvalidAlias,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user