| View previous topic :: View next topic |
| Author |
Message |
spithash Master

Joined: 12 Jul 2007 Posts: 248 Location: Libera
|
Posted: Mon Sep 21, 2009 3:45 pm Post subject: |
|
|
Good call, glitchiker  _________________ Libera ##rtlsdr & ##re - Nick: spithash
Click here for troll.tcl |
|
| Back to top |
|
 |
shadrach Halfop
Joined: 14 Dec 2007 Posts: 74
|
Posted: Tue Sep 22, 2009 8:59 am Post subject: |
|
|
| shadrach wrote: | | 'locate' seems not to be working. |
It's working. |
|
| Back to top |
|
 |
VinceDalnet Voice
Joined: 05 Mar 2009 Posts: 17
|
Posted: Tue Sep 22, 2009 1:05 pm Post subject: |
|
|
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 |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Tue Sep 22, 2009 5:17 pm Post subject: |
|
|
| 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.
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: | # 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. | Quote: | # 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 _________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
VinceDalnet Voice
Joined: 05 Mar 2009 Posts: 17
|
Posted: Tue Sep 22, 2009 7:33 pm Post subject: |
|
|
problem solved!
thanks speechles  |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Tue Sep 22, 2009 7:47 pm Post subject: |
|
|
| 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?" ). 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*
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 _________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
VinceDalnet Voice
Joined: 05 Mar 2009 Posts: 17
|
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Fri Sep 25, 2009 11:58 pm Post subject: |
|
|
| VinceDalnet wrote: | !g time doesnt display correctly...  |
Well, it does now. And there is more...
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
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  _________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
VinceDalnet Voice
Joined: 05 Mar 2009 Posts: 17
|
Posted: Sat Sep 26, 2009 4:07 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Sat Sep 26, 2009 9:23 pm Post subject: |
|
|
Just a quick quote from a fellow on irc just patching his eggdrop with utf-8 and testing the script for me.
| Quote: | <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: | # 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: | 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..  _________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
Anahel Halfop

Joined: 03 Jul 2009 Posts: 48 Location: Dom!
|
Posted: Sun Sep 27, 2009 5:44 am Post subject: |
|
|
| speechles wrote: | Just a quick quote from a fellow on irc just patching his eggdrop with utf-8 and testing the script for me.
| Quote: | <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  |
|
here's the result of thommey utf-8 patch and speechles modifications:
| Code: | <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/ |
|
|
| Back to top |
|
 |
shadrach Halfop
Joined: 14 Dec 2007 Posts: 74
|
Posted: Sun Sep 27, 2009 3:23 pm Post subject: |
|
|
| Does thommey's patch work for 1.6.19ctcpfix? Do I have to change anything? Code refers to 1.6.18. |
|
| Back to top |
|
 |
Anahel Halfop

Joined: 03 Jul 2009 Posts: 48 Location: Dom!
|
Posted: Sun Sep 27, 2009 5:54 pm Post subject: |
|
|
| 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 |
|
| Back to top |
|
 |
MellowB Voice
Joined: 23 Jan 2008 Posts: 24 Location: Germany
|
Posted: Sun Oct 04, 2009 2:44 pm Post subject: |
|
|
The future is now indeed!
Wonderful work @ UTF-8 support, works great with my patched eggdrop.
Thanks for your continuing great work here, much appreciated. _________________ On the keyboard of life, always keep one finger on the ESC key. |
|
| Back to top |
|
 |
ajc13 Voice
Joined: 13 Oct 2009 Posts: 4
|
Posted: Wed Oct 14, 2009 1:17 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|