LunaChat v2.5.2 : Refined source for issue #54 and #55

このコミットが含まれているのは:
ucchyocean committed 2013-11-13 04:01:59 +09:00
1 親 2b42f1929c
コミット 33b2195065
2ファイル変更
+9 -5

検索条件に一致するファイルはありません

+7 -3
ファイルの表示
@@ -319,11 +319,15 @@ public class Channel implements ConfigurationSerializable {
}
/**
* dynmapからこのチャットに発言する
* ほかの連携先などから、このチャットに発言する
* @param player プレイヤー名
* @param source 連携元を判別する文字列
* @param message メッセージ
*/
public void chatFromDynmap(String player, String message) {
public void chatFromOtherSource(String player, String source, String message) {
// 表示名
String name = player + "@" + source;
// NGワード発言のマスク
String maskedMessage = message;
@@ -336,7 +340,7 @@ public class Channel implements ConfigurationSerializable {
// キーワード置き換え
String msgFormat = replaceKeywords(format, null);
msgFormat = msgFormat.replace("%username", player);
msgFormat = msgFormat.replace("%username", name);
msgFormat = msgFormat.replace("%prefix", "");
msgFormat = msgFormat.replace("%suffix", "");
+2 -2
ファイルの表示
@@ -93,8 +93,8 @@ public class DynmapBridge implements Listener {
if ( channel != null ) {
// チャンネルへ送信
String name = event.getName() + "@web";
channel.chatFromDynmap(name, event.getMessage());
channel.chatFromOtherSource(
event.getName(), event.getSource(), event.getMessage());
event.setProcessed();
}
}