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
m
madpinger
Voice
Posts: 12
Joined: Sun Oct 03, 2010 3:06 pm

Post by madpinger »

spithash wrote:hmm... that didn't work :/
hmm, idk. You can add "encoding system utf-8" to set the default encoding to utf-8 if your bot is compiled as such, cause the encoding convertfrom converts to what ever encoding system returns, which is why I had issues with it converting to utf-8 again. Produced some odd looking strings o.O

Tho, you did say it was just bold that died. So different from the mangled strings I had being sent to irc. Sorry, I suppose I'm at a loss than. Speechless should popup at sometime with anyluck ^.^
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

spithash wrote:after patching my bot with utf support, the script's bolding stopped working.

Thoughts?

Code: Select all

    # replace search terms appearing in the description as bolded words?
    # -> does not bold entire description, just the matching search words
    # -> this is ignored if desc_modes contains the Bold mode below.
    # ------
    variable bold_descriptions 1
You have this set to 0 possibly?
madpinger wrote:My experience with UTF-8 compiled bots is you need to comment out

Code: Select all

if {![string equal $incithcharset [encoding system]]} { set text [encoding convertto $incithcharset $text] }
in the descdecode proc

At least that's what fixed it for me, iirc
That isn't required EXCEPT on FreeBSD because it fails to set environments correctly and requires all these switches to compile correctly. Rarely does anyone set these flags correctly when compiling so their environment IS utf-8, but their eggdrop THINKS it's iso8859-1. Commenting out that line above fixes this issue. But it is more of a hack than it is a fix. Compiling your bot correctly, and getting your environment and eggdrop to BOTH be utf-8 is what is expected. Anything less you're going to have to hack.
madpinger wrote:
spithash wrote:hmm... that didn't work :/
hmm, idk. You can add "encoding system utf-8" to set the default encoding to utf-8 if your bot is compiled as such, cause the encoding convertfrom converts to what ever encoding system returns, which is why I had issues with it converting to utf-8 again. Produced some odd looking strings o.O

Tho, you did say it was just bold that died. So different from the mangled strings I had being sent to irc. Sorry, I suppose I'm at a loss than. Speechless should popup at sometime with anyluck ^.^
His issue has "nothing" to do with encodings. Hacking your own changes you are on your own, I cannot support these modifications I personally don't use.

Code: Select all

if {![string equal $incithcharset [encoding system]]} { set text [encoding convertto $incithcharset $text] }
Deconstructed, this does the following:
If our "charset" is NOT the same as our system encoding. Convert to it. If your system encoding is utf-8, and the "charset" is utf-8. It wouldn't be converting if you catch my drift. The problem is your installation not the script.

And finally YES!, there will definitely be a new version tomorrow! (NO BULLSHITTING). It likely won't correct every broken trigger but it will fix quite a few.
User avatar
spithash
Master
Posts: 248
Joined: Thu Jul 12, 2007 9:21 am
Location: Libera
Contact:

Post by spithash »

speechles wrote:

Code: Select all

    # replace search terms appearing in the description as bolded words?
    # -> does not bold entire description, just the matching search words
    # -> this is ignored if desc_modes contains the Bold mode below.
    # ------
    variable bold_descriptions 1
You have this set to 0 possibly?
I have it to 1 bro.. I don't know what really happened.. I didn't touch anything else...

oh well, at least it's good to hear that a new version is on the way.. :)
Libera ##rtlsdr & ##re - Nick: spithash
Click here for troll.tcl
User avatar
spithash
Master
Posts: 248
Joined: Thu Jul 12, 2007 9:21 am
Location: Libera
Contact:

Post by spithash »

speechles wrote: That isn't required EXCEPT on FreeBSD because it fails to set environments correctly and requires all these switches to compile correctly. Rarely does anyone set these flags correctly when compiling so their environment IS utf-8, but their eggdrop THINKS it's iso8859-1. Commenting out that line above fixes this issue. But it is more of a hack than it is a fix. Compiling your bot correctly, and getting your environment and eggdrop to BOTH be utf-8 is what is expected. Anything less you're going to have to hack.
I am on FreeBSD..
speechles wrote: And finally YES!, there will definitely be a new version tomorrow! (NO BULLSHITTING). It likely won't correct every broken trigger but it will fix quite a few.
right :P
The script is starting to malfunction

Code: Select all

(08:46:02) <@spithash> !w zante
(08:46:03) <@nagger> Wikipedia Error: No html to parse.
(08:46:05) <@spithash> !w zante
(08:46:08) <@nagger> Wikipedia Error: Sorry, no search results found.
(08:46:32) <@spithash> !w zante
(08:46:35) <@nagger> Zakynthos | Zakynthos [ˈzakinθos]  ( listen), also Zante, the other form often used in English and in Italian (Greek: Ζάκυνθος; Venetian: Zacinto), is the third largest of the Ionian Islands. It covers an area of 410 km^2 (158 sq mi) and its coastline is roughly 123 km (76 mi) in length. The island is named after Zakynthos, the son of a legendary Arcadian chief Dardanus. The name, like all similar
(08:46:36) <@nagger> names ending in -nthos, is pre-Mycenaean or Pelasgian in origin. Zakynthos has a thriving tourism industry. @ http://en.wikipedia.org/wiki/Zakynthos
this was without utf bot compilling... as you can see the utf is working great.. despite the malfunction
Last edited by spithash on Thu Nov 18, 2010 4:31 am, edited 1 time in total.
Libera ##rtlsdr & ##re - Nick: spithash
Click here for troll.tcl
User avatar
spithash
Master
Posts: 248
Joined: Thu Jul 12, 2007 9:21 am
Location: Libera
Contact:

Post by spithash »

This is what I get after compilling the bot with utf support:

Here is an example, my utf works great on urban dict:

Code: Select all

(10:21:05) <@spithash> !ud █▄ █▄█ █▄ ▀█▄
(10:21:07) <@nagger> [1/1] a corruption of lulz. seen on encyclopedia dramatica. (i did it for the █▄ █▄█ █▄ ▀█▄)
(10:21:28) <@spithash> !w arabic fonts
(10:21:30) <@nagger> Wikipedia Error: No html to parse.
(10:21:33) <@spithash> !w arabic fonts
(10:21:37) <@nagger> Wikipedia Error: Sorry, no search results found.
(10:21:46) <@spithash> !w arabic fonts
(10:21:48) <@nagger> Wikipedia Error: No html to parse.
(10:21:53) <@spithash> !w arabic fonts
(10:21:55) <@nagger> Wikipedia Error: No html to parse.
(10:22:02) <@spithash> !w arabic fonts
(10:22:08) <@nagger> Arabic alphabet | The Arabic alphabet (Arabic: أبجدÙJØ© عربÙJØ©â@N â@Yabjadiyyah â@Xarabiyyah) or Arabic abjad is the script used for writing several languages of Asia and Africa, such as Arabic and Urdu. After the Latin alphabet, it is the second-most widely used alphabet around the world. The alphabet was first used to write texts in Arabic, most notably the Qurʼan, the holy book of Islam. With the spread of I
(10:22:09) <@nagger> came to be used to write many languages of many language families including, at various times, Persian, Urdu, Pashto, Baloch, Malay; Fulfulde-Pular, Hausa, and Mandinka (all in West Africa); Swahili (in East Africa); Brahui (in Pakistan); Kashmiri, Sindhi, Balti, and Panjabi (in Pakistan); Arwi (in Sri @ http://en.wikipedia.org/wiki/Arabic_alphabet
but on the google script, it malfunctions plus I get no bolding
speechles wrote: That isn't required EXCEPT on FreeBSD because it fails to set environments correctly and requires all these switches to compile correctly. Rarely does anyone set these flags correctly when compiling so their environment IS utf-8, but their eggdrop THINKS it's iso8859-1. Commenting out that line above fixes this issue. But it is more of a hack than it is a fix. Compiling your bot correctly, and getting your environment and eggdrop to BOTH be utf-8 is what is expected. Anything less you're going to have to hack.
what exactly isn't required?

EDIT:

OK FIXED

Code: Select all

variable use_gzip 0
This was needed ^

Code: Select all

(12:03:50) <@spithash> !w zante
(12:03:55) <@nagger> Zakynthos | Zakynthos [ˈzakinθos]  ( listen), also Zante, the other form often used in English and in Italian (Greek: Ζάκυνθος; Venetian: Zacinto), is the third largest of the Ionian Islands. It covers an area of 410 km^2 (158 sq mi) and its coastline is roughly 123 km (76 mi) in length. The island is named after Zakynthos, 
the son of a legendary Arcadian chief Dardanus. The name, like all similar names ending in -nthos, is
(12:03:56) <@nagger> pre-Mycenaean or Pelasgian in origin. Zakynthos has a thriving tourism industry. @ http://en.wikipedia.org/wiki/Zakynthos
(12:04:37) <@spithash> !w arabic fonts
(12:04:43) <@nagger> Arabic alphabet | The Arabic alphabet (Arabic: أبجدية عربية‎ ’abjadiyyah ‘arabiyyah) or Arabic abjad is the script used for writing several languages of Asia and Africa, such as Arabic and Urdu. After the Latin alphabet, it is the second-most widely used alphabet around the world. The alphabet was first used to write texts in Arabic, most notably the Qurʼan, the holy book of Islam. With the spread of Islam, it came to be used to 
(12:04:44) <@nagger> write many languages of many language families including, at various times, Persian, Urdu, Pashto,
 Baloch, Malay; Fulfulde-Pular, Hausa, and Mandinka (all in West Africa); Swahili (in East Africa); Brahui (in 
Pakistan); Kashmiri, Sindhi, Balti, and Panjabi (in Pakistan); Arwi (in Sri Lanka and Souther @
 http://en.wikipedia.org/wiki/Arabic_alphabet
now the only thing it fails to do when the bot is UTF compilled, is bolding

I guess the "No html to parse." and "Sorry, no search results found." is a matter of timeout from the server :?: but the most important thing is that if it does that for more than 3 or 4 times straight, the bot will ping timeout.. and then you have to restart it cause it will never come back. Any thoughts about this malfunction ?
Libera ##rtlsdr & ##re - Nick: spithash
Click here for troll.tcl
s
stefftastiq
Voice
Posts: 6
Joined: Fri May 07, 2010 1:31 pm

Post by stefftastiq »

any updates version of this script around? its pretty all-over broken now :(
M
MellowB
Voice
Posts: 24
Joined: Wed Jan 23, 2008 6:02 am
Location: Germany
Contact:

Post by MellowB »

According to speechles's last posting here it was released tomorrow! ;)
But srsly, I'm desperately waiting for a partially fixed version too, it would be nice if we at least got something that marginally works again. :(
On the keyboard of life, always keep one finger on the ESC key.
User avatar
Anahel
Halfop
Posts: 48
Joined: Fri Jul 03, 2009 6:18 pm
Location: Dom!

Post by Anahel »

dunno what you're talking about - google is working, wikipedia too, translate after using hax that was posted earlier - same with calc and conversion.
User avatar
Trixar_za
Op
Posts: 143
Joined: Wed Nov 18, 2009 1:44 pm
Location: South Africa
Contact:

Post by Trixar_za »

Ok, since you natives are getting restless, I've done up a copy with all the fixes applied. Don't expect a totally working version, but atleast the google functions work perfectly.

Anyway, download it here

So enjoy and lay off speechles a bit now ;)

PS: For those that noticed that google translate lost the "Language1 to Language2 translation" text again, you can fix it by changing:

Code: Select all

if {![regexp -- {<h3 id=headingtext>(.+?)</h3>} $html {} detect]} {set detect ""} { regsub -all {<.*?>} $detect "" detect}
to

Code: Select all

if {![regexp -- {<h3 id=headingtext.+?>(.+?)</h3>} $html {} detect]} {set detect ""} { regsub -all {<.*?>} $detect "" detect}
I really hate all these code changes Google makes... :-/
s
stefftastiq
Voice
Posts: 6
Joined: Fri May 07, 2010 1:31 pm

Post by stefftastiq »

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

Post by speechles »

Eventually, with enough squeaky wheels chiming in at once. I hear it clearly said...

FIX THE SCRIPT NOW!
YOU LIED TO US BEFORE!
TOMORROW MY ASS!


Okay, to be honest, I made a small transgression there. I made the mistake of assuming I would have more time than I actually had. The activities not a priority suffered as a consequence. One of those activities is maintaining this very script which I nor anyone else derives any income from. Makes sense, right? The releases are done for the soul purpose of being useful for more than just me and the few irc channels I reside in. Because hell, the main reason I write this is for the few hanging in channels with me who are also too lazy to spawn a web browser just to make a point on IRC. It's much, much easier to use a bot for this. So ranting and becoming restless, while expected. Isn't exactly constructive when something so feature filled, maintained, and publically released for such a long period, goes dormant for such a short period. Others thankfully chimed in to offer some advice to those with small issues. Thank you Trixar_za.

But anyways, who cares right? Go cry me a river some other time, as what was then isn't now, and for the moment now is something you have all been waiting for... right?

Incith Google v2.00a

You may ask, what exactly does this fix? Suffice to say, it fixes hopefully.. "everything". This is why, finally, it is called 2.0. Not because of anything else, except to prove this script is still being maintained in full. Everything works, that is, except for !scholar (which is useless for irc presentation) and !torrent (which still works, but only tracks legal torrents therefore is useless). So once again, every single !trigger should work. If you find something isn't working please "squeak" now about it. :)
M
MellowB
Voice
Posts: 24
Joined: Wed Jan 23, 2008 6:02 am
Location: Germany
Contact:

Post by MellowB »

Maybe you should just not give an ETA next time. Really, I do not mind if you take some time for updating it, I can surely relate to that but saying "tomorrow" or "this weekend" again and again and there is nothing here... thats just not very helpful. ^^

But here we are in the end and it's finally fully fixed, that's great news!
So thanks a bunch for keeping up the great work and if you'd give us some paypal info I'd be more than happy to donate a few €'s.
On the keyboard of life, always keep one finger on the ESC key.
User avatar
spithash
Master
Posts: 248
Joined: Thu Jul 12, 2007 9:21 am
Location: Libera
Contact:

Post by spithash »

so far the only malfunction I found is the youtube results, the first 2 are the same urls:
(19:47:28) <@spithash> !y metallica
(19:47:52) <@nagger> YouTube results | Enter Sandman - Metallica (Enter my blog for more videos: monstersofrockinmoscow.blogspot.com Per) (6:17; 4 years ago; 33,690,916 views) @
http://youtube.com/watch?v=1QP-SIW6iKY&hl=en&fmt=18 | Enter Sandman - Metallica (Enter my blog for more videos: monstersofrockinmoscow.blogspot.com Per) (6:17; 4 years ago; 33,690,916 views) @
http://youtube.com/watch?v=1QP-SIW6iKY&hl=en&fmt=18 |
(19:47:53) <@nagger> Metallica - Master Of Puppets With lyrics (*Disclaimer: I do not own any clips or music. All clips and music belo) (8:32; 3 years ago; 23,197,099 views) @
http://youtube.com/watch?v=_z-hEyVQDRA&hl=en&fmt=18
(19:48:26) <@spithash> !y anal sex
(19:48:47) <@nagger> YouTube results | How to Make Her Love Anal Sex (Dan & Jennifer Recommend: bit.ly for great sex tips. How CAN you get) (6:37; 1 year ago; 224,340 views) @
http://youtube.com/watch?v=jKWPN9wwavc&hl=en&fmt=18 | How to Make Her Love Anal Sex (Dan & Jennifer Recommend: bit.ly for great sex tips. How CAN you get) (6:37; 1 year ago; 224,340 views) @
http://youtube.com/watch?v=jKWPN9wwavc&hl=en&fmt=18 |
(19:48:48) <@nagger> Anal Sex Mishaps - Cherry TV.com (www.cherrytv.com Alright. Sometimes too much information is just too m) (3:38; 2 years ago; 572,849 views) @
http://youtube.com/watch?v=21Nck07kurw&hl=en&fmt=18
(19:49:20) <@spithash> !y guitar
(19:49:41) <@nagger> YouTube results | guitar (GuitarMasterPro.net I learned to play guitar with GuitarMasterPro.ne) (5:23; 5 years ago; 80,925,535 views) @ http://youtube.com/watch?v=QjA5faZF1A8&hl=en&fmt=18 |
Andy McKee - Guitar - Drifting - www.candyrat.com (Drifting - Andy McKee Original Song CD - Art of Motion www.candyrat.co) (3:19; 4 years ago; 34,715,631 views) @
(19:49:42) <@nagger> http://youtube.com/watch?v=Ddn4MGaS3N4&hl=en&fmt=18 | Guitar - Peter Nalitch (www.peternalitch.ru Peter Nalitch) (2:58; 3 years ago; 4,588,816 views) @
http://youtube.com/watch?v=AOzkN8dHnjk&hl=en&fmt=18
(19:50:20) <@spithash> !y boxxybabe
(19:50:40) <@nagger> YouTube results | Boxxybabe (^_^) (3:40; 1 year ago; 45,270 views) @ http://youtube.com/watch?v=W_hFtp_Xnxs&hl=en&fmt=18 | Boxxybabe (^_^) (3:40; 1 year ago; 45,270 views) @
http://youtube.com/watch?v=W_hFtp_Xnxs&hl=en&fmt=18 | Boxxybabe (^_^) (3:40; 1 year ago; 45,270 views) @ http://youtube.com/watch?v=W_hFtp_Xnxs&hl=en&fmt=18
And this one (before I decreased my youtube results from 5 to 3). | It's the bolded "data-thumb":

(19:41:16) <@spithash> !y metallica
(19:41:40) <@nagger> YouTube results | Enter Sandman - Metallica (Enter my blog for more videos: monstersofrockinmoscow.blogspot.com Per) (6:17; 4 years ago; 33,690,916 views) @
http://youtube.com/watch?v=1QP-SIW6iKY&hl=en&fmt=18 | Enter Sandman - Metallica (Enter my blog for more videos: monstersofrockinmoscow.blogspot.com Per) (6:17; 4 years ago; 33,690,916 views) @
http://youtube.com/watch?v=1QP-SIW6iKY&hl=en&fmt=18 |
(19:41:40) <@nagger> Metallica - Master Of Puppets With lyrics (*Disclaimer: I do not own any clips or music. All clips and music belo) (8:32; 3 years ago; 23,197,099 views) @
http://youtube.com/watch?v=_z-hEyVQDRA&hl=en&fmt=18 | Metallica - One (Video) (© 2006 WMG One (Video)) (7:45; 1 year ago; 1,255,966 views) @ http://youtube.com/watch?v=WM8bTdBs-cw&hl=en&fmt=18 |
Metallica - Nothing Else Matters (Live)"
(19:41:43) <@nagger> data-thumb="http://i4.ytimg.com/vi/scDd (Metallica - Nothing Else Matters) (6:12; 4 years ago; 15,278,377 views) @ http://youtube.com/watch?v=scDdiHIP4ag&hl=en&fmt=18
I'm not sure if it's me or the youtube script delays to give results about 20 to 25 seconds.
Libera ##rtlsdr & ##re - Nick: spithash
Click here for troll.tcl
E
Elements
Voice
Posts: 12
Joined: Thu Mar 19, 2009 11:33 am

Post by Elements »

time doesn't work
dim: !g time Tokyo Japan
Bot: 28,600,000 results
Bot: Current local time in Japan %13 Tokyo @ http://www.timeanddate.com/worldclock/city.html?n=248
b
bfoos
Voice
Posts: 6
Joined: Thu Sep 30, 2010 6:17 pm

Post by bfoos »

spithash wrote:
speechles wrote:

Code: Select all

    # replace search terms appearing in the description as bolded words?
    # -> does not bold entire description, just the matching search words
    # -> this is ignored if desc_modes contains the Bold mode below.
    # ------
    variable bold_descriptions 1
You have this set to 0 possibly?
I have it to 1 bro.. I don't know what really happened.. I didn't touch anything else...

oh well, at least it's good to hear that a new version is on the way.. :)
Comfirmed. Bolding is broken on a UTF-8 compiled bot running on FreeBSD here. And yes, variable bold_descriptions is set to 1. At any rate... compiling with UTF-8 fixed numerous other issues, including unit conversions.
Post Reply