|
Joined: Jul 2003
Posts: 21
Ameglian cow
|
OP
Ameglian cow
Joined: Jul 2003
Posts: 21 |
hi, can anywhone post a script for my mIRC to search with google? Example: !google irc And the answer of my script: Google search: www.irc.comThanx
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
alias google.search { var %search $replace($1-,$chr(32),+) sockopen google google.com 80 sockmark google /search?hl=en&ie=UTF-8&oe=UTF-8&q= $+ %search } on 1:SOCKOPEN:GOOGLE:{ sockwrite -n $sockname GET $sock($sockname).mark HTTP/1.1 sockwrite -n $sockname Accept: */* sockwrite -n $sockname $crlf } on 1:SOCKREAD:GOOGLE:{ if ($sockerr > 0) { return } sockread %s if (*www* iswm %s) && (*google* !iswm %s) { %type $remove($wildtok(%s,*www*,1,32),href=",</a>,<font,font>,<font>,<pre>,<body>) } on level:TEXT:!google*:#:{ .set %type amsg $google.search($2-) } change level to your user level
Last edited by pheonix; 07/07/03 12:18 PM.
new username: tidy_trax
|
|
|
|
Joined: May 2003
Posts: 215
Fjord artisan
|
Fjord artisan
Joined: May 2003
Posts: 215 |
on *:INPUT:*: {
if ($1 == !google) { run $+(http://www.google.com.au/search?q=,$replace($2-,$chr(32),+)) }
}
usage: !google <search topic>
- Jason
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
oops,did you want it to message the results to the channel or open the website search?
new username: tidy_trax
|
|
|
|
Joined: Jul 2003
Posts: 21
Ameglian cow
|
OP
Ameglian cow
Joined: Jul 2003
Posts: 21 |
mh...this can not post the result. what wrong do I make? it is not a eggdrop, it is a normaly mIRC script.
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
in the on level:TEXT: bit change level to your user level
new username: tidy_trax
|
|
|
|
Joined: Jul 2003
Posts: 21
Ameglian cow
|
OP
Ameglian cow
Joined: Jul 2003
Posts: 21 |
is this not wright for all users? and i will poste the result directly to the channel!
----
alias google.search { var %search $replace($1-,$chr(32),+) sockopen google google.com 80 sockmark google /search?hl=en&ie=UTF-8&oe=UTF-8&q= $+ %search } on 1:SOCKOPEN:GOOGLE:{ sockwrite -n $sockname GET $sock($sockname).mark HTTP/1.1 sockwrite -n $sockname Accept: */* sockwrite -n $sockname $crlf } on 1:SOCKREAD:GOOGLE:{ if ($sockerr > 0) { return } sockread %s if (*www* iswm %s) && (*google* !iswm %s) { %type $remove($wildtok(%s,*www*,1,32),href=",</a>,<font,font>,<font>,<pre>,<body>) } on *:TEXT:!google*:#:{ .set %type amsg $google.search($2-) }
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
new username: tidy_trax
|
|
|
|
Joined: Jul 2003
Posts: 21
Ameglian cow
|
OP
Ameglian cow
Joined: Jul 2003
Posts: 21 |
the script post nothing to the channel! :-((
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
alias google.search { var %search $replace($1-,$chr(32),+) sockopen google google.com 80 sockmark google /search?hl=en&ie=UTF-8&oe=UTF-8&q= $+ %search } on 1:SOCKOPEN:GOOGLE:{ sockwrite -n $sockname GET $sock($sockname).mark HTTP/1.1 sockwrite -n $sockname Accept: */* sockwrite -n $sockname $crlf } on 1:SOCKREAD:GOOGLE:{ if ($sockerr > 0) { return } sockread %s amsg $remove($wildtok(%s,*www*,1-,32),href=",</a>,<font,font>,<font>,<pre>,<body>) } on *:TEXT:!google*:#:{ $google.search($2-) }
tell them to try searching for just 1 word,and if that works, then try 2 or more.
Last edited by pheonix; 07/07/03 01:05 PM.
new username: tidy_trax
|
|
|
|
Joined: Jul 2003
Posts: 21
Ameglian cow
|
OP
Ameglian cow
Joined: Jul 2003
Posts: 21 |
!google irc or !google irc networks
nothing say the script! mh.... [censored]
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
alias google.search { var %search $replace($1-,$chr(32),+) sockopen google google.com 80 sockmark google /search?hl=en&ie=UTF-8&oe=UTF-8&q= $+ %search } on 1:SOCKOPEN:GOOGLE:{ sockwrite -n $sockname GET $sock($sockname).mark HTTP/1.1 sockwrite -n $sockname Accept: */* sockwrite -n $sockname $crlf } on 1:SOCKREAD:GOOGLE:{ if ($sockerr > 0) { return } sockread %s amsg $remove($wildtok(%s,*www*,1-,32),href=",</a>,<font,font>,<font>,<pre>,<body>) } on *:TEXT:!google*:#:{ $google.search($2-) }
new username: tidy_trax
|
|
|
|
Joined: Jul 2003
Posts: 21
Ameglian cow
|
OP
Ameglian cow
Joined: Jul 2003
Posts: 21 |
!google flashfxp [ +[script] ] href=http://www.google.com/webhp?hl=en><img [ +[script] ] href=http://www.google.com/search?q=flashfxp&hl=en&lr=&ie=UTF-8&oe=UTF-8&cat=gwd/Top&sa=N&tab=wd [ +[script] ] href=http://www.flashfxp.com/>. [ +[script] ] color=#008000>www.tucows.com/preview/195152.html ..... wow! i will only the best result.
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
alias google.search { var %search $replace($1-,$chr(32),+) sockopen google google.com 80 sockmark google /search?hl=en&ie=UTF-8&oe=UTF-8&q= $+ %search } on 1:SOCKOPEN:GOOGLE:{ sockwrite -n $sockname GET $sock($sockname).mark HTTP/1.1 sockwrite -n $sockname Accept: */* sockwrite -n $sockname $crlf } on 1:SOCKREAD:GOOGLE:{ if ($sockerr > 0) { return } sockread %s if (*www* iswm %s) && (*google* !iswm %s) { amsg $remove($wildtok(%s,*www*,1-,32),href=",</a>,<font,font>,<font>,<pre>,<body>,href=,color=#008000>,<,>) } } on *:TEXT:!google*:#:{ $google.search($2-) } that should remove bit more of the html
new username: tidy_trax
|
|
|
|
Joined: Jul 2003
Posts: 21
Ameglian cow
|
OP
Ameglian cow
Joined: Jul 2003
Posts: 21 |
the script is good, but it post the result to all open chans!  how i can make that the script post the result as query message?
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
alias google.search { var %search $replace($1-,$chr(32),+) sockopen google google.com 80 sockmark google /search?hl=en&ie=UTF-8&oe=UTF-8&q= $+ %search } on 1:SOCKOPEN:GOOGLE:{ sockwrite -n $sockname GET $sock($sockname).mark HTTP/1.1 sockwrite -n $sockname Accept: */* sockwrite -n $sockname $crlf } on 1:SOCKREAD:GOOGLE:{ if ($sockerr > 0) { return } sockread %s if (*www* iswm %s) && (*google* !iswm %s) { notice $nick $remove($wildtok(%s,*www*,1-,32),href=",</a>,<font,font>,<font>,<pre>,<body>,href=,color=#008000>,<,>) } } on *:TEXT:!google*:#:{ $google.search($2-) }
new username: tidy_trax
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
does notice $nick actually work with it being outside of an event? By the time its executes, $nick woud return null i would think.
-KingTomato
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
alias google.search { var %search $replace($1-,$chr(32),+) sockopen google google.com 80 sockmark google /search?hl=en&ie=UTF-8&oe=UTF-8&q= $+ %search } on 1:SOCKOPEN:GOOGLE:{ sockwrite -n $sockname GET $sock($sockname).mark HTTP/1.1 sockwrite -n $sockname Accept: */* sockwrite -n $sockname $crlf } on 1:SOCKREAD:GOOGLE:{ if ($sockerr > 0) { return } sockread %s if (*www* iswm %s) && (*google* !iswm %s) { notice %nick $remove($wildtok(%s,*www*,1-,32),href=",</a>,<font,font>,<font>,<pre>,<body>,href=,color=#008000>,<,>) } } on *:TEXT:!google*:#:{ .set %nick $nick $google.search($2-) }
new username: tidy_trax
|
|
|
|
Joined: May 2003
Posts: 23
Ameglian cow
|
Ameglian cow
Joined: May 2003
Posts: 23 |
I put this into my aliases and I get an error: (ERROR) Unknown command: TESTER (Tester is my nick on IRC)
When I put it in my remotes, I get nothing. no results no errors. just nothing happens. I'm not implemeting this correctly ? any tips ? Thanks.
|
|
|
|
Joined: Jul 2003
Posts: 21
Ameglian cow
|
OP
Ameglian cow
Joined: Jul 2003
Posts: 21 |
yes, too! no results or errors
|
|
|
|
|