author | alfadur |
Mon, 18 Jun 2018 09:22:53 -0400 | |
changeset 13421 | cdf69667593b |
parent 12142 | 193dfdcb0620 |
child 13428 | 87a6cad20c90 |
permissions | -rw-r--r-- |
12131 | 1 |
use mio; |
2 |
||
12142
193dfdcb0620
- Use logging facilities instead of plain println!
unc0rr
parents:
12131
diff
changeset
|
3 |
pub const PROTOCOL_VERSION : u32 = 3; |
12131 | 4 |
pub const SERVER: mio::Token = mio::Token(1000000000 + 0); |
13421 | 5 |
|
6 |
pub fn is_name_illegal(name: &str ) -> bool{ |
|
7 |
name.len() > 40 || |
|
8 |
name.trim().is_empty() || |
|
9 |
name.chars().any(|c| |
|
10 |
"$()*+?[]^{|}\x7F".contains(c) || |
|
11 |
'\x00' <= c && c <= '\x1F') |
|
12 |
} |