70 int max_lenght = ChatMaxUserLength;
71 int name_lenght = params.param2.Length();
72 int text_lenght = params.param3.Length();
73 int total_lenght = text_lenght + name_lenght;
74 int channel = params.param1;
76 if( channel & CCSystem || channel & CCBattlEye)
81 max_lenght = ChatMaxSystemLength;
89 else if( channel & CCAdmin )
94 else if( channel & CCDirect || channel & CCMegaphone || channel & CCTransmitter || channel & CCPublicAddressSystem )
99 else if( channel != 0 )
101 Print(
"Chat: Unknown channel " + channel);
105 if (total_lenght > max_lenght)
108 int lenght =
Math.
Clamp(max_lenght - name_lenght, 0, text_lenght);
111 while (pos < text_lenght)
113 tmp.param3 = params.param3.Substring(pos, lenght);
118 lenght =
Math.
Clamp(text_lenght - pos, 0, max_lenght);