konbob, this should work for both self-trigger and default function:
on *:TEXT:!google *:#: google $2-
alias google {
set %url /custom?hl=en&client=pub-4099951843714863&cof=FORID%3A1%3BGL%3A1%3BS%3Ahttp%3A%2F%2Fwww.hyperwords.net%2F%3BL%3Ahttp%3A%2F%2Fwww.hyperwords.net%2Fhy-for-google.gif%3BLH%3A100%3BLW%3A100%3BLBGC%3AFFFFFF%3BLP%3A1%3BLC%3A%230033cc%3BVLC%3A%23333333%3BGALT%3A%23999999%3B&q= $+ $1- $+ &btnG=Search
set %chan $chan
set %google (http://\S+.\S+.(com|co\.uk|org|ca|au)\S+)
sockopen google www.google.com 80
}
on *:SOCKOPEN:google:{
sockwrite -n $sockname GET %url HTTP/1.0
sockwrite -n $sockname HOST: www.google.com $+ $crlf $+ $crlf
}
on *:SOCKREAD:google:{
sockread %googlelink
if (%google1 == 3) {
unset %google1
sockclose $sockname
halt
}
elseif ($regex(google,%googlelink,%google)) && (google !isin $regml(google,1)) {
inc %google1 1
msg %chan 4Search Result: 12 $remove($regml(google,1),")
}
}
To trigger this by yourself, use:
/google <YourSearchHere>