This commit is contained in:
Hri7566 2022-04-07 02:13:59 +02:00
parent bd7506c54e
commit 31609d83ae
13 changed files with 35 additions and 23 deletions

Binary file not shown.

Binary file not shown.

BIN
bot2022.db/001355.ldb Normal file

Binary file not shown.

BIN
bot2022.db/001357.ldb Normal file

Binary file not shown.

BIN
bot2022.db/001360.ldb Normal file

Binary file not shown.

BIN
bot2022.db/001361.log Normal file

Binary file not shown.

View File

@ -1 +1 @@
MANIFEST-001294
MANIFEST-001359

View File

@ -1,13 +1,5 @@
2022/04/06-22:41:18.436029 7f1868e9b700 Recovering log #1293
2022/04/06-22:41:18.436369 7f1868e9b700 Level-0 table #1295: started
2022/04/06-22:41:18.439139 7f1868e9b700 Level-0 table #1295: 3070 bytes OK
2022/04/06-22:41:18.443935 7f1868e9b700 Delete type=0 #1293
2022/04/06-22:41:18.443997 7f1868e9b700 Delete type=3 #1292
2022/04/06-22:45:42.490206 7f184affd700 Compacting 3@0 + 1@1 files
2022/04/06-22:45:42.498214 7f184affd700 Generated table #1297@0: 4251 keys, 200930 bytes
2022/04/06-22:45:42.498242 7f184affd700 Compacted 3@0 + 1@1 files => 200930 bytes
2022/04/06-22:45:42.503492 7f184affd700 compacted to: files[ 0 1 0 0 0 0 0 ]
2022/04/06-22:45:42.503633 7f184affd700 Delete type=2 #1257
2022/04/06-22:45:42.503766 7f184affd700 Delete type=2 #1260
2022/04/06-22:45:42.503969 7f184affd700 Delete type=2 #1241
2022/04/06-22:45:42.504133 7f184affd700 Delete type=2 #1295
2022/04/07-02:11:18.873047 7f130ffff700 Recovering log #1358
2022/04/07-02:11:18.873240 7f130ffff700 Level-0 table #1360: started
2022/04/07-02:11:18.876138 7f130ffff700 Level-0 table #1360: 318 bytes OK
2022/04/07-02:11:18.879394 7f130ffff700 Delete type=0 #1358
2022/04/07-02:11:18.879436 7f130ffff700 Delete type=3 #1356

View File

@ -1,3 +1,5 @@
2022/04/06-22:39:28.559402 7f28d3691700 Recovering log #1291
2022/04/06-22:39:28.563017 7f28d3691700 Delete type=3 #1290
2022/04/06-22:39:28.563068 7f28d3691700 Delete type=0 #1291
2022/04/07-02:10:48.753270 7f7779ffb700 Recovering log #1354
2022/04/07-02:10:48.754642 7f7779ffb700 Level-0 table #1357: started
2022/04/07-02:10:48.756540 7f7779ffb700 Level-0 table #1357: 728 bytes OK
2022/04/07-02:10:48.758772 7f7779ffb700 Delete type=0 #1354
2022/04/07-02:10:48.758843 7f7779ffb700 Delete type=3 #1352

Binary file not shown.

BIN
bot2022.db/MANIFEST-001359 Normal file

Binary file not shown.

View File

@ -30,7 +30,7 @@ module.exports = (bot) => {
let time = 0;
db.getTime((err, t) => {
if (!err) time = t;
if (!err) time = parseInt(t);
});
var banned = [];
@ -45,7 +45,7 @@ module.exports = (bot) => {
if (time >= 60) {
time = 0;
}
db.setTime(time);
db.setTime(time.toString());
db.getBanned((val, val2) => {
banned = val;
@ -540,7 +540,7 @@ module.exports = (bot) => {
}, false);
bot.addCommand(['color', 'colour'], 0, msg => {
if (msg.args.length == 0) return;
if (msg.args.length == 0) msg.args[1] = msg.p._id;
var color;
if (msg.args[0].match(/^#[0-9a-f]{6}$/i)) {
color = new Color(msg.args[0]);
@ -811,7 +811,7 @@ module.exports = (bot) => {
}
});
} else {
sendChat("You have to /go outside to "+cmd+" your device.");
sendChat("You have to /go outside to "+msg.args[0]+" your device.");
}
});
}, false);
@ -1655,6 +1655,10 @@ module.exports = (bot) => {
db.getLocation(msg.p._id, location => {
if (location === 'outside') {
if(location === "outside") {
if (banned.includes(msg.p._id)) {
sendChat("Friend " + msg.p.name + ", you are not allowed to have any fruit because you steal.");
return;
}
db.getFruits(function(num_fruits) {
if(num_fruits > 0) {
db.setFruits(num_fruits - 1);
@ -1937,5 +1941,19 @@ module.exports = (bot) => {
// }
// });
bot.addCommand('wash', 0, msg => {
db.getLocation(msg.p._id, location => {
if(location === "inside") {
let r = ["washes fish in preparation for food.","washes their fish to be eaten later on.","washes all their fish in the kitchen sink for the "+(time >= 30 ? "day" : "night" + "time.")];
sendChat("Friend "+msg.p.name+" "+rando(r));
} else {
sendChat("You have to /go inside to "+msg.args[0]+" your fish.");
}
});
}, false);
bot.addCommand('ban', 0, (msg, admin) => {
if (!admin) return;
db.appendBanned(msg.argcat);
}, false);
}

View File

@ -245,7 +245,7 @@ db.putBanned = (arr, cb) => {
}
db.appendBanned = (id, cb) => {
db.getBanned((val) => {
db.getBanned((arr) => {
val = val.concat(arr);
db.putBanned(arr, cb);
});