mirror of https://github.com/bvn13/JIrcBot.git
improved. if top all size > 10 - sending in private
parent
b452655832
commit
e533e3c68b
|
@ -89,11 +89,21 @@ public class StatisticsListener extends ImprovedListenerAdapter {
|
||||||
event.respondChannel("Statistics is empty now");
|
event.respondChannel("Statistics is empty now");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
event.respondChannel("TOP for all over time:");
|
|
||||||
|
|
||||||
for (int i = 0; i < statistics.size(); i++) {
|
if (statistics.size() > 10) {
|
||||||
StatisticsDTO stats = statistics.get(i);
|
event.respondPrivateMessage("TOP for all over time:");
|
||||||
event.respondChannel("" + (i + 1) + ". " + stats.getUsername() + " - " + stats.getCount());
|
|
||||||
|
for (int i = 0; i < statistics.size(); i++) {
|
||||||
|
StatisticsDTO stats = statistics.get(i);
|
||||||
|
event.respondPrivateMessage("" + (i + 1) + ". " + stats.getUsername() + " - " + stats.getCount());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
event.respondChannel("TOP for all over time:");
|
||||||
|
|
||||||
|
for (int i = 0; i < statistics.size(); i++) {
|
||||||
|
StatisticsDTO stats = statistics.get(i);
|
||||||
|
event.respondChannel("" + (i + 1) + ". " + stats.getUsername() + " - " + stats.getCount());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (commands.length == 3) {
|
} else if (commands.length == 3) {
|
||||||
|
@ -113,11 +123,21 @@ public class StatisticsListener extends ImprovedListenerAdapter {
|
||||||
event.respondChannel("Statistics for "+periodInfo.period+" is empty now");
|
event.respondChannel("Statistics for "+periodInfo.period+" is empty now");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
event.respondChannel("TOP for "+periodInfo.period+":");
|
|
||||||
|
|
||||||
for (int i = 0; i < statistics.size(); i++) {
|
if (statistics.size() > 10) {
|
||||||
StatisticsDTO stats = statistics.get(i);
|
event.respondPrivateMessage("TOP for " + periodInfo.period + ":");
|
||||||
event.respondChannel("" + (i + 1) + ". " + stats.getUsername() + " - " + stats.getCount());
|
|
||||||
|
for (int i = 0; i < statistics.size(); i++) {
|
||||||
|
StatisticsDTO stats = statistics.get(i);
|
||||||
|
event.respondPrivateMessage("" + (i + 1) + ". " + stats.getUsername() + " - " + stats.getCount());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
event.respondChannel("TOP for " + periodInfo.period + ":");
|
||||||
|
|
||||||
|
for (int i = 0; i < statistics.size(); i++) {
|
||||||
|
StatisticsDTO stats = statistics.get(i);
|
||||||
|
event.respondChannel("" + (i + 1) + ". " + stats.getUsername() + " - " + stats.getCount());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue