Sockets - HLTV rcon. Possible?
I'm trying to do a sockets module equivalent of the udp HLTV rcon plugin. The code below results in a 'Invalid rcon challenge' error on the HLTV server. The old udp code is shown in the comments. My knowledge of challenge rcon is a bit limited - can anyone help? :|
Code:
new rcv[256],snd[256]
new rconid[13]
setc(snd,4,0xff)
copy(snd[4],255,"challenge rcon")
setc(snd[18],1,'^n')
// new chk = query_udp_msg(hltv_address,rcv,255,snd)
socket_send(hltv_address,snd,255)
socket_recv(hltv_address,rcv,255)
copy(rconid,12,rcv[15])
replace(rconid,255,"^n","")
setc(snd,4,0xff)
format(snd[4],255,"rcon %s ^"%s^" %s ^n",rconid,hltv_pass,cmd)
// send_udp_msg(hltv_address,snd)
socket_send(hltv_address,snd,255)
|