A Twitch.tv viewer reward and games system.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
405 B

12 years ago
  1. module.exports = ComQueryPacket;
  2. function ComQueryPacket(sql) {
  3. this.command = 0x03;
  4. this.sql = sql;
  5. }
  6. ComQueryPacket.prototype.write = function(writer) {
  7. writer.writeUnsignedNumber(1, this.command);
  8. writer.writeString(this.sql);
  9. };
  10. ComQueryPacket.prototype.parse = function(parser) {
  11. this.command = parser.parseUnsignedNumber(1);
  12. this.sql = parser.parsePacketTerminatedString();
  13. };