on *:text:!sabdetails*:* {
%un = [color:green]$2[/color]
[color:red]/[/color]sockopen bot [color:red]http://localhost:6080[/color] 6080
[color:blue]; above is not an ip or named address, it's a HTTP request
;the slash isn't needed in a script[/color]
}
on *:sockopen:bot: {
sockwrite -n $sockname GET [color:red]/s3h/getdetails.php?name=,%un [/color]
[color:blue]; The previous snippet appended the contents of %un using $+, this code
; really sends that url, %un will just be percent u n[/color]
sockwrite -n $sockname Host: [color:red]http://localhost:6080 [/color]
[color:blue]; again, this is not a host, it's a http request[/color]
[color:red]sockwrite -n $sockname User-Agent: $version[/color]
[color:blue]; not needed[/color]
sockwrite -n $sockname [color:red]$crlf [/color]
[color:blue]; you really need 2 $crlf's right after another, only one means
; the server will wait a few seconds/minutes for the end of the request that is never sent[/color]
}
[color:blue]; rest omitted[/color]