summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-08-09 23:09:34 +0300
committerAndrei Karas <akaras@inbox.ru>2015-08-09 23:09:34 +0300
commit486fc09eb779c9265299a937486d98f9ab036219 (patch)
treec977bd0d1a6c69857368283b22509946ac3334c8
parent73e3236e9e3971efa3c5079df079c25bbefa2ba7 (diff)
downloadmanaverse-486fc09eb779c9265299a937486d98f9ab036219.tar.gz
manaverse-486fc09eb779c9265299a937486d98f9ab036219.tar.bz2
manaverse-486fc09eb779c9265299a937486d98f9ab036219.tar.xz
manaverse-486fc09eb779c9265299a937486d98f9ab036219.zip
Add more checks for broken nicks.
-rw-r--r--src/gui/windows/chatwindow.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index 1b1fb7f88..0ddc6e30f 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -1557,7 +1557,12 @@ bool ChatWindow::resortChatLog(std::string line,
if (tmpNick.find("#") != std::string::npos ||
tmpNick.find(":") != std::string::npos ||
tmpNick.find("%") != std::string::npos ||
- tmpNick.find("@") != std::string::npos)
+ tmpNick.find("@") != std::string::npos ||
+ tmpNick.size() < 4 ||
+ tmpNick[0] == '@' ||
+ tmpNick[0] == '/' ||
+ tmpNick[0] == '!'
+ )
{
replaceAll(tmpNick, "#", "_");
replaceAll(tmpNick, "%", "_");