alias -l htmlfree {
var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x, )
return %x
}
on *:text:!goigle*:#:{
/sockopen goigle www.google.com 80
}
on *:SOCKOPEN:goigle:{
/sockwrite -nt $sockname GET /
/sockwrite -n $sockname Host: www.google.com }
on *:sockread:google:{
if ($sockerr) {
echo -a Error.
halt
}
else {
var %temptext
sockread %temptext
if (size=-1>Google.be aangeboden in: Français Deutsch English
iswm %temptext) {
/msg $chan -
/msg $chan $htmlfree(%temptext)
}
}
}