mirror of
https://github.com/cnaude/PurpleIRC-spigot.git
synced 2024-10-02 08:27:33 +02:00
Added new log-private-chat option.
This commit is contained in:
parent
d2ffe94e49
commit
860aa27f27
@ -97,6 +97,7 @@ public final class PurpleBot {
|
||||
public boolean showMOTD;
|
||||
public boolean channelCmdNotifyEnabled;
|
||||
public boolean relayPrivateChat;
|
||||
public boolean logPrivateChat;
|
||||
public boolean partInvalidChannels;
|
||||
public boolean pingFix;
|
||||
public int botServerPort;
|
||||
@ -703,6 +704,7 @@ public final class PurpleBot {
|
||||
sendRawMessageOnConnect = config.getBoolean("raw-message-on-connect", false);
|
||||
rawMessage = config.getString("raw-message", "");
|
||||
relayPrivateChat = config.getBoolean("relay-private-chat", false);
|
||||
logPrivateChat = config.getBoolean("log-private-chat", false);
|
||||
partInvalidChannels = config.getBoolean("part-invalid-channels", false);
|
||||
pingFix = config.getBoolean("zero-width-space", false);
|
||||
partInvalidChannelsMsg = config.getString("part-invalid-channels-message", "");
|
||||
@ -2911,6 +2913,9 @@ public final class PurpleBot {
|
||||
plugin.logDebug("Tokenized message: " + t);
|
||||
player.sendMessage(t);
|
||||
ircPrivateMsgMap.put(pName, user.getNick());
|
||||
if (logPrivateChat) {
|
||||
plugin.logInfo("Private message from IRC: " + user.getNick() + " -> " + pName + ": " + msg);
|
||||
}
|
||||
} else {
|
||||
asyncIRCMessage(target, "Player is offline: " + pName);
|
||||
}
|
||||
@ -3272,6 +3277,9 @@ public final class PurpleBot {
|
||||
plugin.getMsgTemplate(botNick, "", TemplateName.GAME_PCHAT), message);
|
||||
asyncIRCMessage(nick, msg);
|
||||
ircPrivateMsgMap.put(sender.getName(), nick);
|
||||
if (logPrivateChat) {
|
||||
plugin.logInfo("Private message from game: " + sender.getName() + " -> " + nick + ": " + message);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -3293,6 +3301,9 @@ public final class PurpleBot {
|
||||
} else {
|
||||
sender.sendMessage(ChatColor.RED + "Not linked to " + ChatColor.WHITE + remoteBot);
|
||||
}
|
||||
if (logPrivateChat) {
|
||||
plugin.logInfo("Private message from game: " + sender.getName() + " -> " + remotePlayer + ": " + message);
|
||||
}
|
||||
}
|
||||
|
||||
public void sendRemotePlayerInfo() {
|
||||
|
@ -55,6 +55,8 @@ raw-message-on-connect: false
|
||||
raw-message: auth name pass
|
||||
# relay-private-chat - Allow private chat to the bot to relay to the game
|
||||
relay-private-chat: false
|
||||
# Log private chat messages
|
||||
log-private-chat: true
|
||||
# notify channels or users when a player uses commands
|
||||
command-notify:
|
||||
enabled: false
|
||||
|
Loading…
Reference in New Issue
Block a user