Change
"socket.send("\xff\xff\xff\xffinfostring \n", 0)"
to
"socket.send("\xff\xff\xff\xffTstring \n", 0)"

And see if that does it.

BeNt

----- Original Message -----
From: "Saint K." <[EMAIL PROTECTED]>

Hi all,
After valve did the hl1 query protocol changes, our bot scrip never got
updated cause the author issnt around anymore.
In the script the this part is the one responsible for the query, could
some
one make the changes in it from the old to the new query? Ive been trying
it
myself, unsuccesfull.

SaintK


# start querying servers and storing results in the "results" array
servers.each do |x|
x.chomp!
 case x.split(':')[2]
 when "hl"
   begin
    timeout(1) do
     begin
      socket = UDPSocket.new
      socket.connect(x.split(':')[0], x.split(':')[1].to_i)
      socket.send("\xff\xff\xff\xffinfostring \n", 0)
      a = socket.sysread(16384).delete("\xff").split("\\")
      results << "HL/CS: \x037 #{a[20]} -\x036 #{a[22]}\x0313
#{a[6]}/#{a[12]}\x033 IP: #{x.split(':')[0]}:#{x.split(':')[1]}"
     rescue Errno::ECONNREFUSED
      results << "HL/CS Server: #{x.split(':')[0]}:#{x.split(':')[1]} is
down at the moment (connection refused)"
     end
    end
   rescue TimeoutError
    results << "HL/CS Server: #{x.split(':')[0]}:#{x.split(':')[1]} is
down
at the moment (timed out)"
   end #End the HL query



_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlds

Reply via email to