oo aa monkey
This commit is contained in:
parent
953add0006
commit
77e2b78e53
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1 +1 @@
|
||||||
MANIFEST-000823
|
MANIFEST-001294
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
2022/03/29-19:52:22.815953 7f1a93fff700 Recovering log #821
|
2022/04/06-22:41:18.436029 7f1868e9b700 Recovering log #1293
|
||||||
2022/03/29-19:52:22.816067 7f1a93fff700 Level-0 table #824: started
|
2022/04/06-22:41:18.436369 7f1868e9b700 Level-0 table #1295: started
|
||||||
2022/03/29-19:52:22.818365 7f1a93fff700 Level-0 table #824: 393 bytes OK
|
2022/04/06-22:41:18.439139 7f1868e9b700 Level-0 table #1295: 3070 bytes OK
|
||||||
2022/03/29-19:52:22.825576 7f1a93fff700 Delete type=0 #821
|
2022/04/06-22:41:18.443935 7f1868e9b700 Delete type=0 #1293
|
||||||
2022/03/29-19:52:22.825631 7f1a93fff700 Delete type=3 #819
|
2022/04/06-22:41:18.443997 7f1868e9b700 Delete type=3 #1292
|
||||||
|
|
|
@ -1,14 +1,3 @@
|
||||||
2022/03/29-19:51:38.420325 7fd2c57fa700 Recovering log #818
|
2022/04/06-22:39:28.559402 7f28d3691700 Recovering log #1291
|
||||||
2022/03/29-19:51:38.420529 7fd2c57fa700 Level-0 table #820: started
|
2022/04/06-22:39:28.563017 7f28d3691700 Delete type=3 #1290
|
||||||
2022/03/29-19:51:38.422466 7fd2c57fa700 Level-0 table #820: 1434 bytes OK
|
2022/04/06-22:39:28.563068 7f28d3691700 Delete type=0 #1291
|
||||||
2022/03/29-19:51:38.426305 7fd2c57fa700 Delete type=3 #816
|
|
||||||
2022/03/29-19:51:38.426355 7fd2c57fa700 Delete type=0 #818
|
|
||||||
2022/03/29-19:51:38.426541 7fd2b77fe700 Compacting 4@0 + 1@1 files
|
|
||||||
2022/03/29-19:51:38.433674 7fd2b77fe700 Generated table #822@0: 3388 keys, 147397 bytes
|
|
||||||
2022/03/29-19:51:38.433719 7fd2b77fe700 Compacted 4@0 + 1@1 files => 147397 bytes
|
|
||||||
2022/03/29-19:51:38.434567 7fd2b77fe700 compacted to: files[ 0 1 0 0 0 0 0 ]
|
|
||||||
2022/03/29-19:51:38.434660 7fd2b77fe700 Delete type=2 #811
|
|
||||||
2022/03/29-19:51:38.434756 7fd2b77fe700 Delete type=2 #817
|
|
||||||
2022/03/29-19:51:38.434823 7fd2b77fe700 Delete type=2 #814
|
|
||||||
2022/03/29-19:51:38.434867 7fd2b77fe700 Delete type=2 #820
|
|
||||||
2022/03/29-19:51:38.434979 7fd2b77fe700 Delete type=2 #809
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -33,12 +33,23 @@ module.exports = (bot) => {
|
||||||
if (!err) time = t;
|
if (!err) time = t;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var banned = [];
|
||||||
|
|
||||||
|
db.getBanned((val, val2) => {
|
||||||
|
banned = val;
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
time += 1;
|
time += 1;
|
||||||
if (time >= 60) {
|
if (time >= 60) {
|
||||||
time = 0;
|
time = 0;
|
||||||
}
|
}
|
||||||
db.setTime(time);
|
db.setTime(time);
|
||||||
|
|
||||||
|
db.getBanned((val, val2) => {
|
||||||
|
banned = val;
|
||||||
|
});
|
||||||
}, 60 * 1000);
|
}, 60 * 1000);
|
||||||
|
|
||||||
function underline(text) {
|
function underline(text) {
|
||||||
|
@ -1274,7 +1285,10 @@ module.exports = (bot) => {
|
||||||
end: "fishing~\xff"
|
end: "fishing~\xff"
|
||||||
})
|
})
|
||||||
.on("data", function(data) {
|
.on("data", function(data) {
|
||||||
if(data.value) results.push(data.key);
|
if(data.value) {
|
||||||
|
if (banned.includes(data.key.split("~")[1])) return;
|
||||||
|
results.push(data.key);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.on("end", function() {
|
.on("end", function() {
|
||||||
if(results.length === 0) return;
|
if(results.length === 0) return;
|
||||||
|
|
|
@ -209,4 +209,46 @@ db.setFruits = function(num_fruits) {
|
||||||
db.put(key, num_fruits);
|
db.put(key, num_fruits);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
db.getBanned = (cb) => {
|
||||||
|
let key = "banned users";
|
||||||
|
db.get(key, (err, value) => {
|
||||||
|
if(err || !value || value == "") {
|
||||||
|
cb([]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var result = [];
|
||||||
|
value = value.split("\xff");
|
||||||
|
for(var i = 0; i < value.length; i++) {
|
||||||
|
var v = value[i].trim();
|
||||||
|
if(v.length) result.push(v);
|
||||||
|
}
|
||||||
|
cb(result);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
db.putBanned = (arr, cb) => {
|
||||||
|
var result = "";
|
||||||
|
for(var i = 0; i < arr.length; i++) {
|
||||||
|
var v = arr[i];
|
||||||
|
if(!v) continue;
|
||||||
|
v = v.trim();
|
||||||
|
if(v.length > 0) {
|
||||||
|
if(i) result += "\xff";
|
||||||
|
result += v;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var key = "banned users";
|
||||||
|
if(result.length)
|
||||||
|
db.put(key, result);
|
||||||
|
else
|
||||||
|
db.del(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
db.appendBanned = (id, cb) => {
|
||||||
|
db.getBanned((val) => {
|
||||||
|
val = val.concat(arr);
|
||||||
|
db.putBanned(arr, cb);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = db;
|
module.exports = db;
|
||||||
|
|
Loading…
Reference in New Issue