mirror of
https://github.com/cnaude/PurpleIRC-spigot.git
synced 2024-06-30 08:24:56 +02:00
Now we can send messages to mcMMO chat channels. (party and admin)
This commit is contained in:
parent
e7bc3f5f85
commit
c8c61949a6
|
@ -19,8 +19,6 @@ package com.cnaude.purpleirc;
|
||||||
import com.cnaude.purpleirc.Events.IRCCommandEvent;
|
import com.cnaude.purpleirc.Events.IRCCommandEvent;
|
||||||
import java.util.Queue;
|
import java.util.Queue;
|
||||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||||
import net.minecraft.server.v1_8_R2.RemoteControlCommandListener;
|
|
||||||
import static org.bukkit.Bukkit.getServer;
|
|
||||||
import org.bukkit.command.CommandException;
|
import org.bukkit.command.CommandException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -50,12 +50,12 @@ public class GamePlayerChatListener implements Listener {
|
||||||
public void onAsyncPlayerChat(AsyncPlayerChatEvent event) {
|
public void onAsyncPlayerChat(AsyncPlayerChatEvent event) {
|
||||||
String message = event.getMessage();
|
String message = event.getMessage();
|
||||||
plugin.logDebug("ChatFormat [" + event.isCancelled() + "]: " + event.getFormat());
|
plugin.logDebug("ChatFormat [" + event.isCancelled() + "]: " + event.getFormat());
|
||||||
if (message.startsWith("[[townytag]]")) {
|
if (message.startsWith(PurpleIRC.TOWNYTAG)) {
|
||||||
event.setMessage(message.replace("[[townytag]]", ""));
|
event.setMessage(message.replace(PurpleIRC.TOWNYTAG, ""));
|
||||||
plugin.logDebug("Ignoring due to townytag");
|
plugin.logDebug("Ignoring due to TownyChat tag");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
event.setMessage(message.replace("[[townytag]]", ""));
|
event.setMessage(message.replace(PurpleIRC.TOWNYTAG, ""));
|
||||||
if (event.isCancelled() && !plugin.isPluginEnabled("FactionChat") && !plugin.ignoreChatCancel) {
|
if (event.isCancelled() && !plugin.isPluginEnabled("FactionChat") && !plugin.ignoreChatCancel) {
|
||||||
plugin.logDebug("Ignore chat message due to event cancellation: " + event.getMessage());
|
plugin.logDebug("Ignore chat message due to event cancellation: " + event.getMessage());
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -39,7 +39,15 @@ public class McMMOChatListener implements Listener {
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onMcMMOChatEvent(McMMOChatEvent event) {
|
public void onMcMMOChatEvent(McMMOChatEvent event) {
|
||||||
event.setMessage(event.getMessage().replace("[[townytag]]", ""));
|
String message = event.getMessage();
|
||||||
|
message = message.replace(PurpleIRC.TOWNYTAG, "");
|
||||||
|
if (message.contains(PurpleIRC.PURPLETAG)) {
|
||||||
|
message = message.replace(PurpleIRC.PURPLETAG, "");
|
||||||
|
event.setMessage(message);
|
||||||
|
plugin.logDebug("[onMcMMOChatEvent]: PurpleIRC tag detected. Not sending back IRC." );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
String sender = event.getSender();
|
String sender = event.getSender();
|
||||||
Player player = plugin.getServer().getPlayer(sender);
|
Player player = plugin.getServer().getPlayer(sender);
|
||||||
plugin.logDebug("McMMOChatEvent caught: " + sender);
|
plugin.logDebug("McMMOChatEvent caught: " + sender);
|
||||||
|
@ -54,14 +62,22 @@ public class McMMOChatListener implements Listener {
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onMcMMOAdminChatEvent(McMMOAdminChatEvent event) {
|
public void onMcMMOAdminChatEvent(McMMOAdminChatEvent event) {
|
||||||
event.setMessage(event.getMessage().replace("[[townytag]]", ""));
|
String message = event.getMessage();
|
||||||
|
message = message.replace(PurpleIRC.TOWNYTAG, "");
|
||||||
|
if (message.contains(PurpleIRC.PURPLETAG)) {
|
||||||
|
message = message.replace(PurpleIRC.PURPLETAG, "");
|
||||||
|
event.setMessage(message);
|
||||||
|
plugin.logDebug("[onMcMMOAdminChatEvent]: PurpleIRC tag detected. Not sending back IRC." );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
String sender = event.getSender();
|
String sender = event.getSender();
|
||||||
Player player = plugin.getServer().getPlayer(sender);
|
Player player = plugin.getServer().getPlayer(sender);
|
||||||
plugin.logDebug("McMMOAdminChatEvent caught: " + sender);
|
plugin.logDebug("McMMOAdminChatEvent caught: " + sender);
|
||||||
if (player != null && !sender.isEmpty()) {
|
if (player != null && !sender.isEmpty()) {
|
||||||
if (player.hasPermission("irc.message.gamechat")) {
|
if (player.hasPermission("irc.message.gamechat")) {
|
||||||
for (PurpleBot ircBot : plugin.ircBots.values()) {
|
for (PurpleBot ircBot : plugin.ircBots.values()) {
|
||||||
ircBot.mcMMOAdminChat(player, event.getMessage());
|
ircBot.mcMMOAdminChat(player, message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -69,7 +85,15 @@ public class McMMOChatListener implements Listener {
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onMcMMOPartyChatEvent(McMMOPartyChatEvent event) {
|
public void onMcMMOPartyChatEvent(McMMOPartyChatEvent event) {
|
||||||
event.setMessage(event.getMessage().replace("[[townytag]]", ""));
|
String message = event.getMessage();
|
||||||
|
message = message.replace(PurpleIRC.TOWNYTAG, "");
|
||||||
|
if (message.contains(PurpleIRC.PURPLETAG)) {
|
||||||
|
message = message.replace(PurpleIRC.PURPLETAG, "");
|
||||||
|
event.setMessage(message);
|
||||||
|
plugin.logDebug("[onMcMMOPartyChatEvent]: PurpleIRC tag detected. Not sending back IRC." );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
String sender = event.getSender();
|
String sender = event.getSender();
|
||||||
Player player = plugin.getServer().getPlayer(sender);
|
Player player = plugin.getServer().getPlayer(sender);
|
||||||
String party = event.getParty();
|
String party = event.getParty();
|
||||||
|
@ -80,6 +104,6 @@ public class McMMOChatListener implements Listener {
|
||||||
ircBot.mcMMOPartyChat(player, party, event.getMessage());
|
ircBot.mcMMOPartyChat(player, party, event.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,6 +52,6 @@ public class TownyChatListener implements Listener {
|
||||||
plugin.tcHook.sendToIrc(ircBot, player, townyChannel, event.getMessage());
|
plugin.tcHook.sendToIrc(ircBot, player, townyChannel, event.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
event.getAsyncPlayerChatEvent().setMessage("[[townytag]]" + event.getMessage());
|
event.getAsyncPlayerChatEvent().setMessage(PurpleIRC.TOWNYTAG + event.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
62
src/main/java/com/cnaude/purpleirc/Hooks/McMMOChatHook.java
Normal file
62
src/main/java/com/cnaude/purpleirc/Hooks/McMMOChatHook.java
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2014 cnaude
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package com.cnaude.purpleirc.Hooks;
|
||||||
|
|
||||||
|
import com.cnaude.purpleirc.PurpleIRC;
|
||||||
|
import com.gmail.nossr50.api.ChatAPI;
|
||||||
|
import com.gmail.nossr50.api.PartyAPI;
|
||||||
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author cnaude
|
||||||
|
*/
|
||||||
|
public class McMMOChatHook {
|
||||||
|
|
||||||
|
private final PurpleIRC plugin;
|
||||||
|
private final Plugin mcMMOPlugin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param plugin
|
||||||
|
*/
|
||||||
|
public McMMOChatHook(PurpleIRC plugin) {
|
||||||
|
this.plugin = plugin;
|
||||||
|
this.mcMMOPlugin = plugin.getServer().getPluginManager().getPlugin("mcMMO");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void sendAdminMessage(String sender, String message) {
|
||||||
|
if (mcMMOPlugin != null) {
|
||||||
|
plugin.logDebug("[mcMMOChatHook:sendAdminMessage]: " + message);
|
||||||
|
ChatAPI.sendAdminChat(mcMMOPlugin, sender, PurpleIRC.PURPLETAG + message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void sendPartyMessage(String sender, String party, String message) {
|
||||||
|
if (mcMMOPlugin != null) {
|
||||||
|
for (Party p : PartyAPI.getParties()) {
|
||||||
|
if (p.getName().equalsIgnoreCase(party)) {
|
||||||
|
plugin.logDebug("[mcMMOChatHook:sendPartyMessage]: " + party + " : " + message);
|
||||||
|
ChatAPI.sendPartyChat(mcMMOPlugin, sender, party, PurpleIRC.PURPLETAG + message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -989,10 +989,10 @@ public final class PurpleBot {
|
||||||
|| worldList.get(channelName).contains(worldName)) {
|
|| worldList.get(channelName).contains(worldName)) {
|
||||||
validWorld = true;
|
validWorld = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
plugin.logDebug("[isPlayerInValidWorld] [p: " + player.getName() + "] [w: " + worldName + "] [b: " + validWorld + "]");
|
plugin.logDebug("[isPlayerInValidWorld] [p: " + player.getName() + "] [w: " + worldName + "] [b: " + validWorld + "]");
|
||||||
return validWorld;
|
return validWorld;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called from normal game chat listener
|
* Called from normal game chat listener
|
||||||
|
@ -1010,45 +1010,45 @@ public final class PurpleBot {
|
||||||
}
|
}
|
||||||
for (String channelName : botChannels) {
|
for (String channelName : botChannels) {
|
||||||
if (isPlayerInValidWorld(player, channelName)) {
|
if (isPlayerInValidWorld(player, channelName)) {
|
||||||
if (plugin.fcHook != null) {
|
if (plugin.fcHook != null) {
|
||||||
String playerChatMode;
|
String playerChatMode;
|
||||||
String playerFactionName;
|
String playerFactionName;
|
||||||
try {
|
try {
|
||||||
playerChatMode = plugin.fcHook.getChatMode(player);
|
playerChatMode = plugin.fcHook.getChatMode(player);
|
||||||
} catch (IllegalAccessError ex) {
|
} catch (IllegalAccessError ex) {
|
||||||
plugin.logDebug("FC Error: " + ex.getMessage());
|
plugin.logDebug("FC Error: " + ex.getMessage());
|
||||||
playerChatMode = "public";
|
playerChatMode = "public";
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
playerFactionName = plugin.fcHook.getFactionName(player);
|
playerFactionName = plugin.fcHook.getFactionName(player);
|
||||||
} catch (IllegalAccessError ex) {
|
} catch (IllegalAccessError ex) {
|
||||||
plugin.logDebug("FC Error: " + ex.getMessage());
|
plugin.logDebug("FC Error: " + ex.getMessage());
|
||||||
playerFactionName = "unknown";
|
playerFactionName = "unknown";
|
||||||
}
|
}
|
||||||
|
|
||||||
String chatName = "faction-" + playerChatMode.toLowerCase() + "-chat";
|
String chatName = "faction-" + playerChatMode.toLowerCase() + "-chat";
|
||||||
plugin.logDebug("Faction [Player: " + player.getName()
|
plugin.logDebug("Faction [Player: " + player.getName()
|
||||||
+ "] [Tag: " + playerFactionName + "] [Mode: "
|
+ "] [Tag: " + playerFactionName + "] [Mode: "
|
||||||
+ playerChatMode + "]");
|
+ playerChatMode + "]");
|
||||||
if (enabledMessages.get(channelName)
|
if (enabledMessages.get(channelName)
|
||||||
.contains(chatName)) {
|
.contains(chatName)) {
|
||||||
asyncIRCMessage(channelName, plugin.tokenizer
|
asyncIRCMessage(channelName, plugin.tokenizer
|
||||||
.chatFactionTokenizer(player, botNick, message,
|
.chatFactionTokenizer(player, botNick, message,
|
||||||
playerFactionName, playerChatMode));
|
playerFactionName, playerChatMode));
|
||||||
|
} else {
|
||||||
|
plugin.logDebug("Player " + player.getName() + " is in chat mode \""
|
||||||
|
+ playerChatMode + "\" but \"" + chatName + "\" is disabled.");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
plugin.logDebug("Player " + player.getName() + " is in chat mode \""
|
plugin.logDebug("No Factions");
|
||||||
+ playerChatMode + "\" but \"" + chatName + "\" is disabled.");
|
}
|
||||||
|
if (isMessageEnabled(channelName, TemplateName.GAME_CHAT)) {
|
||||||
|
asyncIRCMessage(channelName, plugin.tokenizer
|
||||||
|
.gameChatToIRCTokenizer(player, plugin.getMsgTemplate(botNick, TemplateName.GAME_CHAT), message));
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
plugin.logDebug("No Factions");
|
|
||||||
}
|
|
||||||
if (isMessageEnabled(channelName, TemplateName.GAME_CHAT)) {
|
|
||||||
asyncIRCMessage(channelName, plugin.tokenizer
|
|
||||||
.gameChatToIRCTokenizer(player, plugin.getMsgTemplate(botNick, TemplateName.GAME_CHAT), message));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void sendFloodWarning(Player player) {
|
private void sendFloodWarning(Player player) {
|
||||||
String message = plugin.getMsgTemplate(
|
String message = plugin.getMsgTemplate(
|
||||||
|
@ -1077,22 +1077,22 @@ public final class PurpleBot {
|
||||||
}
|
}
|
||||||
for (String channelName : botChannels) {
|
for (String channelName : botChannels) {
|
||||||
if (isPlayerInValidWorld(player, channelName)) {
|
if (isPlayerInValidWorld(player, channelName)) {
|
||||||
String hChannel = chatter.getActiveChannel().getName();
|
String hChannel = chatter.getActiveChannel().getName();
|
||||||
String hNick = chatter.getActiveChannel().getNick();
|
String hNick = chatter.getActiveChannel().getNick();
|
||||||
String hColor = chatColor.toString();
|
String hColor = chatColor.toString();
|
||||||
plugin.logDebug("HC Channel: " + hChannel);
|
plugin.logDebug("HC Channel: " + hChannel);
|
||||||
if (isMessageEnabled(channelName, "hero-" + hChannel + "-chat")
|
if (isMessageEnabled(channelName, "hero-" + hChannel + "-chat")
|
||||||
|| isMessageEnabled(channelName, TemplateName.HERO_CHAT)) {
|
|| isMessageEnabled(channelName, TemplateName.HERO_CHAT)) {
|
||||||
asyncIRCMessage(channelName, plugin.tokenizer
|
asyncIRCMessage(channelName, plugin.tokenizer
|
||||||
.chatHeroTokenizer(player, message, hColor, hChannel,
|
.chatHeroTokenizer(player, message, hColor, hChannel,
|
||||||
hNick, plugin.getHeroChatChannelTemplate(botNick, hChannel)));
|
hNick, plugin.getHeroChatChannelTemplate(botNick, hChannel)));
|
||||||
} else {
|
} else {
|
||||||
plugin.logDebug("Player " + player.getName() + " is in \""
|
plugin.logDebug("Player " + player.getName() + " is in \""
|
||||||
+ hChannel + "\" but hero-" + hChannel + "-chat is disabled.");
|
+ hChannel + "\" but hero-" + hChannel + "-chat is disabled.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public void mcMMOAdminChat(Player player, String message) {
|
public void mcMMOAdminChat(Player player, String message) {
|
||||||
if (!this.isConnected()) {
|
if (!this.isConnected()) {
|
||||||
|
@ -1104,18 +1104,18 @@ public final class PurpleBot {
|
||||||
}
|
}
|
||||||
for (String channelName : botChannels) {
|
for (String channelName : botChannels) {
|
||||||
if (isPlayerInValidWorld(player, channelName)) {
|
if (isPlayerInValidWorld(player, channelName)) {
|
||||||
if (isMessageEnabled(channelName, TemplateName.MCMMO_ADMIN_CHAT)) {
|
if (isMessageEnabled(channelName, TemplateName.MCMMO_ADMIN_CHAT)) {
|
||||||
plugin.logDebug("Sending message because " + TemplateName.MCMMO_ADMIN_CHAT + " is enabled.");
|
plugin.logDebug("Sending message because " + TemplateName.MCMMO_ADMIN_CHAT + " is enabled.");
|
||||||
asyncIRCMessage(channelName, plugin.tokenizer
|
asyncIRCMessage(channelName, plugin.tokenizer
|
||||||
.mcMMOChatToIRCTokenizer(player, plugin.getMsgTemplate(
|
.mcMMOChatToIRCTokenizer(player, plugin.getMsgTemplate(
|
||||||
botNick, TemplateName.MCMMO_ADMIN_CHAT), message));
|
botNick, TemplateName.MCMMO_ADMIN_CHAT), message));
|
||||||
} else {
|
} else {
|
||||||
plugin.logDebug("Player " + player.getName()
|
plugin.logDebug("Player " + player.getName()
|
||||||
+ " is in mcMMO AdminChat but " + TemplateName.MCMMO_ADMIN_CHAT + " is disabled.");
|
+ " is in mcMMO AdminChat but " + TemplateName.MCMMO_ADMIN_CHAT + " is disabled.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public void mcMMOPartyChat(Player player, String partyName, String message) {
|
public void mcMMOPartyChat(Player player, String partyName, String message) {
|
||||||
if (!this.isConnected()) {
|
if (!this.isConnected()) {
|
||||||
|
@ -1127,18 +1127,18 @@ public final class PurpleBot {
|
||||||
}
|
}
|
||||||
for (String channelName : botChannels) {
|
for (String channelName : botChannels) {
|
||||||
if (isPlayerInValidWorld(player, channelName)) {
|
if (isPlayerInValidWorld(player, channelName)) {
|
||||||
if (isMessageEnabled(channelName, TemplateName.MCMMO_PARTY_CHAT)) {
|
if (isMessageEnabled(channelName, TemplateName.MCMMO_PARTY_CHAT)) {
|
||||||
plugin.logDebug("Sending message because " + TemplateName.MCMMO_PARTY_CHAT + " is enabled.");
|
plugin.logDebug("Sending message because " + TemplateName.MCMMO_PARTY_CHAT + " is enabled.");
|
||||||
asyncIRCMessage(channelName, plugin.tokenizer
|
asyncIRCMessage(channelName, plugin.tokenizer
|
||||||
.mcMMOPartyChatToIRCTokenizer(player, plugin.getMsgTemplate(
|
.mcMMOPartyChatToIRCTokenizer(player, plugin.getMsgTemplate(
|
||||||
botNick, TemplateName.MCMMO_PARTY_CHAT), message, partyName));
|
botNick, TemplateName.MCMMO_PARTY_CHAT), message, partyName));
|
||||||
} else {
|
} else {
|
||||||
plugin.logDebug("Player " + player.getName()
|
plugin.logDebug("Player " + player.getName()
|
||||||
+ " is in mcMMO PartyChat but " + TemplateName.MCMMO_PARTY_CHAT + " is disabled.");
|
+ " is in mcMMO PartyChat but " + TemplateName.MCMMO_PARTY_CHAT + " is disabled.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public void mcMMOChat(Player player, String message) {
|
public void mcMMOChat(Player player, String message) {
|
||||||
if (!this.isConnected()) {
|
if (!this.isConnected()) {
|
||||||
|
@ -1150,18 +1150,18 @@ public final class PurpleBot {
|
||||||
}
|
}
|
||||||
for (String channelName : botChannels) {
|
for (String channelName : botChannels) {
|
||||||
if (isPlayerInValidWorld(player, channelName)) {
|
if (isPlayerInValidWorld(player, channelName)) {
|
||||||
if (isMessageEnabled(channelName, TemplateName.MCMMO_CHAT)) {
|
if (isMessageEnabled(channelName, TemplateName.MCMMO_CHAT)) {
|
||||||
plugin.logDebug("Sending message because " + TemplateName.MCMMO_CHAT + " is enabled.");
|
plugin.logDebug("Sending message because " + TemplateName.MCMMO_CHAT + " is enabled.");
|
||||||
asyncIRCMessage(channelName, plugin.tokenizer
|
asyncIRCMessage(channelName, plugin.tokenizer
|
||||||
.mcMMOChatToIRCTokenizer(player, plugin.getMsgTemplate(
|
.mcMMOChatToIRCTokenizer(player, plugin.getMsgTemplate(
|
||||||
botNick, TemplateName.MCMMO_CHAT), message));
|
botNick, TemplateName.MCMMO_CHAT), message));
|
||||||
} else {
|
} else {
|
||||||
plugin.logDebug("Player " + player.getName()
|
plugin.logDebug("Player " + player.getName()
|
||||||
+ " is in mcMMO Chat but " + TemplateName.MCMMO_CHAT + " is disabled.");
|
+ " is in mcMMO Chat but " + TemplateName.MCMMO_CHAT + " is disabled.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public void heroAction(Chatter chatter, ChatColor chatColor, String message) {
|
public void heroAction(Chatter chatter, ChatColor chatColor, String message) {
|
||||||
if (!this.isConnected()) {
|
if (!this.isConnected()) {
|
||||||
|
@ -1472,11 +1472,11 @@ public final class PurpleBot {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (String channelName : botChannels) {
|
for (String channelName : botChannels) {
|
||||||
if (hideJoinWhenVanished.get(channelName)) {
|
if (hideJoinWhenVanished.get(channelName)) {
|
||||||
if (plugin.vanishHook.isVanished(player)) {
|
if (plugin.vanishHook.isVanished(player)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (isMessageEnabled(channelName, TemplateName.GAME_JOIN)
|
if (isMessageEnabled(channelName, TemplateName.GAME_JOIN)
|
||||||
&& isPlayerInValidWorld(player, channelName)) {
|
&& isPlayerInValidWorld(player, channelName)) {
|
||||||
asyncIRCMessage(channelName, plugin.tokenizer
|
asyncIRCMessage(channelName, plugin.tokenizer
|
||||||
|
@ -1496,11 +1496,11 @@ public final class PurpleBot {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (String channelName : botChannels) {
|
for (String channelName : botChannels) {
|
||||||
if (hideQuitWhenVanished.get(channelName)) {
|
if (hideQuitWhenVanished.get(channelName)) {
|
||||||
if (plugin.vanishHook.isVanished(player)) {
|
if (plugin.vanishHook.isVanished(player)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (isMessageEnabled(channelName, TemplateName.GAME_QUIT)
|
if (isMessageEnabled(channelName, TemplateName.GAME_QUIT)
|
||||||
&& isPlayerInValidWorld(player, channelName)) {
|
&& isPlayerInValidWorld(player, channelName)) {
|
||||||
asyncIRCMessage(channelName, plugin.tokenizer
|
asyncIRCMessage(channelName, plugin.tokenizer
|
||||||
|
@ -1644,13 +1644,13 @@ public final class PurpleBot {
|
||||||
for (String channelName : botChannels) {
|
for (String channelName : botChannels) {
|
||||||
if (isMessageEnabled(channelName, templateName)) {
|
if (isMessageEnabled(channelName, templateName)) {
|
||||||
if (isPlayerInValidWorld(player, channelName)) {
|
if (isPlayerInValidWorld(player, channelName)) {
|
||||||
asyncIRCMessage(channelName, plugin.tokenizer
|
asyncIRCMessage(channelName, plugin.tokenizer
|
||||||
.gameChatToIRCTokenizer(player, plugin.getMsgTemplate(
|
.gameChatToIRCTokenizer(player, plugin.getMsgTemplate(
|
||||||
botNick, templateName), message));
|
botNick, templateName), message));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -2299,7 +2299,7 @@ public final class PurpleBot {
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Broadcast chat messages from IRC
|
// Broadcast chat messages from IRC to the game
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param user
|
* @param user
|
||||||
|
@ -2366,6 +2366,42 @@ public final class PurpleBot {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Send messages to mcMMO if enabled
|
||||||
|
*/
|
||||||
|
if (plugin.mcMMOChatHook != null) {
|
||||||
|
/*
|
||||||
|
Send to mcMMMO admin channel if enabled
|
||||||
|
*/
|
||||||
|
if (isMessageEnabled(myChannel, TemplateName.IRC_MCMMO_ADMIN_CHAT)) {
|
||||||
|
String tmpl = plugin.getMsgTemplate(botNick, TemplateName.IRC_MCMMO_ADMIN_CHAT);
|
||||||
|
plugin.logDebug("broadcastChat [mcMMO:admin]: " + message);
|
||||||
|
String rawMcMMOMessage = filterMessage(
|
||||||
|
plugin.tokenizer.ircChatToGameTokenizer(this, user, channel, tmpl, message), myChannel);
|
||||||
|
plugin.mcMMOChatHook.sendAdminMessage(user.getNick(), rawMcMMOMessage);
|
||||||
|
messageSent = true;
|
||||||
|
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
Send to specific mcMMMO party channel if enabled
|
||||||
|
*/
|
||||||
|
for (String em : getEnabledMessages(channel.getName())) {
|
||||||
|
if (em.startsWith("irc-mcmmo-party-") && em.endsWith("-chat")) {
|
||||||
|
if (isMessageEnabled(myChannel, em)) {
|
||||||
|
String party = em.replace("irc-mcmmo-party-", "").replace("-chat", "");
|
||||||
|
if (!party.isEmpty()) {
|
||||||
|
String tmpl = plugin.getMsgTemplate(botNick, TemplateName.IRC_MCMMO_PARTY_CHAT);
|
||||||
|
plugin.logDebug("broadcastChat [mcMMO:party]: " + party + " : " + message);
|
||||||
|
String rawMcMMOMessage = filterMessage(
|
||||||
|
plugin.tokenizer.ircChatToGameTokenizer(this, user, channel, tmpl, message), myChannel);
|
||||||
|
plugin.mcMMOChatHook.sendPartyMessage(user.getNick(), party, rawMcMMOMessage);
|
||||||
|
messageSent = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Send messages to players if enabled
|
Send messages to players if enabled
|
||||||
*/
|
*/
|
||||||
|
@ -2767,6 +2803,18 @@ public final class PurpleBot {
|
||||||
return isEnabled;
|
return isEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param channelName
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Collection<String> getEnabledMessages(String channelName) {
|
||||||
|
if (enabledMessages.containsKey(channelName)) {
|
||||||
|
return enabledMessages.get(channelName);
|
||||||
|
}
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param channel
|
* @param channel
|
||||||
|
|
|
@ -44,6 +44,7 @@ import com.cnaude.purpleirc.Hooks.CommandBookHook;
|
||||||
import com.cnaude.purpleirc.Hooks.DynmapHook;
|
import com.cnaude.purpleirc.Hooks.DynmapHook;
|
||||||
import com.cnaude.purpleirc.Hooks.FactionChatHook;
|
import com.cnaude.purpleirc.Hooks.FactionChatHook;
|
||||||
import com.cnaude.purpleirc.Hooks.JobsHook;
|
import com.cnaude.purpleirc.Hooks.JobsHook;
|
||||||
|
import com.cnaude.purpleirc.Hooks.McMMOChatHook;
|
||||||
import com.cnaude.purpleirc.Hooks.ReportRTSHook;
|
import com.cnaude.purpleirc.Hooks.ReportRTSHook;
|
||||||
import com.cnaude.purpleirc.Hooks.ShortifyHook;
|
import com.cnaude.purpleirc.Hooks.ShortifyHook;
|
||||||
import com.cnaude.purpleirc.Hooks.SuperVanishHook;
|
import com.cnaude.purpleirc.Hooks.SuperVanishHook;
|
||||||
|
@ -174,6 +175,7 @@ public class PurpleIRC extends JavaPlugin {
|
||||||
public ShortifyHook shortifyHook;
|
public ShortifyHook shortifyHook;
|
||||||
public ReportRTSHook reportRTSHook;
|
public ReportRTSHook reportRTSHook;
|
||||||
public CommandBookHook commandBookHook;
|
public CommandBookHook commandBookHook;
|
||||||
|
public McMMOChatHook mcMMOChatHook;
|
||||||
public NetPackets netPackets;
|
public NetPackets netPackets;
|
||||||
public CommandHandlers commandHandlers;
|
public CommandHandlers commandHandlers;
|
||||||
public PurpleTabCompleter ircTabCompleter;
|
public PurpleTabCompleter ircTabCompleter;
|
||||||
|
@ -212,6 +214,8 @@ public class PurpleIRC extends JavaPlugin {
|
||||||
final String PL_TITANCHAT = "TitanChat";
|
final String PL_TITANCHAT = "TitanChat";
|
||||||
final String PL_HEROCHAT = "Herochat";
|
final String PL_HEROCHAT = "Herochat";
|
||||||
List<String> hookList = new ArrayList<>();
|
List<String> hookList = new ArrayList<>();
|
||||||
|
public static final String PURPLETAG = "UHVycGxlSVJDCg==";
|
||||||
|
public static final String TOWNYTAG = "VG93bnlDaGF0Cg==";
|
||||||
|
|
||||||
public PurpleIRC() {
|
public PurpleIRC() {
|
||||||
this.MAINCONFIG = "MAIN-CONFIG";
|
this.MAINCONFIG = "MAIN-CONFIG";
|
||||||
|
@ -1424,6 +1428,7 @@ public class PurpleIRC extends JavaPlugin {
|
||||||
if (isPluginEnabled(PL_MCMMO)) {
|
if (isPluginEnabled(PL_MCMMO)) {
|
||||||
hookList.add(hookFormat(PL_MCMMO, true));
|
hookList.add(hookFormat(PL_MCMMO, true));
|
||||||
getServer().getPluginManager().registerEvents(new McMMOChatListener(this), this);
|
getServer().getPluginManager().registerEvents(new McMMOChatListener(this), this);
|
||||||
|
mcMMOChatHook = new McMMOChatHook(this);
|
||||||
} else {
|
} else {
|
||||||
hookList.add(hookFormat(PL_MCMMO, false));
|
hookList.add(hookFormat(PL_MCMMO, false));
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,6 +47,9 @@ public class TemplateName {
|
||||||
public final static String MCMMO_ADMIN_CHAT = "mcmmo-admin-chat";
|
public final static String MCMMO_ADMIN_CHAT = "mcmmo-admin-chat";
|
||||||
public final static String MCMMO_PARTY_CHAT = "mcmmo-party-chat";
|
public final static String MCMMO_PARTY_CHAT = "mcmmo-party-chat";
|
||||||
public final static String MCMMO_CHAT = "mcmmo-chat";
|
public final static String MCMMO_CHAT = "mcmmo-chat";
|
||||||
|
|
||||||
|
public final static String IRC_MCMMO_ADMIN_CHAT = "irc-mcmmo-admin-chat";
|
||||||
|
public final static String IRC_MCMMO_PARTY_CHAT = "irc-mcmmo-party-chat";
|
||||||
|
|
||||||
public final static String HERO_ACTION = "hero-action";
|
public final static String HERO_ACTION = "hero-action";
|
||||||
public final static String HERO_CHAT = "hero-chat";
|
public final static String HERO_CHAT = "hero-chat";
|
||||||
|
|
|
@ -164,8 +164,11 @@ channels:
|
||||||
- irc-action-dynmap-web-chat
|
- irc-action-dynmap-web-chat
|
||||||
# mcMMO messages sent to IRC
|
# mcMMO messages sent to IRC
|
||||||
- mcmmo-admin-chat
|
- mcmmo-admin-chat
|
||||||
- mcmmo-party-chat
|
- mcmmo-party-chat
|
||||||
- mcmmo-chat
|
- mcmmo-chat
|
||||||
|
# mcMMO messages sent from IRC. Replace [PARTY] with destination mcMMO party
|
||||||
|
- irc-mcmmo-admin-chat
|
||||||
|
- irc-mcmmo-party-[PARTY]-chat
|
||||||
# FactionChat messages sent to IRC
|
# FactionChat messages sent to IRC
|
||||||
- faction-public-chat
|
- faction-public-chat
|
||||||
- faction-ally-chat
|
- faction-ally-chat
|
||||||
|
|
|
@ -14,8 +14,8 @@ enable-ident-server: false
|
||||||
channel-check-interval: 100
|
channel-check-interval: 100
|
||||||
# Chat messages support standard Bukkit color codes using '&#'. See http://minecraft.gamepedia.com/Formatting_codes
|
# Chat messages support standard Bukkit color codes using '&#'. See http://minecraft.gamepedia.com/Formatting_codes
|
||||||
# The following macro tokens are also supported.
|
# The following macro tokens are also supported.
|
||||||
# %WORLD%
|
# %WORLD%
|
||||||
# %NAME%
|
# %NAME%
|
||||||
# %HOST% - Host of player or IRC user
|
# %HOST% - Host of player or IRC user
|
||||||
# %SERVER% - Server of IRC user
|
# %SERVER% - Server of IRC user
|
||||||
# %AWAY% - IRC user away message
|
# %AWAY% - IRC user away message
|
||||||
|
@ -26,7 +26,7 @@ channel-check-interval: 100
|
||||||
# %CHANNELPREFIX% - Custom prefix per channel (see prefix option in SampleBot.yml)
|
# %CHANNELPREFIX% - Custom prefix per channel (see prefix option in SampleBot.yml)
|
||||||
# %DISPLAYNAME% - Player's custom name
|
# %DISPLAYNAME% - Player's custom name
|
||||||
# %PLAYERIP% - IP address of a player
|
# %PLAYERIP% - IP address of a player
|
||||||
# %CHANNEL%
|
# %CHANNEL%
|
||||||
# %MESSAGE%
|
# %MESSAGE%
|
||||||
# %KICKER% - IRC kicker name
|
# %KICKER% - IRC kicker name
|
||||||
# %TOPIC%
|
# %TOPIC%
|
||||||
|
@ -76,20 +76,20 @@ channel-check-interval: 100
|
||||||
# prism-custom:
|
# prism-custom:
|
||||||
# %ACTION%
|
# %ACTION%
|
||||||
# %MESSAGE%
|
# %MESSAGE%
|
||||||
# %PLUGIN%
|
# %PLUGIN%
|
||||||
message-format:
|
message-format:
|
||||||
# Message templates for game to IRC messages
|
# Message templates for game to IRC messages
|
||||||
console-chat: '[&dServer&r] %MESSAGE%'
|
console-chat: '[&dServer&r] %MESSAGE%'
|
||||||
game-achievement: '[&2%WORLD%&r] %NAME% has just earned the achievement [%MESSAGE%]'
|
game-achievement: '[&2%WORLD%&r] %NAME% has just earned the achievement [%MESSAGE%]'
|
||||||
game-mode: '[&2%WORLD%&r] %NAME% has changed game mode: [%MESSAGE%]'
|
game-mode: '[&2%WORLD%&r] %NAME% has changed game mode: [%MESSAGE%]'
|
||||||
game-action: '[&2%WORLD%&r]***%NAME% %MESSAGE%'
|
game-action: '[&2%WORLD%&r]***%NAME% %MESSAGE%'
|
||||||
game-pchat: '[&2%WORLD%] <%NAME%> %MESSAGE%'
|
game-pchat: '[&2%WORLD%] <%NAME%> %MESSAGE%'
|
||||||
# death-messages - http://dev.bukkit.org/bukkit-plugins/death-messages
|
# death-messages - http://dev.bukkit.org/bukkit-plugins/death-messages
|
||||||
death-messages: '[&2%WORLD%&r]%MESSAGE%'
|
death-messages: '[&2%WORLD%&r]%MESSAGE%'
|
||||||
# Notification to player when sending a private message to an IRC user
|
# Notification to player when sending a private message to an IRC user
|
||||||
game-pchat-response: ' &6-> &7%TARGET%: %MESSAGE%'
|
game-pchat-response: ' &6-> &7%TARGET%: %MESSAGE%'
|
||||||
game-chat: '[&2%WORLD%&r] <%NAME%> %MESSAGE%'
|
game-chat: '[&2%WORLD%&r] <%NAME%> %MESSAGE%'
|
||||||
game-death: '[&2%WORLD%&r] %MESSAGE%'
|
game-death: '[&2%WORLD%&r] %MESSAGE%'
|
||||||
game-kick: '[&2%WORLD%&r] %MESSAGE%: %REASON%'
|
game-kick: '[&2%WORLD%&r] %MESSAGE%: %REASON%'
|
||||||
game-join: '[&2%WORLD%&r] %NAME% joined the game.'
|
game-join: '[&2%WORLD%&r] %NAME% joined the game.'
|
||||||
game-quit: '[&2%WORLD%&r] %NAME% left the game.'
|
game-quit: '[&2%WORLD%&r] %NAME% left the game.'
|
||||||
|
@ -97,28 +97,28 @@ message-format:
|
||||||
fake-quit: '[&2%WORLD%&r] %NAME% left the game.'
|
fake-quit: '[&2%WORLD%&r] %NAME% left the game.'
|
||||||
game-command: '[&2%WORLD%&r] Command detected by %NAME%: %COMMAND% %PARAMS%'
|
game-command: '[&2%WORLD%&r] Command detected by %NAME%: %COMMAND% %PARAMS%'
|
||||||
# Message template for "/irc send" to IRC message
|
# Message template for "/irc send" to IRC message
|
||||||
game-send: '[&2%WORLD%&r]<%NAME%> %MESSAGE%'
|
game-send: '[&2%WORLD%&r]<%NAME%> %MESSAGE%'
|
||||||
# Essentials messages
|
# Essentials messages
|
||||||
ess-player-afk: '[&2%WORLD%&r] %NAME% is now AFK'
|
ess-player-afk: '[&2%WORLD%&r] %NAME% is now AFK'
|
||||||
ess-player-not-afk: '[&2%WORLD%&r] %NAME% is no longer AFK'
|
ess-player-not-afk: '[&2%WORLD%&r] %NAME% is no longer AFK'
|
||||||
ess-helpop: '&4[HelpOp] %DISPLAYNAME%&r: %MESSAGE%'
|
ess-helpop: '&4[HelpOp] %DISPLAYNAME%&r: %MESSAGE%'
|
||||||
irc-ess-helpop: '&4[HelpOp] %DISPLAYNAME%&r: %MESSAGE%'
|
irc-ess-helpop: '&4[HelpOp] %DISPLAYNAME%&r: %MESSAGE%'
|
||||||
# Message templates for IRC to game messages
|
# Message templates for IRC to game messages
|
||||||
irc-action: '[&4IRC&r] ***%NAME% %MESSAGE%'
|
irc-action: '[&4IRC&r] ***%NAME% %MESSAGE%'
|
||||||
irc-chat: '[&4IRC&r]<%NAME%> %MESSAGE%'
|
irc-chat: '[&4IRC&r]<%NAME%> %MESSAGE%'
|
||||||
# Response message when using @chat or @ochat
|
# Response message when using @chat or @ochat
|
||||||
irc-chat-response: ' &6-> &7Minecraft: %MESSAGE%'
|
irc-chat-response: ' &6-> &7Minecraft: %MESSAGE%'
|
||||||
irc-pchat: '&dPrivate message: [&4IRC&r]<%NAME%> %MESSAGE%'
|
irc-pchat: '&dPrivate message: [&4IRC&r]<%NAME%> %MESSAGE%'
|
||||||
# Notification to user when sending a private message to a player
|
# Notification to user when sending a private message to a player
|
||||||
irc-pchat-response: ' &6-> &7%TARGET%: %MESSAGE%'
|
irc-pchat-response: ' &6-> &7%TARGET%: %MESSAGE%'
|
||||||
# Notification to user when sending a message to a specific hero channel
|
# Notification to user when sending a message to a specific hero channel
|
||||||
irc-hchat-response: ' &6-> &7%TARGET%: %MESSAGE%'
|
irc-hchat-response: ' &6-> &7%TARGET%: %MESSAGE%'
|
||||||
irc-join: '[&4IRC&r] %NAME% has joined %CHANNEL%.'
|
irc-join: '[&4IRC&r] %NAME% has joined %CHANNEL%.'
|
||||||
irc-kick: '[&4IRC&r] %NAME% was kicked from %CHANNEL% by %KICKER%. (Reason- %REASON%)'
|
irc-kick: '[&4IRC&r] %NAME% was kicked from %CHANNEL% by %KICKER%. (Reason- %REASON%)'
|
||||||
irc-part: '[&4IRC&r] %NAME% has left %CHANNEL%.'
|
irc-part: '[&4IRC&r] %NAME% has left %CHANNEL%.'
|
||||||
irc-quit: '[&4IRC&r] %NAME% has left %CHANNEL%. (Reason: %REASON%)'
|
irc-quit: '[&4IRC&r] %NAME% has left %CHANNEL%. (Reason: %REASON%)'
|
||||||
irc-topic: '[&4IRC&r] Topic changed by %NAME%: %TOPIC%.'
|
irc-topic: '[&4IRC&r] Topic changed by %NAME%: %TOPIC%.'
|
||||||
irc-nickchange: '[&4IRC&r] %OLDNICK% is now known as %NEWNICK%.'
|
irc-nickchange: '[&4IRC&r] %OLDNICK% is now known as %NEWNICK%.'
|
||||||
irc-mode: '[&4IRC&r] %NAME% %MODE% on %CHANNEL%'
|
irc-mode: '[&4IRC&r] %NAME% %MODE% on %CHANNEL%'
|
||||||
irc-console-chat: '&f[&5IRC&f]&r<%NAME%> %MESSAGE%'
|
irc-console-chat: '&f[&5IRC&f]&r<%NAME%> %MESSAGE%'
|
||||||
irc-notice: '[&4IRC&r] [notice(%CHANNEL%)] %NOTICE% '
|
irc-notice: '[&4IRC&r] [notice(%CHANNEL%)] %NOTICE% '
|
||||||
|
@ -129,26 +129,29 @@ message-format:
|
||||||
# AdminPrivateChat message from IRC to game
|
# AdminPrivateChat message from IRC to game
|
||||||
irc-a-chat: '[AdminChat] [&4IRC&r] %MESSAGE%'
|
irc-a-chat: '[AdminChat] [&4IRC&r] %MESSAGE%'
|
||||||
# Message template for Clevernotch bot to IRC messages
|
# Message template for Clevernotch bot to IRC messages
|
||||||
clever-send: '[&4BOT]<%NAME%> %MESSAGE%'
|
clever-send: '[&4BOT]<%NAME%> %MESSAGE%'
|
||||||
# Message templates for mcMMO to IRC messages
|
# Message templates for mcMMO to IRC messages
|
||||||
mcmmo-admin-chat: '[admin:%WORLD%]<%NAME%> %MESSAGE%'
|
mcmmo-admin-chat: '[admin:%WORLD%]<%NAME%> %MESSAGE%'
|
||||||
mcmmo-party-chat: '[party:%PARTY%]<%NAME%> %MESSAGE%'
|
mcmmo-party-chat: '[party:%PARTY%]<%NAME%> %MESSAGE%'
|
||||||
mcmmo-chat: '[mcMMO]<%NAME%> %MESSAGE%'
|
mcmmo-chat: '[mcMMO]<%NAME%> %MESSAGE%'
|
||||||
|
# Message templates for IRC to mcMMO
|
||||||
|
irc-mcmmo-admin-chat: '[&4IRC&r]<%NAME%> %MESSAGE%'
|
||||||
|
irc-mcmmo-party-chat: '[&4IRC&r]<%NAME%> %MESSAGE%'
|
||||||
# Message templates for FactionChat to IRC messages
|
# Message templates for FactionChat to IRC messages
|
||||||
faction-public-chat: '[%FACTIONMODE%&r][%FACTIONTAG%]<%NAME%> %MESSAGE%'
|
faction-public-chat: '[%FACTIONMODE%&r][%FACTIONTAG%]<%NAME%> %MESSAGE%'
|
||||||
faction-ally-chat: '[%FACTIONMODE%&r][%FACTIONTAG%]<%NAME%> %MESSAGE%'
|
faction-ally-chat: '[%FACTIONMODE%&r][%FACTIONTAG%]<%NAME%> %MESSAGE%'
|
||||||
faction-enemy-chat: '[%FACTIONMODE%&r][%FACTIONTAG%]<%NAME%> %MESSAGE%'
|
faction-enemy-chat: '[%FACTIONMODE%&r][%FACTIONTAG%]<%NAME%> %MESSAGE%'
|
||||||
# Message template for Herochat to IRC messages
|
# Message template for Herochat to IRC messages
|
||||||
hero-chat: '[%CHANNEL%]<%NAME%> %MESSAGE%'
|
hero-chat: '[%CHANNEL%]<%NAME%> %MESSAGE%'
|
||||||
hero-action: '[&2%CHANNEL%&r]***%NAME% %MESSAGE%'
|
hero-action: '[&2%CHANNEL%&r]***%NAME% %MESSAGE%'
|
||||||
# Message templates for IRC to Herochat messages
|
# Message templates for IRC to Herochat messages
|
||||||
irc-hero-action: '[&3IRC&r] ***%NAME% %MESSAGE%'
|
irc-hero-action: '[&3IRC&r] ***%NAME% %MESSAGE%'
|
||||||
irc-hero-chat: '[&3IRC&r]<%NAME%> %MESSAGE%'
|
irc-hero-chat: '[&3IRC&r]<%NAME%> %MESSAGE%'
|
||||||
irc-hero-join: '[&3IRC&r] %NAME% has joined %CHANNEL%.'
|
irc-hero-join: '[&3IRC&r] %NAME% has joined %CHANNEL%.'
|
||||||
irc-hero-kick: '[&3IRC&r] %NAME% was kicked from %CHANNEL% by %KICKER%. (Reason- %REASON%)'
|
irc-hero-kick: '[&3IRC&r] %NAME% was kicked from %CHANNEL% by %KICKER%. (Reason- %REASON%)'
|
||||||
irc-hero-part: '[&3IRC&r] %NAME% has left %CHANNEL%.'
|
irc-hero-part: '[&3IRC&r] %NAME% has left %CHANNEL%.'
|
||||||
irc-hero-quit: '[&3IRC&r] %NAME% has left %CHANNEL%.'
|
irc-hero-quit: '[&3IRC&r] %NAME% has left %CHANNEL%.'
|
||||||
irc-hero-topic: '[&3IRC&r] Topic changed by %NAME%: %TOPIC%.'
|
irc-hero-topic: '[&3IRC&r] Topic changed by %NAME%: %TOPIC%.'
|
||||||
# Message template for TitanChat to IRC messages
|
# Message template for TitanChat to IRC messages
|
||||||
titan-chat: '[%CHANNEL%]<%NAME%> %MESSAGE%'
|
titan-chat: '[%CHANNEL%]<%NAME%> %MESSAGE%'
|
||||||
# Message templates for IRC to TitanChat messages
|
# Message templates for IRC to TitanChat messages
|
||||||
|
@ -213,7 +216,7 @@ message-format:
|
||||||
default-group-suffix: ''
|
default-group-suffix: ''
|
||||||
default-group-prefix: ''
|
default-group-prefix: ''
|
||||||
default-player-world: 'world'
|
default-player-world: 'world'
|
||||||
default-player-group: ''
|
default-player-group: ''
|
||||||
# Flood control
|
# Flood control
|
||||||
game-flood-warning: '&3Message not sent to IRC due to spamming. &rCooldown: %COOLDOWN%s'
|
game-flood-warning: '&3Message not sent to IRC due to spamming. &rCooldown: %COOLDOWN%s'
|
||||||
irc-flood-warning: '&3Message not sent to game due to spamming. &rCooldown: %COOLDOWN%s'
|
irc-flood-warning: '&3Message not sent to game due to spamming. &rCooldown: %COOLDOWN%s'
|
||||||
|
@ -266,16 +269,16 @@ irc-color-map:
|
||||||
UNDERLINE: UNDERLINE
|
UNDERLINE: UNDERLINE
|
||||||
YELLOW: YELLOW
|
YELLOW: YELLOW
|
||||||
WHITE: WHITE
|
WHITE: WHITE
|
||||||
RESET: NORMAL
|
RESET: NORMAL
|
||||||
# IRC to game color map: IRC Color Code => Game Color Code
|
# IRC to game color map: IRC Color Code => Game Color Code
|
||||||
game-color-map:
|
game-color-map:
|
||||||
BLACK: BLACK
|
BLACK: BLACK
|
||||||
BLUE: BLUE
|
BLUE: BLUE
|
||||||
BOLD: BOLD
|
BOLD: BOLD
|
||||||
BROWN: GRAY
|
BROWN: GRAY
|
||||||
CYAN: AQUA
|
CYAN: AQUA
|
||||||
DARK_BLUE: DARK_BLUE
|
DARK_BLUE: DARK_BLUE
|
||||||
DARK_GRAY: DARK_GRAY
|
DARK_GRAY: DARK_GRAY
|
||||||
DARK_GREEN: DARK_GREEN
|
DARK_GREEN: DARK_GREEN
|
||||||
GREEN: GREEN
|
GREEN: GREEN
|
||||||
LIGHT_GRAY: GRAY
|
LIGHT_GRAY: GRAY
|
||||||
|
|
Loading…
Reference in New Issue
Block a user