module MiscCommands::Misc_ClassMethods

Public Instance Methods

partner_id_to_steam_id(account_id) click to toggle source
# File lib/Misc.rb, line 117
def partner_id_to_steam_id(account_id)
      unknown_constant = 17825793 # or 0x1100001 idk wtf is this but ....
      first_bytes = [account_id.to_i].pack('i>')
      last_bytes = [unknown_constant].pack('i>')
      collect = last_bytes + first_bytes
      return collect.unpack('Q>')[0].to_s
end

Private Instance Methods

output(message) click to toggle source
# File lib/Misc.rb, line 126
def output(message)
      time = Time.new
      add = time.strftime("%d-%m-%Y %H:%M:%S")
      puts "#{add} :: #{message}"
end