Add %NICK% to irc-a-response

This commit is contained in:
cnaude 2016-11-19 17:02:57 -07:00
parent bb2181c5e5
commit 9364b3847f
2 changed files with 4 additions and 2 deletions

View File

@ -217,7 +217,7 @@ public class IRCMessageHandler {
String newMessage = ircBot.filterMessage(
plugin.tokenizer.ircChatToGameTokenizer(ircBot, user, channel, plugin.getMessageTemplate(ircBot.botNick, channelName, TemplateName.IRC_ADMIN_CHAT), commandArgs), channelName);
plugin.adminPrivateChatHook.sendMessage(newMessage, user.getNick());
String acResponse = plugin.tokenizer.msgChatResponseTokenizer(target, commandArgs, plugin.getMessageTemplate(TemplateName.IRC_ADMIN_RESPONSE));
String acResponse = plugin.tokenizer.msgChatResponseTokenizer(user.getNick(), target, commandArgs, plugin.getMessageTemplate(TemplateName.IRC_ADMIN_RESPONSE));
if (!acResponse.isEmpty()) {
sendMessage(ircBot, target, acResponse, responseType);
}

View File

@ -1096,13 +1096,15 @@ public class ChatTokenizer {
/**
*
* @param nick
* @param target
* @param message
* @param template
* @return
*/
public String msgChatResponseTokenizer(String target, String message, String template) {
public String msgChatResponseTokenizer(String nick, String target, String message, String template) {
return plugin.colorConverter.ircColorsToGame(template
.replace("%NICK%", nick)
.replace("%TARGET%", target)
.replace("%MESSAGE%", message)
);