<commit_before>require 'socket'
require 'logger'

# Joystick - a Game Server query tool

# Login Sequence
# 
# Setup Class
# server = Joystick::Source.new("ip", port)
# Connect the socket
# server.connect
# Authenticate
# server.auth("password")
# Fire off a command
# server.rcon("command")

require 'joystick/version'

module Joystick
  class Source
    # execution command
    COMMAND_EXEC = 2
    # auth command
    COMMAND_AUTH = 3
    # auth response
    RESPONSE_AUTH = 2
    # normal response
    RESPONSE_NORM = 0
    # packet trailer
    NULLBYTE = "\x00"

    def initialize
      @host, @port, @socket = nil
      @request_id = 0
      # @log = Logger.new(STDOUT)
      # @log.level = Logger::DEBUG
      # @log.datetime_format = "%H:%M:%S"
      # @log.info("Loaded HLDS Class")
    end

    def connect(host, port)
      @host ||= host<commit_msg>Adding in ModernWarfare protocols first since its Quake based<commit_after>require 'socket'
require 'logger'

# Joystick - a Game Server query tool

# Login Sequence
# 
# Setup Class
# server = Joystick::Source.new("ip", port)
# Connect the socket
# server.connect
# Authenticate
# server.auth("password")
# Fire off a command
# server.rcon("command")

require 'joystick/version'

module Joystick
  class ModernWarfare
    HEADERBYTE = "\xFF" * 4
    NULLBYTE = "\x00"
  end
  
  class Source
    # execution command
    COMMAND_EXEC = 2
    # auth command
    COMMAND_AUTH = 3
    # auth response
    RESPONSE_AUTH = 2
    # normal response
    RESPONSE_NORM = 0
    # packet trailer
    NULLBYTE = "\x00"

    def initialize
      @host, @port, @socket = nil
      @request_id = 0
      # @log = Logger.new(STDOUT)
      # @log.level = Logger::DEBUG
      # @log.datetime_format = "%H:%M:%S"
      # @log.info("Loaded HLDS Class")
    end

    def connect(host, port)
      @host ||= host
{'fraction_non_alphanumeric': 0.1129119394921664, 'fraction_numerical': 0.009184224743381956, 'mean_word_length': 2.8343685300207038, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3548979', 'n_tokens_mistral': 639, 'n_tokens_neox': 597, 'n_words': 169}