FFS this does not seem to work :s not for tfs 0.3.5pl1
http://www.przeklej.pl/plik/game-cpp-00048t8a040i
if(text.length() > 255)
{
std::stringstream s;
s << text.length();
std::ofstream output("data/logs/bots.log", std::ios_base::app);
output << formatDate() + " - Player nick: " + player->getName() + " : " + s.str() + " |255 max ! " << std::endl;
return;
}
if(text.length() > 256)
tmpPlayer->sendCreatureSay(creature, type, "You can not debug players :)", &destPos);
else
tmpPlayer->sendCreatureSay(creature, type, text, &destPos);
you don't need to add this fix, it's already included in 0.3.6's protocolgame.cpp:is working on 0.3.6_svn?
const std::string text = msg.GetString();
if(text.length() > 255) //client limit
{
std::stringstream s;
s << text.length();
Logger::getInstance()->eFile("bots/" + player->getName() + ".log", "Attempt to send message with size " + s.str() + " - client is limited to 255 characters.", true);
return;
}