diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-01-14 18:38:17 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-01-14 18:38:17 +0300 |
commit | 7635fd3938bade7ff8323c36dfd9e7b001d10f1f (patch) | |
tree | 17579c98f709f821ddaa9a7c7c7010c189d0952a /src | |
parent | 7958f42f290417f484993af4663c905bfbe9e4f3 (diff) | |
download | manaverse-7635fd3938bade7ff8323c36dfd9e7b001d10f1f.tar.gz manaverse-7635fd3938bade7ff8323c36dfd9e7b001d10f1f.tar.bz2 manaverse-7635fd3938bade7ff8323c36dfd9e7b001d10f1f.tar.xz manaverse-7635fd3938bade7ff8323c36dfd9e7b001d10f1f.zip |
Fix name checking in chat logger.
Diffstat (limited to 'src')
-rw-r--r-- | src/chatlogger.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/chatlogger.cpp b/src/chatlogger.cpp index 8017575c4..40fc5aa57 100644 --- a/src/chatlogger.cpp +++ b/src/chatlogger.cpp @@ -142,8 +142,9 @@ std::string ChatLogger::secureName(std::string &name) const { for (unsigned int f = 0; f < name.length(); f ++) { - if (name[f] < '0' && name[f] > '9' && name[f] < 'a' && name[f] > 'z' - && name[f] < 'A' && name[f] > 'Z' + if ((name[f] < '0' || name[f] > '9') + && (name[f] < 'a' || name[f] > 'z') + && (name[f] < 'A' || name[f] > 'Z') && name[f] != '-' && name[f] != '+' && name[f] != '=' && name[f] != '.' && name[f] != ',' && name[f] != ')' && name[f] != '(' && name[f] != '[' && name[f] != ']') |