Skip to content
This repository has been archived by the owner on Jul 27, 2019. It is now read-only.

Commit

Permalink
Add irc-console-chat
Browse files Browse the repository at this point in the history
  • Loading branch information
cnaude committed Feb 13, 2014
1 parent 1bacc2c commit 2f72995
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/main/java/com/cnaude/purpleirc/PurpleBot.java
Expand Up @@ -1655,6 +1655,14 @@ public void broadcastChat(String nick, String myChannel, String message, boolean
+ " disabled");
}

if (enabledMessages.get(myChannel).contains(TemplateName.IRC_CONSOLE_CHAT)) {
String tmpl = plugin.getMsgTemplate(botNick, TemplateName.IRC_CONSOLE_CHAT);
plugin.logDebug("broadcastChat [Console]: " + tmpl);
plugin.logInfo(plugin.tokenizer.ircChatToGameTokenizer(
nick, myChannel, plugin.getMsgTemplate(botNick,
TemplateName.IRC_CONSOLE_CHAT), message));
}

if (enabledMessages.get(myChannel).contains(TemplateName.IRC_HERO_CHAT)) {
String hChannel = heroChannel.get(myChannel);
String tmpl = plugin.getIRCHeroChatChannelTemplate(botNick, hChannel);
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/cnaude/purpleirc/TemplateName.java
Expand Up @@ -32,7 +32,7 @@ public class TemplateName {
public final static String IRC_HERO_JOIN = "irc-hero-join";
public final static String IRC_HERO_PART = "irc-hero-part";
public final static String IRC_HERO_QUIT = "irc-hero-quit";
public final static String IRC_HERO_TOPIC = "irc-hero-topic";
public final static String IRC_HERO_TOPIC = "irc-hero-topic";

public final static String IRC_HERO_CHANNELS = "irc-hero-channels";
public final static String HERO_CHANNELS = "hero-channels";
Expand Down Expand Up @@ -63,6 +63,7 @@ public class TemplateName {
public final static String IRC_NICK_CHANGE = "irc-nickchange";
public final static String IRC_MODE = "irc-mode";
public final static String IRC_NOTICE = "irc-notice";
public final static String IRC_CONSOLE_CHAT = "irc-console-chat";

public final static String PLAYER_AFK = "player-afk";
public final static String PLAYER_NOT_AFK = "player-not-afk";
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/SampleBot.yml
Expand Up @@ -95,6 +95,7 @@ channels:
- irc-nickchange
- irc-mode
- irc-notice
#- irc-console-chat
# mcMMO messages sent to IRC
- mcmmo-admin-chat
- mcmmo-party-chat
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/config.yml
Expand Up @@ -71,6 +71,7 @@ message-format:
irc-topic: '[&4IRC] Topic changed by %NAME%: %TOPIC%.'
irc-nickchange: '[&4IRC] %OLDNICK% is now known as %NEWNICK%.'
irc-mode: '[&4IRC] %NAME% %MODE% on %CHANNEL%'
irc-console-chat: '[&4IRC]<%NAME%> %MESSAGE%'
irc-notice: '[&4IRC] [notice(%CHANNEL%)] %NOTICE% '
# Message template for Clevernotch bot to IRC messages
clever-send: '[&4BOT]<%NAME%> %MESSAGE%'
Expand Down

0 comments on commit 2f72995

Please sign in to comment.