From 7635fd3938bade7ff8323c36dfd9e7b001d10f1f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 14 Jan 2012 18:38:17 +0300 Subject: Fix name checking in chat logger. --- src/chatlogger.cpp | 5 +++-- 1 file 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] != ']') -- cgit v1.2.3-70-g09d2