Skip to content

Commit

Permalink
Cache vote with playername in lowercase
Browse files Browse the repository at this point in the history
  • Loading branch information
SrBedrock committed Sep 11, 2024
1 parent e6fa91d commit ad1f7c1
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,13 @@ protected void attemptToAddToCache(Vote v, String server) {

protected void attemptToAddToPlayerCache(Vote v, String player) {
if (cache != null) {
cache.addToCachePlayer(v, player);
if (plugin.isDebug())
cache.addToCachePlayer(v, player.toLowerCase());
if (plugin.isDebug()) {
plugin.getPluginLogger().info("Added to forwarding cache: " + v + " -> (player) " + player);
} else if (plugin.isDebug())
}
} else if (plugin.isDebug()) {
plugin.getPluginLogger().error("Could not immediately send vote to backend, vote lost! " + v + " -> (player) " + player);

}
}

private void dumpVotesToServer(Collection<Vote> cachedVotes, BackendServer target, String identifier, Consumer<Collection<Vote>> cb) {
Expand Down

0 comments on commit ad1f7c1

Please sign in to comment.