Copy paste into remotes. Then you can '!google what you are searching for here', and it will /run the search page (already searched). You can input the !google command in a channel or a query and it wont msg chan or query. Also any person can '!google what they are searching for here', and it will /notice the person the search page (already searched!).
on *:input:*: {
if ($1 = !google) && ($2) {
if ($chan = $null) {
run http://www.google.com/search?q= $+ $htmlfrm($2-)
halt
}
run http://www.google.com/search?q= $+ $htmlfrm($2-)
halt
}
}
on *:text:*!google*:*: {
if ($chan = $null) {
notice $nick http://www.google.com/search?q= $+ $htmlfrm($2-)
halt
}
notice $nick http://www.google.com/search?q= $+ $htmlfrm($2-)
}
alias htmlfrm {
var %i = 1,%r
while (%i <= $len($1-)) {
if ($mid($1-,%i,1) isalnum) { %r = %r $+ $ifmatch }
else { %r = %r $+ % $+ $base($asc($mid($1-,%i,1)),10,16,2) }
inc %i
}
return %r
}