summaryrefslogtreecommitdiff
path: root/src/chatlogger.cpp
diff options
context:
space:
mode:
authorReid <reidyaro@gmail.com>2012-01-25 22:05:36 +0100
committerReid <reidyaro@gmail.com>2012-01-25 22:05:36 +0100
commit8b612abb42853a22c1a9545e2c9280d154646543 (patch)
treef466167087c2b2de4b8aa9e6d1d1986f72f84147 /src/chatlogger.cpp
parenta913dd41df61760de6ece552f941e002251ff54c (diff)
parentd340b5a27a8f3b05d1764da9c114f5f59bd0cd46 (diff)
downloadplus-8b612abb42853a22c1a9545e2c9280d154646543.tar.gz
plus-8b612abb42853a22c1a9545e2c9280d154646543.tar.bz2
plus-8b612abb42853a22c1a9545e2c9280d154646543.tar.xz
plus-8b612abb42853a22c1a9545e2c9280d154646543.zip
Merge branch 'master' of gitorious.org:manaplus/manaplus
Diffstat (limited to 'src/chatlogger.cpp')
-rw-r--r--src/chatlogger.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/chatlogger.cpp b/src/chatlogger.cpp
index 0299a6fe3..ad86de8e9 100644
--- a/src/chatlogger.cpp
+++ b/src/chatlogger.cpp
@@ -2,7 +2,7 @@
* The ManaPlus Client
* Copyright (C) 2009-2010 The Mana Developers
* Copyright (C) 2009-2010 Andrei Karas
- * Copyright (C) 2011 The ManaPlus Developers
+ * Copyright (C) 2011-2012 The ManaPlus Developers
*
* This file is part of The ManaPlus Client.
*
@@ -142,11 +142,13 @@ 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] != ']')
+ && name[f] != '(' && name[f] != '[' && name[f] != ']'
+ && name[f] != '#')
{
name[f] = '_';
}