Skip to content

Commit

Permalink
fix keeptime switch
Browse files Browse the repository at this point in the history
  • Loading branch information
hank9999 committed Jan 1, 2021
1 parent c8e777b commit 1a830b6
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,15 @@ public static void add(String username, int times) {
timesCounters.put(username, new Counter(times, nowTime));
return;
}
if (nowTime - count.sayTime <= Config.mute.keeptime) {
count.times += times;
if (Config.function.keeptime) {
if (nowTime - count.sayTime <= Config.mute.keeptime) {
count.times += times;
} else {
count.times = times;
count.sayTime = nowTime;
}
} else {
count.times = times;
count.sayTime = nowTime;
count.times += times;
}
timesCounters.put(username, count);
}
Expand Down

0 comments on commit 1a830b6

Please sign in to comment.