Jump to content
  • 0

[Help] Command \n


Question

Posted

Hello everybody!

 

I would like to place an order.

 

A mod block java command  \ n in chat l2

because it caused a huge headache ...

 

Thank you!

With you Conto

7 answers to this question

Recommended Posts

  • 0
Posted

Easy fix..

 

Just go to clientpackets/Say2.java

 

and add this

 

	if (_text.contains("\n"))
		_text.replace("\n", "");

 

it will replace all \n with space (blank)

  • 0
Posted

you are in wrong place...error about client here and i thyn is in systemmsg.dat

 

He is in the right section, btw, do as Versus told u but replace this with a letter, i think it will works, they will just spam a letter, and they will get chatbanned from the system, i'm i right?

 

This will maybe work...

	if (_text.contains("\n"))
		_text.replace("\n", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");

 

The character will get chatbanned because it is something like he write too much letters to a message, or no?

  • 0
Posted

Versus the problem continues.

 

View Code:

 

	// player chat banned?
	if (activeChar.isChatBanned())
	{
		activeChar.checkBanChat(true);
		return;
	}


	+     // Block \n
	+      if (_text.contains("\n"))
	+	_text.replace("\n", "N");


	// player jailed?
	if (activeChar.isInJail() && Config.JAIL_DISABLE_CHAT)
	{
		if (_type == TELL || _type == SHOUT || _type == TRADE || _type == HERO_VOICE)
		{
			activeChar.sendMessage("You Have been Chat Banned");
			return;
		}
	}

  • 0
Posted

What happens if you type in game \n? After you compiled your project with the code i gave you.

 

Btw to fix all your problems.. simply do that

 

	if (_text.contains("\n"))
		return;

 

Now when the player writes \n and hits enter nothing will happen, he won't write anything at the chat :)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock