With this addon anybody can write a system message, or write with anther person's or GM's name.
You can download the addon from here: http://becko.hu/colorme.zip
We need to updgrade the mangos fake message preveting code!
src/shared/Util.cpp:
void stripLineInvisibleChars(std::string &str)
{
static std::string invChars = " \\t\\7";
size_t wpos = 0;
bool space = false;
for(size_t pos = 0; pos < str.size(); ++pos)
{
if(invChars.find(str[pos])!=std::string::npos)
{
if(!space)
{
str[wpos++] = ' ';
space = true;
}
}
else
{
if(wpos!=pos)
str[wpos++] = str[pos];
else
++wpos;
space = false;
}
}
if(wpos < str.size())
str.erase(wpos,str.size());
}
it's a hackfix, to keep the message in 1 line so you can detect the user fast:
diff --git a/src/shared/Util.cpp b/src/shared/Util.cpp
index fa18ad9..0b70aac 100644
--- a/src/shared/Util.cpp
+++ b/src/shared/Util.cpp
@@ -73,7 +73,7 @@ Tokens StrSplit(const std::string &src, const std::string &sep)
void stripLineInvisibleChars(std::string &str)
{
- static std::string invChars = " \\t\\7";
+ static std::string invChars = " \\t\\7\\n";
size_t wpos = 0;