set %mgq.info $replace(%mgq.info,■■,■ $+ $chr(253))
set %mgq.maxclients $asc($mid($gettok(%mgq.info,6,254),2,1))
set %mgq.version $asc($mid($gettok(%mgq.info,6,254),3,1))
}
}
on *:UDPREAD:queryhlr:{
sockread &queryhlr
if ($bfind(&queryhlr,1,mp_timelimit) != 0) { set %mgq.timelimit $bvar(&queryhlr,$calc($bfind(&queryhlr,$bfind(&queryhlr,1,mp_timelimit),00)+1),$calc($bfind(&queryhlr,$calc($bfind(&queryhlr,$bfind(&queryhlr,1,mp_timelimit),00)+1),00) - $bfind(&queryhlr,$bfind(&queryhlr,1,mp_timelimit),00))).text }
else { set %mgq.timelimit 0 }
if ($bfind(&queryhlr,1,mp_fraglimit) != 0) { set %mgq.fraglimit $bvar(&queryhlr,$calc($bfind(&queryhlr,$bfind(&queryhlr,1,mp_fraglimit),00)+1),$calc($bfind(&queryhlr,$calc($bfind(&queryhlr,$bfind(&queryhlr,1,mp_fraglimit),00)+1),00) - $bfind(&queryhlr,$bfind(&queryhlr,1,mp_fraglimit),00))).text }
else { set %mgq.fraglimit 0 }
set %mgq.needpass $bvar(&queryhlr,$calc($bfind(&queryhlr,$bfind(&queryhlr,1,sv_password),00)+1),$calc($bfind(&queryhlr,$calc($bfind(&queryhlr,$bfind(&queryhlr,1,sv_password),00)+1),00) - $bfind(&queryhlr,$bfind(&queryhlr,1,sv_password),00))).text
}
on *:UDPREAD:queryhlp:{
sockread &queryhlp
if ($bvar(&queryhlp,6) != 0) {
set %mgq.players $bvar(&queryhlp,6)
set %mgq.pos 8
set %mgq.temp 0
:loop
inc %mgq.temp
if (%mgq.temp > %mgq.players) { goto end }
set %mgq.temp2 $replace($bvar(&queryhlp,%mgq.pos,$calc($bfind(&queryhlp,%mgq.pos,00)-%mgq.pos)).text,$chr(32),$chr(160))
set %mgq.pos $calc($bfind(&queryhlp,%mgq.pos,00)+1)
if (%mgq.temp2 isnum) { set %mgq.temp2 %mgq.temp2 $+ $chr(160) }
set %mgq.temp2 %mgq.temp2 $chr(9) $chr(160) $chr(9) $bvar(&queryhlp,$calc(%mgq.pos),1)