I used the most recent IL gameserver in http://l2jserver.com/svn to test. Credit should mainly go to HanWik-X, he realized that he needed to use \\\\n so that Java would replace it properly.
\java\net\sf\l2j\gameserver\clientpackets\Say2.java
Original code:
protected void readImpl()
{
_text = readS();
try
{
_type = readD();
}
catch (BufferUnderflowException e)
{
_type = CHAT_NAMES.length;
}
_target = (_type == TELL) ? readS() : null;
}
Edited Code:
protected void readImpl()
{
_text = readS();
_text = _text.replaceAll("\\\\n","");
try
{
_type = readD();
}
catch (BufferUnderflowException e)
{
_type = CHAT_NAMES.length;
}
_target = (_type == TELL) ? readS() : null;
}
This should remove any occurances of \n entirely, but you could also just filter it to something else:
_text = _text.replaceAll("\\\\n","-_-");
Attached my Say2.java but you may be using a different version :x