Forum

> > CS2D > Scripts > Break line bug
Forums overviewCS2D overview Scripts overviewLog in to reply

English Break line bug

3 replies
To the start Previous 1 Next To the start

old Break line bug

Quattro
GAME BANNED Off Offline

Quote
I made a custom msg function, so when someone sends message, server sends msg2 to other players.

Some guy figured out a way to fake a break line and he could write a paragraph with one message

Can someone share what character did he write to do that?

I made a server that saves players names in a text file and I noticed that some lines are broken so my guess is that they had that character in their name so my function detected it as "\n" and made line breaks there, which is not good

old Re: Break line bug

Mora
User Off Offline

Quote
Well never heard that you can imitate it :C even i got interested in it.

Check names by finding "\n" and try to use
string.gsub(text,"\n","")
then censor them or save string.gsub name.

old Re: Break line bug

Hajt
User Off Offline

Quote
brah use this function to display user input on chat

1
2
3
4
5
6
7
function escapeString(text)
	while text:sub(-2) == '@C' do
		text = text:sub(1, -3)
	end
	text = string.gsub(text, "[\166]", " ")
	return text
end

without this i can send such things
https://imgur.com/twoHDSo.jpg
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview