rendered paste bodyalias bf2test {
set %ticks $ticks
set $+(%,prefix.,%ticks) msg $active
if ($sock($+(bf2.,%ticks))) { sockclose $+(bf2.,%ticks) }
sockopen $+(bf2.,%ticks) battlefield.ea.com 80
set %id $1-
}
on *:SOCKOPEN:bf2.*:{
sockwrite -nt $sockname GET //battlefield/bf2/playerstats.aspx?profileid= $+ %id $+ / HTTP/1.1
sockwrite -nt $sockname Host: battlefield.ea.com
sockwrite -nt $sockname $crlf
}
on *:SOCKREAD:bf2.*:{
if ($sockerr) { echo -a $sockerr | halt }
else {
var %read
sockread %read
if (place.<br /> isin %read) { tokenize 32 %read | set %place $4 }
if (participant isin %read) {
tokenize 32 %read
$($+(%,prefix.,$remove($sockname,bf2.)),2) 14[04Battlefield 214]: $10
}
}
}
on *:SOCKCLOSE:wp.*:{
unset $+(%,erm.,$remove($sockname,bf2.)) | unset $+(%,prefix.,$remove($sockname,bf2.)) | unset %place | unset %ticks
}