left to add restart button, view user button, fix the UI and fix the way dates are generated in the db

This commit is contained in:
QkoSad
2024-11-20 22:52:11 +02:00
commit 06f91a264d
988 changed files with 576669 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
'use strict';
const Command = require('./command.js');
const CommandCode = require('../constants/commands.js');
const Packet = require('../packets/packet.js');
class Quit extends Command {
constructor(callback) {
super();
this.onResult = callback;
}
start(packet, connection) {
connection._closing = true;
const quit = new Packet(
0,
Buffer.from([1, 0, 0, 0, CommandCode.QUIT]),
0,
5
);
if (this.onResult) {
this.onResult();
}
connection.writePacket(quit);
return null;
}
}
module.exports = Quit;