Trev's script could have been improved quite a bit without global vars and aliases:
On $*:Text:/^([!.@])FML$/Si:#:{
if ($sock(FML.)) sockclose $v1
sockopen FML. rscript.org 80
sockmark FML. $iif($regml(1) = @,.msg #,.notice $nick)~$&
$+($chr(3),1,$chr(40),$chr(3),2,Random FML™,$chr(3),1,$chr(41))
}
On *:SOCKOPEN:FML.:{
sockwrite -n $sockname GET /lookup.php?type=fml HTTP/1.1
sockwrite -n $sockname Host: rscript.org $+ $str($crlf,2)
}
On *:SOCKREAD:FML.:{
if (!$sockerr) {
var %fml | sockread %fml
if (Text:* iswm %fml) {
$gettok($sock(FML.).mark,1,126) $&
$replace($v2,Text:,$gettok($sock(FML.).mark,2,126))
sockclose FML.
}
}
}
Though a trigger protection is recommended.