Navigation Menu

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

Commit

Permalink
Fix irc-a-chat
Browse files Browse the repository at this point in the history
  • Loading branch information
cnaude committed Jul 18, 2015
1 parent 3a19f03 commit 80662d9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/java/com/cnaude/purpleirc/IRCMessageHandler.java
Expand Up @@ -170,7 +170,10 @@ public void processMessage(PurpleBot ircBot, User user, Channel channel, String
break;
case "@a":
if (plugin.adminPrivateChatHook != null) {
plugin.adminPrivateChatHook.sendMessage(commandArgs, user.getNick());
String newMessage = ircBot.filterMessage(
plugin.tokenizer.ircChatToGameTokenizer(ircBot, user, channel, plugin.getMsgTemplate(
ircBot.botNick, channelName, TemplateName.IRC_A_CHAT), commandArgs), channelName);
plugin.adminPrivateChatHook.sendMessage(newMessage, user.getNick());
String acResponse = plugin.tokenizer.msgChatResponseTokenizer(target, commandArgs, plugin.getMsgTemplate(TemplateName.IRC_A_RESPONSE));
if (!acResponse.isEmpty()) {
sendMessage(ircBot, target, acResponse, ctcpResponse);
Expand All @@ -187,7 +190,7 @@ public void processMessage(PurpleBot ircBot, User user, Channel channel, String

if (gameCommand.matches(".*%ARG\\d+%.*")) {
String commandArgsArray[] = commandArgs.split(" ");
for (int i = 0; i < commandArgsArray.length; i ++) {
for (int i = 0; i < commandArgsArray.length; i++) {
gameCommand = gameCommand.replace("%ARG" + (i + 1) + "%", commandArgsArray[i]);
}
gameCommand = gameCommand.replaceAll("%ARG\\d+%", "");
Expand Down

0 comments on commit 80662d9

Please sign in to comment.