This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

UNOFFICIAL incith-google 2.1x (Nov30,2o12)

Support & discussion of released scripts, and announcements of new releases.
Post Reply
User avatar
spithash
Master
Posts: 248
Joined: Thu Jul 12, 2007 9:21 am
Location: Libera
Contact:

Post by spithash »

Good call, glitchiker :wink:
Libera ##rtlsdr & ##re - Nick: spithash
Click here for troll.tcl
s
shadrach
Halfop
Posts: 74
Joined: Fri Dec 14, 2007 6:29 pm

Post by shadrach »

shadrach wrote:'locate' seems not to be working.
It's working.
V
VinceDalnet
Voice
Posts: 17
Joined: Thu Mar 05, 2009 1:57 pm

Post by VinceDalnet »

i think theres a conflict with http.tcl on incith:google

if i load them both wikipedia and other stuffs dont work :(

i get this error:

Tcl error [incith::google::public_message]: Unknown option -urlencoding, must be: -accept, -proxyfilter, -proxyhost, -proxyport, -useragent


pls help
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

VinceDalnet wrote:i think theres a conflict with http.tcl on incith:google

if i load them both wikipedia and other stuffs dont work :(

i get this error:

Tcl error [incith::google::public_message]: Unknown option -urlencoding, must be: -accept, -proxyfilter, -proxyhost, -proxyport, -useragent


pls help
Your not using http version 2.5, which is what the script requires since.. Well, since quite a few versions ago. You can scroll back and find the exact time this became a requirement. There have been others wondering the exact same thing before...

But.. In case anybody wanted !youtube to actually produce useful results rather than the screen scrolling mess of html it presently presents you with. Well your in luck.. :)

Your also in luck if you wondered why !ebay wasn't working at all for the .com server yet was for every other one. This also has been fixed. So score two down, and who knows how many more to go.

Also, the fix mentioned above about how requiring zlib/trf as packages rather than already implemented tcl commands has been addressed. The hack is no longer required and is included at no extra charge. :P

Finally, there is a mechanism to disable gzip results altogether. The problem using strictly gzip is that when eggdrop inflates this it falls prey to it's abnormal utf-8 environment, and the work-arounds already present in the script can't fix what damage this does. So using gzip and foreign languages, you will experience issues with character rendering. But you can disable completely gzip whether it has been auto-detected and present or not. Simply use this config option below:

Code: Select all

    # enable gzip compression for bandwidth savings? Keep in mind
    # this semi-breaks some of the present utf-8 work-arounds and
    # eggdrop may mangle encodings with gzip compression that it 
    # doesn't when uncompressed html is used (default). A setting
    # of 0 defaults to uncompressed html, a 1 or higher gzip.
    # ------
    variable use_gzip 1
I've also beefed up the "custom trigger phrasing" portion of the script to enhance it a little for users wanting several triggers for the same phrasing. Before you would have had to cascade these to create the same effect. Now you can simply space delineate them and use as many as you want.
# this is what you can now do
"rsmp3 r3 rs3:rs:%search% +mp3"

# before it would've had to be done like this:
"rsmp3:rs:%search% +mp3"
"r3:rs:%search% +mp3"
"rs3:rs:%search% +mp3"
This lets you stack as many triggers as you like easier without having to clutter up the custom phrasing with repetition.

Thats about it really for what has been done to address any issues. Any other issue not mentioned above is still going to be an issue for you today.

Note: !scholar doesn't work correctly at all. Plus it was hardly useful with the way results are presented in such an unfriendly way as to easily present onto irc. In the future, some other google variant (perhaps google code ;)) will find it's way to replace it..

Thanks for reading, here is your file :Incith:Google v1.9.9s

Enjoy, and most important... Have a fun and dance like an robot. ;P
V
VinceDalnet
Voice
Posts: 17
Joined: Thu Mar 05, 2009 1:57 pm

Post by VinceDalnet »

problem solved!


thanks speechles :)
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

shadrach wrote:'locate' seems not to be working.
This happens because locate is actually parsing data from geobytes. They don't actually condone using their services this way, and for that matter free usage at all. But it helps them to advertise so they allow it to an extent. This extent is so many queries in so long of a time. What this time frame is, and how many within it is considered "enough" for them to stop replying to your ip is between you and them really (although you can use the built-in proxy within this script to defeat this ip block). If you experience no message at all, no timeout error, no message saying your bot has been banned from services, etc.. When you see nothing at all after issuing the command it's likely they've implemented a new template to issue over quota usage replies and the script hasn't yet been made aware of it to give a reply. If you could pastebin the ig-debug.txt (if you haven't disabled this, it comes enabled by default with preset config) from your eggdrop's root directory _immediately_ (ig-debug.txt contains the html of the last command used) after experiencing this and post that url to the pastebin here... It then might be possible to catch that message and at least relay that to users over irc rather than a blank stare (nothing). ;)

Edit: Finally had time to invest and figured out that it isn't that eggdrop doesn't know how to handle utf-8. The problem happens when changing between utf-8 and iso8859-1 when rendering utf-8 text (when multiple languages are rendered together). It clearly can easily do russian, But does so sporadically. It may start off wrong or right, but for the most part it starts perfectly. Switches to english phrasing inside, for say a wiki article, and all is well. At this point it correctly keeps up with proper encodings. But when this english sequence ends, and goes back to russian this is where eggdrop messes up again. It seems to only occur with rendering vowels if they contain any accents hanging over them. There is not a way to really work around this as I've previously thought. The problem can be alleviated somewhat by changing the encode_strings variable to only contain languages which are for the most part rendered in iso8859-1 (which a few are by default). For all other queries it is better to go without an entry in the config and seeing if your native language works. If it doesn't, this is where you can add yours and have it converted. This means any iso8859-1 based language cannot have multiple dialects within it, but corrects eggdrops flawed renderings of accented vowels. This has been tested and works with japanese, serbian, malaysian, arabic and french/german/english/dutch (with iso8859-1 conversion) and when using wikipedia the output now looks astonishingly perfect (try "!w .ja loli" people say, "Why do I see japanese text on my screen?" :P). There are problems of course with russian, bulgarian, ukranian and a few others which when misencoded are composed mostly of accented characters. With russian when this happens the multi-byte sequences will be unpaired and rendered seperately as 2 characters rather than composed of 1. But if the reply is long enough you should notice it revert back to perfection mid-sentence oddly. This pecularity isn't because of the script. This means that if you have patched your bot with the utf-8 patch or even perhaps the suzi patch you can now hopefully see perfect output every time for every language. The input parsing has been tweaked slightly to try and prepare it to work with the patch as well. So expect this to take time but hopefully for the most part it works too. If you experience and issues shout them out. Paste screen-shots if your language looks messed up as well. But as always have a fun and there is no new download link. I'm running out of space and can't have this go to version 2.0. That space is meant for madwoota or incith to continue their branch of this script perhaps borrowing ideas from this script as well and implementing them who knows. But suffice to say "no, this isn't T yet, redownload S again" and you should have a utf-8 compliant script finally.... *crosses finger* :P

Re-edit: Also, yes, translate is still kinda .. not completely there yet. It still has issues with some languages. Will investigate that one next.. read above if you skippded down this far because pretty much you've just waisted possibly five to ten seconds just reading this very very very very exaggeratedly long sentence. ;D
V
VinceDalnet
Voice
Posts: 17
Joined: Thu Mar 05, 2009 1:57 pm

Post by VinceDalnet »

!g time doesnt display correctly... :(


[18:22:45] <@Vince> !g time singapore

[18:22:48] <@ astroboy> 172,000,000 Results | Current local time in Singapore â€" @ http://www.timeanddate.com/worldclock/city.html?n=236 | The World Clock - Time Zone difference @ http://www.timeanddate.com/worldclock/d ... tml?p1=236 | Singapore current local time from Wo @ http://www.worldtimeserver.com/current_time_in_SG.aspx | Singapore Time Converter Calculator @
[18:22:49] <@ astroboy> http://www.worldtimeserver.com/convert_time_in_SG.aspx

[18:23:44] <@Vince> !g time new york

[18:23:47] <@ astroboy> 525,000,000 Results | Current local time in U.S.A. â€" New @ http://www.timeanddate.com/worldclock/city.html?n=179 | Midtown Times Square New York City Hot @ http://www.thetimeny.com/ | The New York Times - Breaking News, Wo @ http://www.nytimes.com/ | Today's Paper - New York Times @ http://www.nytimes.com/pages/todayspaper/index.html
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

VinceDalnet wrote:!g time doesnt display correctly... :(
Well, it does now. And there is more...
Image
As you can see, most of the sites now work correctly in utf-8 for languages. The "eggdrop utf-8" problem is demonstrated by the youtube link above. Out of nowhere pop these weird D's, which means its not rendering the sequences as paired and splitting them up. This is not a fault of the script, it is the fault of an unpatched eggdrop. But as you see arabic has no problem, nor does japanese (not shown) and many many more (not shown).

And just so I can finally have those wishing !translate actually worked correctly stare in awe.. Well, here's another screen shot :P
Image

You will still experience issues with utf-8 "input" being fed to the script (this is why I didn't attempt to convert back to english any of the replies above, it doesn't work that way.. yet). This is slowly being worked on as well. If you patch your bot with the utf-8 patch found on this forum you will experience "0 issues" with your output. If your bot is not patched, you will experience rendering problems shown above in the image with the !yt query.

Here is your file: Incith:Google v1.9.9t ... Have a fun :P
V
VinceDalnet
Voice
Posts: 17
Joined: Thu Mar 05, 2009 1:57 pm

Post by VinceDalnet »

updated to version "t"...

proble fixed!


time displays correctly now :)

[16:03:45] <@Vince> !g time lithuania

[16:03:58] <@ iKnoW> 11:03am Saturday (EEST) - Time in Lithuania
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

Just a quick quote from a fellow on irc just patching his eggdrop with utf-8 and testing the script for me.
<speechles> <@anahel> speechles with thommey utf patch it's looks great <-- haw, toldja it would
<speechles> you might even get lucky and utf-8 input works too ;P
<anahel> yeah it works too :)
<anahel> tested it with polish and japanese and it worked :)
So all of you experiencing any issues and able to utf-8 patch your bot should of course investigate doing this. Afterwards, you can safely enable the below config setting:

Code: Select all

    # enable dirty decoding? This attempts to use the regular "dirty" method
    # of rendering html elements which works well with iso8859-1 and other
    # latin variants. This does not work well at all with russian, japanese,
    # and any other non-latin variants. So keep this at 0 if you want a truly
    # multi-language bot, but keep in mind you may see unrendered &x12345; html
    # elements. This is because I don't know of a method to transcode these
    # to proper utf-8 characters yet.. :P
    # ------
    variable dirty_decode 0
With a properly utf-8 patched bot, this option can safely be set to 1 and you will experience no rendering mistakes on either input or output.

Code: Select all

    variable encoding_conversion_input 0
    variable encoding_conversion_output 1
...
    variable automagic 1
...
    variable utf8workaround 1
Change all of the above config options to 0 as well when using a properly utf-8 patched bot. If you do still experience issues (when using thommey's utf-8 patch) mention it here so they can be resolved. Consider yourselves, beta testers.. ;)
User avatar
Anahel
Halfop
Posts: 48
Joined: Fri Jul 03, 2009 6:18 pm
Location: Dom!

Post by Anahel »

speechles wrote:Just a quick quote from a fellow on irc just patching his eggdrop with utf-8 and testing the script for me.
<speechles> <@anahel> speechles with thommey utf patch it's looks great <-- haw, toldja it would
<speechles> you might even get lucky and utf-8 input works too ;P
<anahel> yeah it works too :)
<anahel> tested it with polish and japanese and it worked :)
:D

here's the result of thommey utf-8 patch and speechles modifications:

Code: Select all

<tomek> !wiki .ja japan
<~Nyaa> ジャパン | ジャパン (Japan) は、英語で日本を意味する単語。 @ http://ja.wikipedia.org/wiki/%E3%82%B8%E3%83%A3%E3%83%91%E3%83%B3
<tomek> !tr ja@en 私
<~Nyaa> Google says: (ja->en) Translation: Japanese » English
<~Nyaa> I
<tomek> !tr ja@en 日本人
<~Nyaa> Google says: (ja->en) Translation: Japanese » English
<~Nyaa> Japanese
<tomek> !tr pl@en gość
<~Nyaa> Google says: (pl->en) Translation: Polish » English
<~Nyaa> dude
<tomek> !tr en@pl leaf
<~Nyaa> Google says: (en->pl) Translation: English » Polish
<~Nyaa> Liść
<tomek> !wiki .bg bulgaria
<~Nyaa> България — Уикипедия | Република България е държава в Европа. Разположена е в източната част на Балканския полуостров и заема 22% от неговата територия. Площта ѝ е 110 843км², от които 110 510 км² суша и 333 км² водна площ. Населението е около 7640000 души (2007). Столица на 
<tomek> !wiki polska
<~Nyaa> Polska – Wikipedia, wolna encyklopedia | Polska, oficjalnie Rzeczpospolita Polska – państwo położone w Europie Środkowej nad Morzem Bałtyckim. Graniczy z Niemcami (na zachodzie), Czechami i Słowacją (na południu), Ukrainą i Białorusią (na wschodzie), na północnym wschodzie z Litwą oraz na północy z Rosją (obwód kaliningradzki). Ponadto polska granica wyłącznej strefy ekonomicznej na Bałtyku graniczy
<~Nyaa> ze strefami Danii i Szwecji. Pod względem powierzchni zajmuje 68. miejsce na świecie i dziewiąte w Europie. Pod względem zaludnienia zajmuje 33. miejsce na świecie. Kraj jest podzielony na 16 województw, które dzielą się na powiaty i gminy. Za umowną datę założenia państwa polskiego jest często przyjmowany rok 966, kiedy władca Mieszko I przyjął chrześc @ http://pl.wikipedia.org/wiki/Polska
<tomek> !tr en@ru russia
<~Nyaa> Google says: (en->ru) Translation: English » Russian
<~Nyaa> Россия
<tomek> !g ぉぃ
<~Nyaa> 8,700,000 Results | 当分「未定」らしい...(ぉぃ @ http://ww4.tiki.ne.jp/~hasuike/ | 中村葵ブログ「中村葵の*ぽかぽか*ぁぉぃ日和(*´∀`*)」by Ameba @ http://ameblo.jp/aoi-nakamura/ | あ゛ぁやっちゃったなぁ… ぉぃ… な毎日w @ http://ameblo.jp/gintoki-sakata-vol2/ | 仕事中に寝る(ぉぃ…) 仕事中に寝る(ぉぃ…)とは、仕事中に寝る(ぉ  @ http://www.karadakara.com/dict/keyword/
s
shadrach
Halfop
Posts: 74
Joined: Fri Dec 14, 2007 6:29 pm

Post by shadrach »

Does thommey's patch work for 1.6.19ctcpfix? Do I have to change anything? Code refers to 1.6.18.
User avatar
Anahel
Halfop
Posts: 48
Joined: Fri Jul 03, 2009 6:18 pm
Location: Dom!

Post by Anahel »

shadrach wrote:Does thommey's patch work for 1.6.19ctcpfix? Do I have to change anything? Code refers to 1.6.18.
i'm using 1.6.19+ctcp+ssl but i needed to compile bot again, but to apply patch i needed to edit files manually using patch -p0 < didnt work (it patched only one file)

so you need to download source again, apply thommey patch and compile it again
M
MellowB
Voice
Posts: 24
Joined: Wed Jan 23, 2008 6:02 am
Location: Germany
Contact:

Post by MellowB »

The future is now indeed!
Wonderful work @ UTF-8 support, works great with my patched eggdrop. :D
Thanks for your continuing great work here, much appreciated.
On the keyboard of life, always keep one finger on the ESC key.
a
ajc13
Voice
Posts: 4
Joined: Tue Oct 13, 2009 11:53 pm

Post by ajc13 »

Looking for some assistance, my apologies if this is the wrong spot.

When I attempt to invoke '!google' I receive the following:
Tcl error [incith::google::public_message]: can't read "state(body)": no such variable

Suggestions/redirections?

incith-google 1.9.9t (Sep25,2oo9)

running eggdrop v1.6.19+ctcpfix
OS: Linux 2.6.28-15-server
Tcl library: /usr/share/tcltk/tcl8.5
Tcl version: 8.5.6 (header version 8.5.6)
Tcl is threaded.

[23:05] Incith:Google compression test successful, found Trf package! Gzip enabled.
[23:05] - UNOFFICIAL incith:google-1.9.9t loaded.
Post Reply