mirror of
https://github.com/cnaude/PurpleIRC-spigot.git
synced 2025-02-09 08:01:38 +01:00
Add %NICK% to irc-a-response
This commit is contained in:
parent
bb2181c5e5
commit
9364b3847f
@ -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);
|
||||
}
|
||||
|
@ -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)
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user