thanks, Jethro_
your version works great.
I changed it so that the !fml is the msg one, and the @fml and .fml are the notices ones though.
by the way, I tried to modify your code to work with thathigh.com, but couldnt get it to work. Can you help me out? I just changed all the FML to TH, and added the adress to thathigh.com and the /random etc.
On $*:Text:/^([!.@])TH$/Si:#:{
if ($sock(TH.)) sockclose $v1
sockopen TH. thathigh.com 80
sockmark TH. $iif($regml(1) = !,.msg #,.notice $nick)~$&
$+($chr(3),1,$chr(40),$chr(3),2,ThatHigh,$chr(3),1,$chr(41))
}
On *:SOCKOPEN:TH.:{
sockwrite -n $sockname GET /random HTTP/1.1
sockwrite -n $sockname Host: thathigh.com $+ $str($crlf,2)
}
On *:SOCKREAD:TH.:{
if (!$sockerr) {
var %th | sockread %th
if (Text:* iswm %th) {
$gettok($sock(TH.).mark,1,126) $&
$replace($v2,Text:,$gettok($sock(TH.).mark,2,126))
sockclose TH.
}
}
}