mirror of
https://github.com/DeNNiiInc/Connect-5.git
synced 2026-04-18 13:55:59 +00:00
Add complete multiplayer system with real-time gameplay, challenge system, and 50x50 board option
This commit is contained in:
29
node_modules/mysql2/lib/commands/quit.js
generated
vendored
Normal file
29
node_modules/mysql2/lib/commands/quit.js
generated
vendored
Normal 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;
|
||||
Reference in New Issue
Block a user