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
p
pobunjeni
Voice
Posts: 5
Joined: Sun Aug 12, 2007 6:43 am
Contact:

Post by pobunjeni »

56 Serbian dinars = 0.718109205 Euros Rates provided for information only - see disclaimer . More about currency conversion. Search for documents containing the terms 56 csd in eur .

can you remove this Rates provided for information only - see disclaimer . More about currency conversion. Search for documents containing the terms 56 csd in eur .
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

pobunjeni wrote:56 Serbian dinars = 0.718109205 Euros Rates provided for information only - see disclaimer . More about currency conversion. Search for documents containing the terms 56 csd in eur .

can you remove this Rates provided for information only - see disclaimer . More about currency conversion. Search for documents containing the terms 56 csd in eur .
certainly can, how is this?
somewhere on irc wrote:<speechles> !g 56 Serbian dinars in euros
<sp33chy> 56 Serbian dinars = 0.718109205 Euros
<speechles> !g 56 Serbian dinars to euros
<sp33chy> 33,400 Results | 56 Serbian dinars = 0.718109205 Euros | EXIT Festival - Re:Question time - EXIT @ http://www.exitfest.org/index.php?optio ... 9&catid=37 | Sheet1 @ http://unece.org/stats/trends2005/Sourc ... 0Codes.xls | Tax rate (Nova Roma) - NovaRoma @ http://www.novaroma.org/nr/Tax_rate_(Nova_Roma)
So there you go, if results appear with the 'google answer' the results are shown too, if they don't, you'll just get the 'google answer' by itself, no cruft at the end any longer. yaayy!! :)
< Here it is > or any v1.96 link found above.
B
BeBoo
Halfop
Posts: 42
Joined: Wed Sep 26, 2007 1:44 am

Re: Weather?

Post by BeBoo »

Is it possible to only show the first result for the weather instead of getting a bunch of ad results like the one you did? Basically get rid of everything after the Humidity percentage.

Just an idea...
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
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 »

BeBoo wrote:Is it possible to only show the first result for the weather instead of getting a bunch of ad results like the one you did? Basically get rid of everything after the Humidity percentage.

Just an idea...
Ads? I don't understand what you mean, those aren't ads, those are results that mirror image exactly what is on google using the same search term.
sample from irc wrote:<speechles> !g weather oslo norway
<sp33chy> 197,000 Results | Weather for Oslo, Norway: 30°F, Clear, Wind: N at 0 mph, Humidity: 80%; Forecast: Thu, Rain (50°F|39°F); Fri, Partly Sunny (46°F|35°F); Sat, Chance of Rain (50°F|42°F) | Oslo, Norway Forecast : Weather Un @ http://www.wunderground.com/global/stations/01488.html | Oslo Airport, Norway Forecast : Wea @ http://www.wunderground.com/global/stations/01384.html | Oslo, Norway
<sp33chy> weather conditions and @ http://www.worldweatherserver.com/weath ... Z0001.aspx

<speechles> !g weather:toronto, canada
<sp33chy> 12,500 Results | Weather for Toronto, ON, Canada: 54°F, Cloudy, Wind: W at 13 mph, Humidity: 82%; Forecast: Wed, Chance of Rain (60°F|48°F); Thu, Chance of Rain (55°F|42°F); Fri, Partly Sunny (51°F|42°F)

<speechles> !g .ca weather:toronto, canada
<sp33chy> 12,500 Results | Weather for Toronto, ON: 11°C, Cloudy, Wind: W at 13 km/h, Humidity: 88%; Forecast: Wed, Chance of Rain (16°C|9°C); Thu, Chance of Rain (13°C|6°C); Fri, Partly Sunny (11°C|6°C)
Now, with clever use of the colon : you can do just that HERE and as an added bonus, I've added the upcoming 3 day forecast for each. Notice in the 3rd result above, the country server you specify makes a BIG difference when it comes to the format of your answer, notice it's in celcius and omits canada from the answer, since it's using the canadian server.
p
pobunjeni
Voice
Posts: 5
Joined: Sun Aug 12, 2007 6:43 am
Contact:

Post by pobunjeni »

speechles look everything is the same but still i get this part Euros Rates provided for information only - see disclaimer . More about currency conversion. Search for documents containing the terms 56 Serbian dinars in euros .

<pobunjeni-mob> !g 56 Serbian dinars in euros
<HAL> 56 Serbian dinars = 0.719790472 Euros Rates provided for information only - see disclaimer . More about currency conversion. Search for documents containing the terms 56 Serbian dinars in euros .
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

pobunjeni wrote:speechles look everything is the same but still i get this part Euros Rates provided for information only - see disclaimer . More about currency conversion. Search for documents containing the terms 56 Serbian dinars in euros .

<pobunjeni-mob> !g 56 Serbian dinars in euros
<HAL> 56 Serbian dinars = 0.719790472 Euros Rates provided for information only - see disclaimer . More about currency conversion. Search for documents containing the terms 56 Serbian dinars in euros .
I've fixed it. Without knowing which country you have your google default to, there isn't much more I can do. What is your google_country set to?
from irc wrote:<speechles> !g .ru 56 Serbian dinars in euros
<sp33chy> 56 ñåðáñêèõ äèíàðîâ = 0.719790472 euros
<speechles> !g .co.uk 56 Serbian dinars in euros
<sp33chy> 56 Serbian dinars = 0.719790472 Euros
<speechles> !g .de 56 Serbian dinars in euros
<sp33chy> 56 Serbian dinars = 0.719790472 Euros
n
nsrafk
Halfop
Posts: 73
Joined: Fri May 11, 2007 12:25 am

Post by nsrafk »

speechles wrote:
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.
Hehe, let me try to explain,

Basicly i want all my scripts to use the same LAYOUT on announces.

Code: Select all

    variable desc_modes "\0034"
    variable link_modes "\037"
It's in this section i'd like some more options.
Let me show you my announce for my IMDB script:

Code: Select all

set announce(IMDBIRC) "%bold%color4\[%color IMDB %color4\]%bold%color :%bold:%bold: %bold%color3Title:%bold %uline%color%title%uline :%bold:%bold: %bold%color3Genre:%bold %color%genre :%bold:%bold: %color3%boldURL:%bold%color %uline%url%uline|\n|%bold%color4\[%color IMDB %color4\]%bold%color :%bold:%bold: %color3%boldScore:%color%bold %rating (%votes votes) :%bold:%bold: %color3%boldRuntime:%color%bold %time min :%bold:%bold: %color3%boldLanguage:%color%bold %language|\n|%bold%color4\[%color IMDB %color4\]%bold%color :%bold:%bold:%color3%bold Screens:%color%bold %screens :%bold:%bold: %color3%bold Comment:%color%bold %comment|\n|%bold%color4\[%color IMDB %color4\]%bold%color :%bold:%bold: %color3%boldPlot:%bold%color %plot"
I know it won't be possible to change the LINK text in your script, but it should be possible to change the LAYOUT of it.

Code: Select all

« 03:51:00 » (@xx) Eggheads.org - Main Index @ http://www.eggheads.org/ ·
« 03:51:01 » (@xx) Eggheads.org - Downloads @ http://www.eggheads.org/downloads/ ·
« 03:51:02 » (@xx) slennox's eggdrop page @ http://www.egghelp.org/ ·
« 03:51:04 » (@xx) egghelp.org: what is an eggdrop? @ http://www.egghelp.org/whatis.htm ·
I'd want this to look like this:

Code: Select all

« 03:51:00 » (@xx) [ GOOGLE ] Eggheads.org - Main Index @ http://www.eggheads.org/ ·
« 03:51:01 » (@xx) [ GOOGLE ] Eggheads.org - Downloads @ http://www.eggheads.org/downloads/ ·
« 03:51:02 » (@xx) [ GOOGLE ] slennox's eggdrop page @ http://www.egghelp.org/ ·
« 03:51:04 » (@xx) [ GOOGLE ] egghelp.org: what is an eggdrop? @ http://www.egghelp.org/whatis.htm ·
+/- Some weird colors i can add by choice.

Hope you'll understand now hehe :)
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:
speechles wrote:
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.
Hehe, let me try to explain,

Basicly i want all my scripts to use the same LAYOUT on announces.

Code: Select all

    variable desc_modes "\0034"
    variable link_modes "\037"
It's in this section i'd like some more options.
Let me show you my announce for my IMDB script:

Code: Select all

set announce(IMDBIRC) "%bold%color4\[%color IMDB %color4\]%bold%color :%bold:%bold: %bold%color3Title:%bold %uline%color%title%uline :%bold:%bold: %bold%color3Genre:%bold %color%genre :%bold:%bold: %color3%boldURL:%bold%color %uline%url%uline|\n|%bold%color4\[%color IMDB %color4\]%bold%color :%bold:%bold: %color3%boldScore:%color%bold %rating (%votes votes) :%bold:%bold: %color3%boldRuntime:%color%bold %time min :%bold:%bold: %color3%boldLanguage:%color%bold %language|\n|%bold%color4\[%color IMDB %color4\]%bold%color :%bold:%bold:%color3%bold Screens:%color%bold %screens :%bold:%bold: %color3%bold Comment:%color%bold %comment|\n|%bold%color4\[%color IMDB %color4\]%bold%color :%bold:%bold: %color3%boldPlot:%bold%color %plot"
I know it won't be possible to change the LINK text in your script, but it should be possible to change the LAYOUT of it.

Code: Select all

« 03:51:00 » (@xx) Eggheads.org - Main Index @ http://www.eggheads.org/ ·
« 03:51:01 » (@xx) Eggheads.org - Downloads @ http://www.eggheads.org/downloads/ ·
« 03:51:02 » (@xx) slennox's eggdrop page @ http://www.egghelp.org/ ·
« 03:51:04 » (@xx) egghelp.org: what is an eggdrop? @ http://www.egghelp.org/whatis.htm ·
I'd want this to look like this:

Code: Select all

« 03:51:00 » (@xx) [ GOOGLE ] Eggheads.org - Main Index @ http://www.eggheads.org/ ·
« 03:51:01 » (@xx) [ GOOGLE ] Eggheads.org - Downloads @ http://www.eggheads.org/downloads/ ·
« 03:51:02 » (@xx) [ GOOGLE ] slennox's eggdrop page @ http://www.egghelp.org/ ·
« 03:51:04 » (@xx) [ GOOGLE ] egghelp.org: what is an eggdrop? @ http://www.egghelp.org/whatis.htm ·
+/- Some weird colors i can add by choice.

Hope you'll understand now hehe :)
This could one day happen, but you do realize the scope of this script is quite large. Most time I spend on the code lately is to accommodate changes due to websites redesigning, the #1 priority. Eventually, sure, your 'feature' can be easily added to procs. The problem right now is I can count about 4 things broken in the script that need immediate attention (ie. !video,!book). So I would rather donate my time to parser fixes than attention to detail. Once everything works again, and websites finally settle on their designs I can start implementing new ideas. I'll have a fixed script up shortly to cover !video, !book and the other broken things. I'll also have a rudimentary string encoding routine added to the wikipedia/mediawiki to see if it can fix some of the long standing russian/serbian/etc languages to display properly.
r
rix
Halfop
Posts: 42
Joined: Wed Sep 21, 2005 1:04 pm
Location: Estonia

Post by rix »

Would it be too difficult to add cyrillic support for the script?

Atm bot doesn't give any answer.
<rix_> !g Александр Сергеевич Пушкин
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

rix wrote:Would it be too difficult to add cyrillic support for the script?

Atm bot doesn't give any answer.
<rix_> !g Александр Сергеевич Пушкин
Actually, I'm finding this might be entirely possible just using encoding convertto/convertfrom (the same way I intended to try to fix wikipedia :lol: ). But at the moment the input detection, as far as trigger, etc and then invoking the procedure desired, that part would need a rewrite to allow country selection to influence its encoding scheme. Presently that part is set in stone limiting the full abilities of encodings. But using country switching to base the input string encodes upon would solve this. This requires building a couple procs to act as support for the existing procs. The new procs would merely read the country code from the input (if it existed, if it doesn't it would default to your config choice) and translate encodings; one for input, one for output. But without getting too far ahead of myself, I don't feel this is more important than fixing the existing parsers. I would rather the script works to its potential, than keep adding more features while leaving other parts broken, it just seems silly. So once everything works as expected again, we can talk more about how you would like to see it implemented. But sure, consider this entirely doable in the future and more than likely to wind up included since it opens up the script to a new audience of users. ;)
B
BeBoo
Halfop
Posts: 42
Joined: Wed Sep 26, 2007 1:44 am

Post by BeBoo »

speechles wrote:This could one day happen, but you do realize the scope of this script is quite large. Most time I spend on the code lately is to accommodate changes due to websites redesigning, the #1 priority. Eventually, sure, your 'feature' can be easily added to procs. The problem right now is I can count about 4 things broken in the script that need immediate attention (ie. !video,!book). So I would rather donate my time to parser fixes than attention to detail. Once everything works again, and websites finally settle on their designs I can start implementing new ideas. I'll have a fixed script up shortly to cover !video, !book and the other broken things. I'll also have a rudimentary string encoding routine added to the wikipedia/mediawiki to see if it can fix some of the long standing russian/serbian/etc languages to display properly.
I tweaked the script to allow this. It's not hard at all.

First I changed the call sections:

Code: Select all

          # call google
          foreach line [incith::google::parse_output [google $search]] {
            put_output "${where} :\002\00305\[\003 \00312GOOGLE\003 \00305\]\003\002 ${line}"
          }
          break
Then I changed the put_output proc to only accept one input since the input already contains $where:

Code: Select all

    # PUT_OUTPUT
    # actually sends the output to the server
    proc put_output {line} {
      if {$incith::google::notice_reply == 1} {
        putserv "NOTICE $line"
      } else {
        putserv "PRIVMSG $line"
      }
    }
Remember that this has to be done for EACH of the calls or you will get a tcl error.
Output wrote:(BeBoo) !g Drawn Together
(& optix) [ GOOGLE ] Comedy Central: Shows - Drawn Together @ http://www.comedycentral.com/shows/draw ... ndex.jhtml
(& optix) [ GOOGLE ] Drawn Together - Wikipedia, the free e @ http://en.wikipedia.org/wiki/Drawn_Together
(& optix) [ GOOGLE ] List of Drawn Together episodes - Wiki @ http://en.wikipedia.org/wiki/List_of_Dr ... r_episodes
(& optix) [ GOOGLE ] "Drawn Together" (2004) @ http://www.imdb.com/title/tt0386180/
Output wrote:(BeBoo) !yt Drawn Together
(& optix) [ YOUTUBE ] Drawn Together Creator Vomits During @ http://youtube.com/watch?v=lxXaE8Gm6NY
(& optix) [ YOUTUBE ] Drawn Together (Extra.-.02.-.Previou @ http://youtube.com/watch?v=-ryHuBsOE04
(& optix) [ YOUTUBE ] Drawn Together Spanky Ham (spanky ha @ http://youtube.com/watch?v=6Kvy90omoK0
(& optix) [ YOUTUBE ] Drawn Together (Pumps and a Bump Mus @ http://youtube.com/watch?v=T2v31HLUol8
Output wrote:(BeBoo) !wiki Drawn Together
(& optix) [ WIKI ] Drawn Together
(& optix) [ WIKI ] Drawn Together is an American animated television series on Comedy Central created by Dave Jeser and Matt Silverstein, and first aired on October 27, 2004. Comedy Central advertises it as the first animated reality show, though technically, it is an animated sitcom set on a fictitious TV reality show. The show's eight cartoon characters (mostly recognizable parodi @ http://en.wikipedia.org/wiki/Drawn_Together
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

BeBoo wrote:I tweaked the script to allow this. It's not hard at all.
True, and if more people took this approach as you have done, they could easily accommodate themselves. The problem I'm having isn't how easy new additions are, it's just they aren't priority. I'd rather fix broken stuff, make it all good again before I use donated time to frivolous pursuits (which coding for eggdrop is, we do it for fun/leisure, when we have some that is). So if in the meantime you want to show others how to adapt the script to fit their means, I think thats great. As the script is commented fairly heavy, it isn't as hard as most people imagine to get the output you desire by self tweaking code beyond the config. Remember, the script has these lines below, pay particular attention to the last part.. heh :lol:
# end of configuration, script begins
#
# DO NOT CHANGE THINGS BEYOND THIS POINT UNLESS YOU KNOW WHAT YOUR DOING
# If you know what your doing, well by all means, change anything and everything.
Most important, remember to have fun. Enjoy yourself. :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 »

Code: Select all

    # This part was requested to be added so now here it is, it has
    # various prepends you may wish to have preceed each function.
    # To use this, just change what you see below from nothing to
    # something...ie, if you want [ GOOGLE ] to prepend google
    # search results change the search_prepend to "\[ GOOGLE \] ". You
    # can do the same with all of the following prepends, they will
    # start the output for each line. If you don't wish to use this,
    # leave them as "". Keep in mind tcl special characters MUST be
    # escaped or will cause tcl errors, and/or crash your bot. This
    # is your own problem, just be aware. Read about them if possible.
    #
    # Note 1: Prepends will increase your line length, and won't be
    # accommodated for in the max line length setting, so you may
    # find you need to lower your max line length setting if your
    # prepends are lengthy or contain lots of escape sequences. If
    # you don't you  may find the bots replys may get cut short or
    # cut completely by the ircd your using.
    #
    # Note 2: To use color, bold, etc.. simply use the proper escape
    # sequence to generate it here, make sure to properly CLOSE your
    # sequence (\003 for color, \002 for bold, etc) or you will see
    # the effect of the prepend bleed thru into your output as well.
    #
    variable search_prepend ""
    variable image_prepend ""
    variable local_prepend ""
    variable group_prepend ""
    variable news_prepend ""
    variable print_prepend ""
    variable video_prepend ""
    variable youtube_prepend ""
    variable locate_prepend ""
    variable gamespot_prepend ""
    variable fight_prepend ""
    variable ebayfight_prepend ""
    variable trans_prepend ""
    variable daily_prepend ""
    variable gamefaqs_prepend ""
    variable blog_prepend ""
    variable ebay_prepend ""
    variable popular_prepend ""
    variable rev_prepend ""
    variable wiki_prepend ""
    variable wikimedia_prepend ""
    variable recent_prepend ""
    variable mininova_prepend ""
    variable ign_prepend ""
    variable myspacevids_prepend ""
    variable trends_prepend ""
I've fixed !book and !video to once again produce output properly (for those unaware, book was once known as print, settings for print imply book), and added a new config section above to allow those wishing, to prepend a static message to the front of every trigger available (except !help which is a special case, and always a puthelp'd notice).
You can get the new tcl Here or at any v1.9.6 link above.

There will be a new version shortly that should handle encoding issues and allow the script the ability to cope with most character sets properly. Stay tuned. 8)

EDIT: there was a slight problem with gamefaqs, and ebay that i've now addressed as well, both will now work properly again as intended. If you find gamefaqs isn't working for you, regetting the script is the answer.
Last edited by speechles on Mon Oct 22, 2007 11:18 pm, edited 3 times in total.
B
BeBoo
Halfop
Posts: 42
Joined: Wed Sep 26, 2007 1:44 am

Post by BeBoo »

Thanks very much! Keep up the great work!!!
:D :D :D
a
agnostic
Voice
Posts: 3
Joined: Fri Jun 15, 2007 7:15 pm

a problem

Post by agnostic »

This is a version 1.6.18 eggdrop bot running on 4.11-STABLE FreeBSD and tcl8.4.16, connecting to dal.net and hanirc.org.

Running google search UNOFFICIAL-incith-google-v1.96.tcl is giving me
Tcl error [incith::google::public_message]: wrong # args: should be "foreach varList list ?varList list ...? command"
The funny thing is, I had two eggdrops running on different networks and one of them was restarted a while ago and started giving that error. The other copy running from the same binary had no trouble until I restarted it today. Any idea what might be causing it?
Post Reply