Chat Problem

10/06/2012 14:56 magnon#1
Big Eggs :rtfm:

Player make that for win Lastman :rtfm:Dailypk:rtfm:
it's With Whisper can send to him this and get Disconnect
[Only registered and activated users can see links. Click Here To Register...]

sry for my bad english:o
10/06/2012 23:07 I don't have a username#2
Idon't get it. Your client crashes and then what?
10/06/2012 23:50 shadowman123#3
well ill tell u what he meant by that .. he says that when sm1 send very long message to the target the target become freezed and the client crashes ..
10/06/2012 23:50 a6eg#4
لديك الكثير من المشاكل مع الرجل لعبتك
u r have alots of problem with yur game man!!
10/07/2012 00:01 shadowman123#5
what a Freaking Fkin ( Signature / Post And Acc ) and more over this u suck at translating arabic
10/07/2012 00:06 I don't have a username#6
Quote:
Originally Posted by shadowman123 View Post
well ill tell u what he meant by that .. he says that when sm1 send very long message to the target the target become freezed and the client crashes ..
All have to is check for the length of the message. I've usually limited it to 255 characters when I ran a server.

Another solution could be to split the message up, but with the above then send it as more than one message at a time ^^
10/07/2012 00:16 shadowman123#7
its super easy if (ChatPacket.Sentmessage.length > 255) { return; } Lol
10/07/2012 03:19 I don't have a username#8
Quote:
Originally Posted by shadowman123 View Post
its super easy if (ChatPacket.Sentmessage.length > 255) { return; } Lol
Or you could crop it.
Code:
public static string CropMessage(string msg, int maxlen)
{
	if (msg.Length <= maxlen)
		return msg;

	return msg.Substring(maxlen) + "...";
}
#Edit jsut saw a mistake. If you used the old one, please replace it with the new.