2
0
Эх сурвалжийг харах

Missing part for new banchat config in clientpackets. This option allow to use voice command while chat banned.

Denser 14 жил өмнө
parent
commit
2589736f2a

+ 7 - 4
L2J_Server_BETA/java/com/l2jserver/gameserver/network/clientpackets/Say2.java

@@ -153,12 +153,15 @@ public final class Say2 extends L2GameClientPacket
 			return;
 		}
 		
-		if (activeChar.isChatBanned())
+		if (activeChar.isChatBanned() && !_text.startsWith("."))
 		{
-			if (_type == ALL || _type == SHOUT || _type == TRADE || _type == HERO_VOICE)
+			for (int chatId : Config.BAN_CHAT_CHANNELS)
 			{
-				activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CHATTING_IS_CURRENTLY_PROHIBITED));
-				return;
+				if (_type == chatId)
+				{
+					activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CHATTING_IS_CURRENTLY_PROHIBITED));
+					return;
+				}
 			}
 		}