Ok, I've provided an interim fix for this, but I wont be uploading it to the egghelp tcl archive just yet as I have a few others things to fix up before I do that first.
So, here's a temporary fix that will stop the script mangling the search parameters and allow you to search for stuff in quotes.
Ie: if you want to search for an IP directly, you need to enclose it in quotes like so: (as per googles own functionality)
<Astrali> !g incith google
<munchBOT> Translate this page @ http://translate.google.com/translate?hl=en&sl=de&u=http://213.133.100.121/index.php?iCurrentItemId=1&iNewsItemId=7&prev=/search?q=incith+google&hl=en&lr=&ie=UTF-8&safe=off&sa=G class=fl | Translate this page @ http://translate.google.com/translate?hl=en&sl=de&u=http://www.shellfire.de/index.php?iCurrentItemId=1345&prev=/search?q=incith+google&hl=en&lr=&ie=UTF-8&safe=off&sa=G class=fl
the server the eggdrop is running on is in germany .. maybe thats the problem?
my language setting is standard value (all) cause most used language in the channels is english
would be nice to get a reply how to fix this problem
got the latest version from your server.
I was wondering when this issue was going to pop up.
Its caused because Google automatically forwards you on to your local google server based on the host you connect to it from.
Because your server is in germany, Google (thoughtfully) sends you on to google.de, however since most of your query results are in English, Google thinks you will probably want to translate them back to German and gives you lots of those results.
However, the query string used to ask Google for the results was *supposed* to have avoided this situation by using google.com only and not using any local Google servers (although I did consider that at one stage).
I have some theories on avoiding this, so I'll check it out and let you know.
RockydotNet wrote:You know what would be nice? If the script had the option to only work for users that are +o and/or +v.
Presuming you have all of your +o and +v users registered on your bot, you can do this already.
Change the "bind pubm -|-" to "bind pubm -|ov" and .rehash will use the bots internal user flag matching to ensure they have the +o or v flags on that channel.
Course, it *only* works if they're all known by the bot.
You probably actually mean any +v/o without them having to be known on the bot though, so that wouldnt work and I'd have to add something for it
testebr wrote:!google << the problem is: Tcl error [incith:google]: can't read "line": no such variable
As far as I can tell from an initial gloss over, the only way you would be getting that result is if the main google function itself returned absolutely no data at all.
But a part of the function ensures that it would, since thats how you get "No search results found."
Can you provide a little more info ? Eggdrop version, tcl version, country you're in, something that you've searched for that doesnt work etc.
#package require http 2.4
source lib/tcl8.4/http2.5/http.tcl
setudef flag google
# 0 will typically disable an option, otherwise a value 1 or
# above will enable it.
#
namespace eval incith {
namespace eval google {
# set this to the command character you want to use for the binds
variable command_char "!"
# set these to your preferred binds ("one two" - space delimited!)
variable google_binds "g google"
variable image_binds "gi image images i"
variable local_binds "gl local"
variable group_binds "gg group groups"
variable news_binds "gn news"
variable print_binds "gp print"
variable video_binds "gv video"
# if you want to allow users to search via private /msg, enable this
variable private_messages 0
# as per emailed & forum requests, use the next two variables together
# to determine the output type like so:
# notice_reply 1 & force_private 1 = private notice reply only (this is as requested)
# notice_reply 0 & force_private 1 = private msg reply only
# notice_reply 1 & force_private 0 = regular channel OR private NOTICE
# notice_reply 0 & force_private 0 = regular channel OR private MSG (default)
# set to 1 to enable a /notice reply instead, 0 for normal text
variable notice_reply 0
# set to 1 to force all replies to be private
variable force_private 0
# set this to the language you want results in! use 2 letter form.
# "all" is the default/standard google.com search.
# See http://www.google.com/advanced_search for a list. You have to use
# the 'Language' dropdown box, perform a search, and find a line in the URL
# that looks like "&lr=lang_en" (for English). "en" is your language code.
# Popular Ones: it (italian), da (danish), de (german), es (spanish), fr (french)
# please note, this does not 'translate', it searches Google in a
# language of choice, which means you can still get English results.
variable language "all"
# number of search results/image links to return, 'define:' is always 1 as some defs are huge
variable search_results 4
variable image_results 4
variable local_results 4
variable group_results 3
variable news_results 3
variable print_results 4
variable video_results 4
# what to use to seperate results, set this to "\n" and it will output each result
# on a line of its own. the seperator will be removed from the end of the last result.
variable seperator " | "
# ** this is not an optional setting, if a string is too long to send, it won't be sent! **
# It should be set to the max amount of characters that will be received in a public
# message by your IRC server. If you find you aren't receiving results, try lowering this.
variable split_length 443
# trimmed length of returned descriptions, only for standard searches.
variable description_length 21
# replace search terms appearing in the description as bolded words?
variable bold_descriptions 1
# underline links returned from search results?
variable underline_links 0
# number of minute(s) to ignore flooders, 0 to disable flood protection
variable ignore 1
# how many requests in how many seconds is considered flooding?
# by default, this allows 3 queries in 10 seconds, the 4th being ignored
# and ignoring the flooder for 'variable ignore' minutes
variable flood 4:10
}
}
# end of configuration, script begins
I'm from Brazil and use Windrop latest version in Windows XP Sp2 and tcl version incith:google v1.7.3
It seems like the reason this happens is because of the "See results for:" addition that Google has at http://www.google.com/search?q=continuum after the third result. Can you please fix the script to work around this?
I had some things to take care of this past week/weekend - namely moving everything out of my house and back in, moving my *entire* computer room from one end of the house ot the other, re-wire the whole house for cat5/tv/cable/etc.
Just look around your dungeon and imagine having to move ALL of it
I will be getting back into checking out these things this week and I'll keep you all posted.