mirror of
https://github.com/reality/dbot.git
synced 2024-11-24 12:59:34 +01:00
Merge pull request #228 from SamStudio8/master
Prevent channel profile break on no-stats bug
This commit is contained in:
commit
97c8cd649d
@ -28,11 +28,17 @@ var pages = function(dbot) {
|
|||||||
|
|
||||||
var chanData = dbot.api.stats.getChanStats(connection, channel, ["freq"]);
|
var chanData = dbot.api.stats.getChanStats(connection, channel, ["freq"]);
|
||||||
var chanFreq = [];
|
var chanFreq = [];
|
||||||
for(var i=0; i <= 6; i++){
|
|
||||||
for(var j=0; j <= 23; j++){
|
if(chanData){
|
||||||
chanFreq.push(chanData.fields.freq.raw[i][j]);
|
for(var i=0; i <= 6; i++){
|
||||||
|
for(var j=0; j <= 23; j++){
|
||||||
|
chanFreq.push(chanData.fields.freq.raw[i][j]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
for (var i = 0; i < 168; i++) chanFreq[i] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
var userData = { "active": [], "inactive": [], "offline": []};
|
var userData = { "active": [], "inactive": [], "offline": []};
|
||||||
var reply = dbot.api.stats.getChanUsersStats(connection, channel, [
|
var reply = dbot.api.stats.getChanUsersStats(connection, channel, [
|
||||||
|
Loading…
Reference in New Issue
Block a user