mirror of
https://github.com/cnaude/PurpleIRC-spigot.git
synced 2025-02-10 16:41:26 +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(
|
String newMessage = ircBot.filterMessage(
|
||||||
plugin.tokenizer.ircChatToGameTokenizer(ircBot, user, channel, plugin.getMessageTemplate(ircBot.botNick, channelName, TemplateName.IRC_ADMIN_CHAT), commandArgs), channelName);
|
plugin.tokenizer.ircChatToGameTokenizer(ircBot, user, channel, plugin.getMessageTemplate(ircBot.botNick, channelName, TemplateName.IRC_ADMIN_CHAT), commandArgs), channelName);
|
||||||
plugin.adminPrivateChatHook.sendMessage(newMessage, user.getNick());
|
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()) {
|
if (!acResponse.isEmpty()) {
|
||||||
sendMessage(ircBot, target, acResponse, responseType);
|
sendMessage(ircBot, target, acResponse, responseType);
|
||||||
}
|
}
|
||||||
|
@ -1096,13 +1096,15 @@ public class ChatTokenizer {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
* @param nick
|
||||||
* @param target
|
* @param target
|
||||||
* @param message
|
* @param message
|
||||||
* @param template
|
* @param template
|
||||||
* @return
|
* @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
|
return plugin.colorConverter.ircColorsToGame(template
|
||||||
|
.replace("%NICK%", nick)
|
||||||
.replace("%TARGET%", target)
|
.replace("%TARGET%", target)
|
||||||
.replace("%MESSAGE%", message)
|
.replace("%MESSAGE%", message)
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user