Google Search Script

By #Warizardworks on Aug 10, 2009

Hey guys. This is a google search script that might come in handy here and there.

How it works: A person can type in !GSearch "and what they want to search afterwords" and it will bring up a link for them! Example:

[13:20] <~Wariopower> !GSearch How to cook
[13:20] <@WariBot> Link: http://www.google.com/search?q=How%20to%20cook

EDIT: Added flood protection

How to activate it: Take the script and put it in your remote tab and you are good to go!

That's about it for this script. Hope you enjoy.

~ This script was made by Wariopower and BM88 of #WarizardWorks on irc.purplesurge.com ~

on $*:text:$($strip(!GSearch)):#: { 
  if (!%f) {
   inc -u5 %f
     .timer 1 1 msg $chan Link: 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
}
alias gsearch {
  echo -a Link: http://www.google.com/search?q= $+ $htmlfrm($2-)
}

Comments

Sign in to comment.
DeShOnAr2   -  Oct 29, 2009

i see your making new scripts

 Respond  
PATX   -  Aug 11, 2009

weasel in some cases yes. but this is more direct.

 Respond  
Weasel   -  Aug 11, 2009

Lmgtfy much easier,

 Respond  
#Warizardworks   -  Aug 10, 2009

Okay, very cool. Thanks for the advice! I think I'll use that one as well. =]
~WZW

 Respond  
Phoenix-   -  Aug 10, 2009
on $*:text:/[.`!@](GSearch)|(Google) .*/:#:{ if (%g.spam.check [ $+ [ $nick ] ] != 1) { var %x Link: $+(http://www.google.com/search?q=,$replace($2-,$chr(32),+)) | $iif($left($1,1) == @,msg $chan %x,notice $nick %x) | set -u15 %g.spam.check [ $+ [ $Nick ] ] 1 } }

15 second flood protector and theres no need for an alias. Works with `.! and @. Using @ will message the channel, and anything else will notice.

 Respond  
PATX   -  Aug 10, 2009

Lol, np.

 Respond  
#Warizardworks   -  Aug 10, 2009

Thanks for your comment. We'll try in the future to make the scripts more original. =]
~ WZW

 Respond  
PATX   -  Aug 10, 2009

simple. not very original but good either way gets a 4...

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.