Chat ban command fixed and upgraded.
This commit is contained in:
@ -2560,7 +2560,7 @@ public final class Config
|
||||
// Load ChatModeration config file (if exists)
|
||||
final PropertiesParser ChatModeration = new PropertiesParser(CUSTOM_CHAT_MODERATION_CONFIG_FILE);
|
||||
|
||||
CHAT_ADMIN = ChatModeration.getBoolean("ChatAdmin", false);
|
||||
CHAT_ADMIN = ChatModeration.getBoolean("ChatAdmin", true);
|
||||
|
||||
// Load CommunityBoard config file (if exists)
|
||||
final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE);
|
||||
|
@ -30,6 +30,9 @@ import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.handler.IPunishmentHandler;
|
||||
import com.l2jmobius.gameserver.handler.PunishmentHandler;
|
||||
import com.l2jmobius.gameserver.instancemanager.PunishmentManager;
|
||||
import com.l2jmobius.gameserver.model.L2World;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.skills.AbnormalVisualEffect;
|
||||
|
||||
/**
|
||||
* @author UnAfraid
|
||||
@ -234,6 +237,15 @@ public class PunishmentTask implements Runnable
|
||||
}
|
||||
}
|
||||
|
||||
if (_type.equals(PunishmentType.CHAT_BAN) && _affect.equals(PunishmentAffect.CHARACTER))
|
||||
{
|
||||
final L2PcInstance player = L2World.getInstance().getPlayer(Integer.valueOf(_key));
|
||||
if (player != null)
|
||||
{
|
||||
player.getEffectList().stopAbnormalVisualEffect(AbnormalVisualEffect.NO_CHAT);
|
||||
}
|
||||
}
|
||||
|
||||
final IPunishmentHandler handler = PunishmentHandler.getInstance().getHandler(_type);
|
||||
if (handler != null)
|
||||
{
|
||||
|
@ -268,6 +268,12 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
}
|
||||
}
|
||||
|
||||
// Chat banned icon.
|
||||
if (activeChar.isChatBanned())
|
||||
{
|
||||
activeChar.getEffectList().startAbnormalVisualEffect(AbnormalVisualEffect.NO_CHAT);
|
||||
}
|
||||
|
||||
// Set dead status if applies
|
||||
if (activeChar.getCurrentHp() < 0.5)
|
||||
{
|
||||
|
Reference in New Issue
Block a user