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.

23 lines
579 B

12 years ago
  1. var Sequence = require('./Sequence');
  2. var Util = require('util');
  3. var Packets = require('../packets');
  4. module.exports = Statistics;
  5. Util.inherits(Statistics, Sequence);
  6. function Statistics(callback) {
  7. Sequence.call(this, callback);
  8. }
  9. Statistics.prototype.start = function() {
  10. this.emit('packet', new Packets.ComStatisticsPacket);
  11. };
  12. Statistics.prototype['StatisticsPacket'] = function (packet) {
  13. this.end(null, packet);
  14. };
  15. Statistics.prototype.determinePacket = function(firstByte, parser) {
  16. if (firstByte === 0x55) {
  17. return Packets.StatisticsPacket;
  18. }
  19. };