mirror of
https://github.com/cnaude/PurpleIRC-spigot.git
synced 2024-12-02 23:13:22 +01:00
Add irc-discord-action
This commit is contained in:
parent
6a698bd542
commit
4aa1b4be68
@ -3255,6 +3255,9 @@ public final class PurpleBot {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Send IRC action messages to VentureChat if enabled
|
||||||
|
*/
|
||||||
if (plugin.dynmapHook != null) {
|
if (plugin.dynmapHook != null) {
|
||||||
if (isMessageEnabled(channelName, TemplateName.IRC_ACTION_DYNMAP_WEB_CHAT)) {
|
if (isMessageEnabled(channelName, TemplateName.IRC_ACTION_DYNMAP_WEB_CHAT)) {
|
||||||
String template = plugin.getMessageTemplate(botNick, channelName, TemplateName.IRC_ACTION_DYNMAP_WEB_CHAT);
|
String template = plugin.getMessageTemplate(botNick, channelName, TemplateName.IRC_ACTION_DYNMAP_WEB_CHAT);
|
||||||
@ -3263,6 +3266,21 @@ public final class PurpleBot {
|
|||||||
plugin.dynmapHook.sendMessage(user.getNick(), rawDWMessage);
|
plugin.dynmapHook.sendMessage(user.getNick(), rawDWMessage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Send IRC action messages to Discord if enabled
|
||||||
|
*/
|
||||||
|
if (isMessageEnabled(channelName, TemplateName.IRC_DISCORD_ACTION) && plugin.discHook != null) {
|
||||||
|
String discordChannelName = discordChannel.get(channelName);
|
||||||
|
String discordTemplate = plugin.getMessageTemplate(botNick, channelName, TemplateName.IRC_DISCORD_ACTION);
|
||||||
|
plugin.logDebug("broadcastAction [Discord]: " + discordChannelName + ": " + discordTemplate);
|
||||||
|
String rawDiscordMessage = filterMessage(
|
||||||
|
plugin.tokenizer.ircChatToDiscordTokenizer(this, user, channel, discordTemplate, message, discordChannelName), channelName);
|
||||||
|
if (!rawDiscordMessage.isEmpty()) {
|
||||||
|
plugin.discHook.sendMessage(discordChannelName, rawDiscordMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -152,6 +152,7 @@ public class TemplateName {
|
|||||||
|
|
||||||
public final static String DISCORD_CHAT = "discord-chat";
|
public final static String DISCORD_CHAT = "discord-chat";
|
||||||
public final static String IRC_DISCORD_CHAT = "irc-discord-chat";
|
public final static String IRC_DISCORD_CHAT = "irc-discord-chat";
|
||||||
|
public final static String IRC_DISCORD_ACTION = "irc-discord-action";
|
||||||
|
|
||||||
public final static String FAKE_JOIN = "fake-join";
|
public final static String FAKE_JOIN = "fake-join";
|
||||||
public final static String FAKE_QUIT = "fake-quit";
|
public final static String FAKE_QUIT = "fake-quit";
|
||||||
|
@ -156,6 +156,8 @@ message-format:
|
|||||||
discord-chat: '[Discord]<%NAME%> %MESSAGE%'
|
discord-chat: '[Discord]<%NAME%> %MESSAGE%'
|
||||||
# Messages from IRC to Discord
|
# Messages from IRC to Discord
|
||||||
irc-discord-chat: '[IRC]<%NAME%> %MESSAGE%'
|
irc-discord-chat: '[IRC]<%NAME%> %MESSAGE%'
|
||||||
|
# Actions from IRC to Discord
|
||||||
|
irc-discord-action: '[IRC] ***%NAME% %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
|
||||||
|
Loading…
Reference in New Issue
Block a user