mirror of
https://github.com/cnaude/PurpleIRC-spigot.git
synced 2024-11-29 05:26:19 +01:00
Ignore bot nick when inserting zero width space. #10
This commit is contained in:
parent
1bb118bf45
commit
72a0d9dace
@ -103,6 +103,9 @@ public class IRCMessageQueueWatcher {
|
||||
private String pingFix(String message) {
|
||||
for (Channel channel : ircBot.bot.getUserBot().getChannels()) {
|
||||
for (User user : channel.getUsers()) {
|
||||
if (user.getNick().equalsIgnoreCase(ircBot.botNick)) {
|
||||
continue;
|
||||
}
|
||||
if (message.toLowerCase().contains(user.getNick().toLowerCase())) {
|
||||
message = message.replaceAll("(?i)" + user.getNick(), addZeroWidthSpace(user.getNick()));
|
||||
plugin.logDebug("Adding ZWS to " + user.getNick());
|
||||
|
Loading…
Reference in New Issue
Block a user