mirror of
https://github.com/cnaude/PurpleIRC-spigot.git
synced 2025-01-07 16:27:43 +01:00
Add some additional debugging to figure out issue #26.
Update pom for DiscordSRV 12.3.
This commit is contained in:
parent
a6d09352bf
commit
419a52621d
2
pom.xml
2
pom.xml
@ -420,7 +420,7 @@
|
||||
<dependency>
|
||||
<groupId>com.scarsz.discordsrv</groupId>
|
||||
<artifactId>DiscordSRV</artifactId>
|
||||
<version>11.0</version>
|
||||
<version>12.3</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
@ -48,11 +48,15 @@ public class DiscordSRVHook {
|
||||
|
||||
public void sendMessage(String channelName, String message) {
|
||||
TextChannel textChannel = DiscordSRV.getTextChannelFromChannelName(channelName);
|
||||
TextChannel chatChannel = DiscordSRV.chatChannel;
|
||||
plugin.logDebug("DiscordSRVHook: Message to be sent: " + message);
|
||||
if (textChannel != null) {
|
||||
plugin.logDebug("DiscordSRVHook[" + channelName + "]: " + message);
|
||||
plugin.logDebug("DiscordSRVHook: Sending mssage to channel " + channelName);
|
||||
textChannel.sendMessage(message);
|
||||
} else {
|
||||
plugin.logDebug("DiscordSRVHook: " + message);
|
||||
plugin.logDebug("DiscordSRVHook: Unable to find channel: " + channelName);
|
||||
plugin.logDebug("DiscordSRVHook: Channel list: " + DiscordSRV.channels.keySet());
|
||||
plugin.logDebug("DiscordSRVHook: Sending message to ChatChannel instead: " + chatChannel.getName());
|
||||
DiscordSRV.sendMessageToChatChannel(message);
|
||||
}
|
||||
|
||||
|
@ -1561,10 +1561,10 @@ public final class PurpleBot {
|
||||
return;
|
||||
}
|
||||
for (String channelName : botChannels) {
|
||||
if (isMessageEnabled(channelName, TemplateName.GAME_DISCORD_CHAT)) {
|
||||
if (isMessageEnabled(channelName, TemplateName.DISCORD_CHAT)) {
|
||||
asyncIRCMessage(channelName, plugin.tokenizer
|
||||
.gameChatToIRCTokenizer(username, plugin.getMessageTemplate(
|
||||
botNick, channelName, TemplateName.GAME_DISCORD_CHAT), message)
|
||||
botNick, channelName, TemplateName.DISCORD_CHAT), message)
|
||||
.replace("%CHANNEL%", channelId)
|
||||
);
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ public class TemplateName {
|
||||
public final static String GAME_ADMIN_CHAT = "game-a-chat";
|
||||
public final static String IRC_ADMIN_CHAT = "irc-a-chat";
|
||||
|
||||
public final static String GAME_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 FAKE_JOIN = "fake-join";
|
||||
|
Loading…
Reference in New Issue
Block a user