Simple Google Search script that i made :)
Use the following commands to search:
-google
!google
-gimg
!gimg
;Google (Image) Search script by Tim_ofzo;
;---------------------------------------------------------;
ON *:TEXT:*:#: {
if (-gimg == $1) { msg $chan Google Image results for ¨ $+ $2-¨ : http://images.google.com/images?q= $+ $htmlfrm($2-) }
if (-google == $1) { msg $chan Google results for ¨ $+ $2-¨ : http://google.com/search?q= $+ $htmlfrm($2-) }
if (!gimg == $1) { msg $chan Google Image results for ¨ $+ $2-¨ : http://images.google.com/images?q= $+ $htmlfrm($2-) }
if (!google == $1) { msg $chan Google results for ¨ $+ $2-¨ : http://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
}