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
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

GameFAQ's got an update, and while not breaking the bot, it did cause USA/JAP/EUR games to get mixed no matter which region you were trying to specify. This has been addressed and now it will work nicely again. Also corrected a minor issue with wikimedia involving intelligent redirecting. This should help it redirect rather than display a wikimedia error. If you want to give it a whirl, you can < here > or at any of the v1.9.6 links mentioned above. Have fun and remember, if you have any issues at all; bugs? missing features? crashes your bot? Remember to mention it here so the issue can be resolved. Enjoy. 8)

Edit: to rosc2112, about the wiki encoding..yeah I've noticed russian likes to mangle itself whenever eggdrop touches it, like say..with this (ru.wiki webpage -> irc screen) taking directly from page. Sometimes this is just string encoding fix, but sometimes it goes horribly wrong and becomes spaghetti. So I've given up now on even thinking about it, til inspiration or a clue hits me how to solve it.
t
testebr
Halfop
Posts: 86
Joined: Thu Dec 01, 2005 12:22 pm

Post by testebr »

To do search with words accentuated in the youtube doesn't work. Can you fix this problem?

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 »

testebr wrote:To do search with words accentuated in the youtube doesn't work. Can you fix this problem?

Thanks
That's one of those problems I'm having lately. Haven given such freedom in languages, I've now thrown a giant hurdle in front of myself. While this one isn't so giant, it is never the less a hurdle that I can't really appreciate yet until I factor some things in; a) it's using the same way of extending codes for things using %'s (%c5%ad, etc) as Wikipedia does. b) I'm going to assume this is unicode, which I haven't tried to implement yet..Because of it's obvious flaws (rosc2112 has pointed out above in this thread)... What this means, is the same thing holding up Wikipedia from evolving as I'd like, also keeps me from evolving everything else as well (youtube included ;)). It isn't that I don't have the time to try fixing it, it's just that in fixing it for language C, I don't want to break it for languages D-G.. ya know? That's quite honestly the most difficult part of this script; the complexity, care, consideration undertaken when working with every language. It's fun sure... but things like this, I need to investigate before I just toss some random code to solve it short time.

If anyone else knows a simpler way to solve these kinds of %5c%ad%ac encodings in urls, and how to translate this back n forth I'd love to see an example... heh
c
cruxing
Voice
Posts: 9
Joined: Wed Sep 05, 2007 1:56 am

This is...

Post by cruxing »

This is brilliant.

If you're still accepting suggestions, I do have a couple.

Is it possible to have two sets of variables for the size of responses? One for public queries, and one for msg/notice queries? I'm hoping to just have !google be a 'feeling lucky' response in main chat, but the more full scale response if privately messaged. I suppose, to go in hand with this, would be the ability to change some of the other variables based on public or private trigger as well (such as page titles, etc).

In a similar vein, is it possible to get the short hand weather only? No links, just the generic whatever that google spits out.

And for a noobish question to follow that up -- all of the responses seem to be in Celsius. I am GUESSING, and this is just a guess, that it is due to my server being located in canada and google responding in kind based on that. Any workaround/suggestion for that? While I do know my Celsius, Fahrenheit would be a little quicker to mentally parse... :)

Thanks so much for all the work you've done on this -- it really is a great catch-all for lazy irc dwellers.
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Re: This is...

Post by speechles »

cruxing wrote:This is brilliant.

If you're still accepting suggestions, I do have a couple.

Is it possible to have two sets of variables for the size of responses? One for public queries, and one for msg/notice queries? I'm hoping to just have !google be a 'feeling lucky' response in main chat, but the more full scale response if privately messaged. I suppose, to go in hand with this, would be the ability to change some of the other variables based on public or private trigger as well (such as page titles, etc).
This is possible indeed. But will require multiple modifications for each proc to add some way to detect double parameters for _results, and modifying all the bind procs that branch to each proc function. Which is too time consuming for me until the weekend gets here.
cruxing wrote:In a similar vein, is it possible to get the short hand weather only? No links, just the generic whatever that google spits out.
This is as simple as adding a new variable (ie, only_oneresult_answers) to the user config. 'answers' are those times when it would give you time, zipcode, areacode, calculator, weather, etc mixed in with your results. This is an easy one to do.
cruxing wrote:And for a noobish question to follow that up -- all of the responses seem to be in Celsius. I am GUESSING, and this is just a guess, that it is due to my server being located in canada and google responding in kind based on that. Any workaround/suggestion for that? While I do know my Celsius, Fahrenheit would be a little quicker to mentally parse... :)

Thanks so much for all the work you've done on this -- it really is a great catch-all for lazy irc dwellers.
This can already be done, see below.
irc wrote:<speechles> !g .com.au weather Calgary
<sp33chy> Weather for Calgary, AB, Canada: 22°C, Cloudy, Wind: SE at 6 km/h, Humidity: 29%
<speechles> !g .com weather Calgary
<sp33chy> Weather for Calgary, AB, Canada: 71°F, Cloudy, Wind: SE at 4 mph, Humidity: 29%
<speechles> !g .ca weather Calgary
<sp33chy> Weather for Calgary, AB: 22°C, Cloudy, Wind: SE at 6 km/h, Humidity: 29%
As you can see, the .country.switch you specify matters when it comes to formatiing. The 'default' you give in the config is only for times when .country.switching isn't used, which causes default. When the Canadian server was used (above) and Calgary is in Canada, it even omitted that too from the 'answer'. Above is how I'm guessing you want it, which just the single result 'answer'
g
guest
Halfop
Posts: 52
Joined: Mon Jan 19, 2004 4:15 pm

Post by guest »

Hi since you are basically doing an all in one script here

Would there be a chance to maybe add a sports score to it for the sports

fanatics. nba,mlb,nfl,nhl

just something like !nflscore team1 team2

could use

http://sports.yahoo.com/

Thanks for the nice all in one script
d
djevrek
Voice
Posts: 11
Joined: Tue Jul 31, 2007 4:05 am

Post by djevrek »

Still nothing for UTF-8 problems for wikipedia ?
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

djevrek wrote:Still nothing for UTF-8 problems for wikipedia ?
... If I knew how to solve it, it would've been solved a long time ago (read back in this thread)...

It's not as simple as one would imagine to parse wikipedia and do it gracefully. Everything other than encodings should be fine with wikipedia/wikimedia. The two small minor problems are mentioned below:

Languages with special characters work, but sometimes not with those special characters as part of the input. (ie, the youtube problem mentioned above in this thread)

Languages made entirely of special characters work and display (as ugly wrongly encoded text), but most always will refuse to work with this language as input. (ie, the problem with serbian and wikipedia mentioned above as well)

I believe both can be solved with clever use of encoding and using convertfrom/convertto but I haven't invested much time in it.. yet. One day I shall, promise. :wink:
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

Another small update, just to adapt to the recent changes google made to their website. If you spot any other problems, shout them out here so they can be addressed. If the problem appears to be utf-8 or unicode based, at this time I'm not prepared to tackle those..

Get the update:
here or at any of the v1.96 links above.

Changes:
Google stocks, define, calculator and most other google 'answer' functions work again.
Google's multi language 'no search results found' message functional again, this also corrects 'did you mean' messaging.
Google's Youtube results now accommodates for thumbnail images, and grabs results properly again.
Googles 'answer' now expanded to cover hopefully all it's results.
g
guest
Halfop
Posts: 52
Joined: Mon Jan 19, 2004 4:15 pm

Post by guest »

It seems ign has changed there webpage

!ign Crash of the titans
(@BOT) 7 results
(@BOT) Crash of the Titans (PlayStation 2 Game by Sierra isWatched = checkWatch(899065);isWishlist = checkWishlist(899065);isCollection = checkCollection(899065);isPlaying = checkPlaying(899065);isFavorites = checkFavorites(899065);document.write('');Get Email Alertsdocument.
(@BOT) write('');Add to Wishlist) @ http://ps2.ign.com/objects/899/899065.html
(@BOT) Crash of the Titans (Wii Game by Sierra isWatched = checkWatch(899066);isWishlist = checkWishlist(899066);isCollection = checkCollection(899066);isPlaying = checkPlaying(899066);isFavorites = checkFavorites(899066);document.write('');Get Email Alertsdocument.write('');
(@BOT) Add to Wishlist) @ http://wii.ign.com/objects/899/899066.html
(@BOT) Crash of the Titans (PlayStation Portable Game by Sierra isWatched = checkWatch(899189);isWishlist = checkWishlist(899189);isCollection = checkCollection(899189);isPlaying = checkPlaying(899189);isFavorites = checkFavorites(899189);document.write('');Get Email
(@BOT) Alertsdocument.write('');Add to Wishlist) @ http://psp.ign.com/objects/899/899189.html
(@BOT) Crash of the Titans (Xbox 360 Game by Sierra isWatched = checkWatch(899191);isWishlist = checkWishlist(899191);isCollection = checkCollection(899191);isPlaying = checkPlaying(899191);isFavorites = checkFavorites(899191);document.write('');Get Email Alertsdocument.
(@BOT) write('');Add to Wishlist) @ http://xbox360.ign.com/objects/899/899191.html
(@BOT) Crash of the Titans (Nintendo DS Game by Sierra isWatched = checkWatch(899192);isWishlist = checkWishlist(899192);isCollection = checkCollection(899192);isPlaying = checkPlaying(899192);isFavorites = checkFavorites(899192);document.write('');Get Email Alertsdocument.
(@BOT) write('');Add to Wishlist) @ http://ds.ign.com/objects/899/899192.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 »

Damn them at ign.. heh
sample from irc wrote:<speechles> !ign crash of the titans
<sp33chy> 7 results | Crash of the Titans (PlayStation 2 Game by Sierra) @ http://ps2.ign.com/objects/899/899065.html | Crash of the Titans (Wii Game by Sierra) @ http://wii.ign.com/objects/899/899066.html | Crash of the Titans (PlayStation Portable Game by Sierra) @ http://psp.ign.com/objects/899/899189.html
<speechles> !ign mario
<sp33chy> 200 results | Mario (PC Game by Chaos Software) @ http://pc.ign.com/objects/003/003378.html | Super Mario Bros.: Mario's Movie Madness! (DVD) @ http://dvd.ign.com/objects/895/895402.html | Super Mario Bros. (DVD by Walt Disney Home Entertainment) @ http://dvd.ign.com/objects/794/794652.html
!local also had a problem with grabbing results properly, seems google added a pair of double-quotes surrounding some html. It's accounted for now, working, and available here or at any v1.96 link above.. enjoy :lol:
n
nsrafk
Halfop
Posts: 73
Joined: Fri May 11, 2007 12:25 am

Post by nsrafk »

Hi.

First of all thanks for a nice script! :)

I have a thing im wondering about.. Is it possible to customize the output of the !triggers in more ways?

Its because i want the output to be as all my other scripts.. Like this;

[ IMDB ] -> Title: bla
[ XE.COM ] -> CURRENCY bla
[ GOOGLE ] -> description @ www.link.com
[ YOUTUBE ] -> description @ www.link.com

etc etc, i think u get the idea. :) Would be nice if you could add this feature. Colors, bold & underline support also.

I hope you'll consider adding this :)
B
BeBoo
Halfop
Posts: 42
Joined: Wed Sep 26, 2007 1:44 am

Weather?

Post by BeBoo »

Anyone else's weather not working? Everyone has been trying for the past two weeks or so doing the "!g weather 12345" trigger and nothing comes back at all. I am getting this error via DCC:
9:58am (optix) [06:59] Tcl error [incith::google::public_message]: can't read "w5": no such variable
Any ideas? Thanks!!
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Re: Weather?

Post by speechles »

MacBrando wrote:Anyone else's weather not working? Everyone has been trying for the past two weeks or so doing the "!g weather 12345" trigger and nothing comes back at all. I am getting this error via DCC:
9:58am (optix) [06:59] Tcl error [incith::google::public_message]: can't read "w5": no such variable
Any ideas? Thanks!!
sample from irc wrote:<speechles> !g weather 12345
<sp33chy> 588,000 Results | Weather for New York 12345: 57°F, Cloudy, Wind: S at 6 mph, Humidity: 38% | whole new kinds of weather -- K.12345 @ http://www.artofthemix.org/FindAMix/get ... ixid=39024 | Yahoo is now our competitor? @ http://www.webmasterworld.com/forum35/1751.htm | Shortcuts: Quickie weather URL - Lifeh @ http://lifehacker.com/software/shortcut ... 213098.php
As usual, grab your copy HERE or at any v1.96 link above. Have fun. :)
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

nsrafk wrote:Hi.

First of all thanks for a nice script! :)

I have a thing im wondering about.. Is it possible to customize the output of the !triggers in more ways?

Its because i want the output to be as all my other scripts.. Like this;

[ IMDB ] -> Title: bla
[ XE.COM ] -> CURRENCY bla
[ GOOGLE ] -> description @ www.link.com
[ YOUTUBE ] -> description @ www.link.com
etc etc, i think u get the idea. :) Would be nice if you could add this feature. Colors, bold & underline support also.

I hope you'll consider adding this :)
If you can give better examples this can be accommodated for. I'm not quite 100% sure what you mean ...O_o;;? If you mean your [ CAPTIONS ] displayed before each action, isn't is overly obvious what those links are by where they head without the need to spam in ALLCAPS what it is.. pretty sure this is true. Only google links will lead to a differing link, Youtube will always be a youtube link, always. Also, the script already has support for Colors, Bold, and Underline in main procs. Torrent and a few others use underline + bold in different ways to mean different things. I can't allow the bot to destroy these meanings, so some procs won't let you touch their output. That is intentional.
Post Reply