LunaChat v2.6.8 : Fixed issue #106
このコミットが含まれているのは:
1 親
2b382ec31c
コミット
7a1e36ce87
4ファイル変更
+64
-34
検索条件に一致するファイルはありません
@@ -8,6 +8,7 @@ package com.github.ucchyocean.lc;
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
|
||||
@@ -83,6 +84,9 @@ public class LunaChatConfig {
|
||||
* ban = マスクしてチャンネルからBANする */
|
||||
private NGWordAction ngwordAction;
|
||||
|
||||
/** NGワードの設定、正規表現マッチング用にコンパイルされたもの */
|
||||
private List<Pattern> ngwordCompiled;
|
||||
|
||||
/** 通常チャット(非チャンネルチャット)の装飾を、LunaChatから行うかどうか */
|
||||
private boolean enableNormalChatMessageFormat;
|
||||
|
||||
@@ -192,6 +196,11 @@ public class LunaChatConfig {
|
||||
ngword = config.getStringList("ngword");
|
||||
ngwordAction = NGWordAction.fromID(config.getString("ngwordAction", "mask"));
|
||||
|
||||
ngwordCompiled = new ArrayList<Pattern>();
|
||||
for ( String word : ngword ) {
|
||||
ngwordCompiled.add(Pattern.compile(word));
|
||||
}
|
||||
|
||||
enableNormalChatMessageFormat =
|
||||
config.getBoolean("enableNormalChatMessageFormat", true);
|
||||
normalChatMessageFormat =
|
||||
@@ -337,11 +346,32 @@ public class LunaChatConfig {
|
||||
/**
|
||||
* NGワード
|
||||
* @return ngwordを返す
|
||||
* @deprecated 全て正規表現に変更するため、getNgwordCompiledを使用してください
|
||||
*/
|
||||
@Deprecated
|
||||
public List<String> getNgword() {
|
||||
return ngword;
|
||||
}
|
||||
|
||||
/**
|
||||
* NGワードを発言した人に対して実行するアクション<br/>
|
||||
* mask = マスクするのみ<br/>
|
||||
* kick = マスクしてチャンネルからキックする<br/>
|
||||
* ban = マスクしてチャンネルからBANする
|
||||
* @return ngwordActionを返す
|
||||
*/
|
||||
public NGWordAction getNgwordAction() {
|
||||
return ngwordAction;
|
||||
}
|
||||
|
||||
/**
|
||||
* コンパイルされたNGワード
|
||||
* @return ngwordCompiledを返す
|
||||
*/
|
||||
public List<Pattern> getNgwordCompiled() {
|
||||
return ngwordCompiled;
|
||||
}
|
||||
|
||||
/**
|
||||
* ブロードキャストチャンネルの発言内容を、dynmapに送信するかどうか。<br/>
|
||||
* dynmapがロードされていない場合は、この設定は無視される(false扱い)。
|
||||
@@ -367,17 +397,6 @@ public class LunaChatConfig {
|
||||
return dynmapChannel;
|
||||
}
|
||||
|
||||
/**
|
||||
* NGワードを発言した人に対して実行するアクション<br/>
|
||||
* mask = マスクするのみ<br/>
|
||||
* kick = マスクしてチャンネルからキックする<br/>
|
||||
* ban = マスクしてチャンネルからBANする
|
||||
* @return ngwordActionを返す
|
||||
*/
|
||||
public NGWordAction getNgwordAction() {
|
||||
return ngwordAction;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通常チャット(非チャンネルチャット)の装飾を、LunaChatから行うかどうか
|
||||
* @return enableNormalChatMessageFormatを返す
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする