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
B
BeBoo
Halfop
Posts: 42
Joined: Wed Sep 26, 2007 1:44 am

Re: a problem

Post by BeBoo »

agnostic wrote: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?
Have you downloaded the latest script that speechles released on Saturday? Might help narrow things down.
v
vans
Voice
Posts: 20
Joined: Thu Aug 09, 2007 7:21 am

Post by vans »

Is there a way for to remove some of the searches by editing out a line or something? thanx
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

vans wrote:Is there a way for to remove some of the searches by editing out a line or something? thanx
find the piece below in the config

Code: Select all

# number of search results/image links to return, 'define:' is always 1 as some defs are huge
Underneath are settings for each trigger. Simply change the results to 0 (it doesn't say so in the config directly relating to this section, but normally a setting of 0 turns on option off), this will effectively disable that specific trigger completely. If you meant something other than this, you need to be specific what you mean...

Only read beyond this if this doesn't solve your problem...
If you meant shorten intelligent replies, where the first result basically answers the query, such as:
!google how old is paris hilton
!google weather <your city, [country]>
!google <zip code here>
!google time <your city, [country]>
!google etc, etc, etc, etc
This can be done eventually once all the intelligent replies are known, which right now !google time was recently added. So in a bit, sure this is possible.
v
vans
Voice
Posts: 20
Joined: Thu Aug 09, 2007 7:21 am

Post by vans »

thank you that did it :)
p
panasonic
Voice
Posts: 25
Joined: Sat Sep 15, 2007 5:27 am

Post by panasonic »

speechless,

thank you for such a great tcl script
i've tried http://ereader.kiczek.com/UNOFFICIAL-in ... -v1.96.tcl ( v1.9.6 - Oct 28th, 2oo7 ) - Present BETA and it's working good for me :)
but instead of having all options enabled, can i just enable certain modules only and left the rest unused?
for example, i may need !youtube and !torrent but i dont need !google and !wiki*
how do i disable !google and !wiki* as i'm running trivia channel, so i felt that such function is unnecessary needed in my channel

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

Post by speechles »

panasonic wrote:speechless,

thank you for such a great tcl script
i've tried http://ereader.kiczek.com/UNOFFICIAL-in ... -v1.96.tcl ( v1.9.6 - Oct 28th, 2oo7 ) - Present BETA and it's working good for me :)
but instead of having all options enabled, can i just enable certain modules only and left the rest unused?
for example, i may need !youtube and !torrent but i dont need !google and !wiki*
how do i disable !google and !wiki* as i'm running trivia channel, so i felt that such function is unnecessary needed in my channel

thanks again for this great script :D
To disable any of the triggers, set their respective results to 0. It will show on !help <that trigger> that presently the trigger is disabled too.
p
panasonic
Voice
Posts: 25
Joined: Sat Sep 15, 2007 5:27 am

Post by panasonic »

speechles wrote: To disable any of the triggers, set their respective results to 0. It will show on !help <that trigger> that presently the trigger is disabled too.
errr... what if i only wanted to disable !google on #channel1 but i want it on #channel2
will that required more coding..?
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

panasonic wrote:
speechles wrote: To disable any of the triggers, set their respective results to 0. It will show on !help <that trigger> that presently the trigger is disabled too.
errr... what if i only wanted to disable !google on #channel1 but i want it on #channel2
will that required more coding..?
Well, considering the script uses a single channel flag, google, encompassing all the triggers under it's umbrella, presently this isn't possible. Would require setting up channel flags for every trigger seperately and yes... would definitely requite retooling of the current flag detection routine, aka more coding. But is indeed possible, just can't say when I will have time to incorporate it. Currently I'm trying to solve the riddle regarding eggdrop encodings and how to elegantly convert text between character sets (which btw, is going good, I'm quite certain I can overcome the hurdle). So after you see serbian, arabic, cyrillic, etc character sets working correctly as both input/output on this script, I can add the feature you've requested. The encoding issue is the biggest flaw of this script, and has become a top priority now..

Sidenote: fixed dailymotion, get it at any v1.96 link above. If neither !daily !dm !dailymotion works for you using default settings, the answer is so obvious, it's already been mentioned.
B
BeBoo
Halfop
Posts: 42
Joined: Wed Sep 26, 2007 1:44 am

Post by BeBoo »

speechles & panasonic:

I had to do some tweaking to prevent any of the standard !google triggers (due to a bot already having the orig google script and but still want to use wiki and review). Here's what I did.

First, I added a variable by the triggers:

Code: Select all

    # List of channels to restrict google running in
    variable banned_chan "#bar #friends #majestic"
Then search for "# call google" and put this there:

Code: Select all

          # call google
          foreach chan [split $incith::google::banned_chan " "] {
            if {[string tolower $where] eq $chan} {
              return
            }
          }
I put this under every one of the original google calls (under the '# call ****' section) for the channels that the other bot is in. Lemme know if you have any problems with it.

BeBoo
p
panasonic
Voice
Posts: 25
Joined: Sat Sep 15, 2007 5:27 am

Post by panasonic »

hi! BeeBo,

i have tried as suggested but unfortunately didn't succeed
code added:

Code: Select all

    # List of channels to restrict google running in 
    variable banned_chan "#channel2"
i have replaced:

Code: Select all

          # call google
          foreach line [incith::google::parse_output [google $search]] {
            put_output $where "$incith::google::search_prepend$line"
          }
          break
          }
          }
with:

Code: Select all

          # call google 
          foreach chan [split $incith::google::banned_chan " "] { 
            if {[string tolower $where] eq $chan} { 
              return 
            } 
            }
but even in the channel i want google function to show (#channel1), it wont give a result
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 »

panasonic wrote:hi! BeeBo,

i have tried as suggested but unfortunately didn't succeed
code added:

Code: Select all

    # List of channels to restrict google running in 
    variable banned_chan "#channel2"
i have replaced:

Code: Select all

          # call google
          foreach line [incith::google::parse_output [google $search]] {
            put_output $where "$incith::google::search_prepend$line"
          }
          break
          }
          }
with:

Code: Select all

          # call google 
          foreach chan [split $incith::google::banned_chan " "] { 
            if {[string tolower $where] eq $chan} { 
              return 
            } 
            }
but even in the channel i want google function to show (#channel1), it wont give a result
thanks...
Wow! No wonder it doesnt work. You removed its ability by omitting its output loop... The trick is add the info BeBoo put, don't replace a thing. Below is a slightly better way to do code it.

Code: Select all

      # check for !google
      foreach bind [split $incith::google::google_binds " "]  {
        if {[string match -nocase $bind $trigger] == 1} {
          # channel filter check
          foreach c [split $incith::google::filtered " "] { 
            if {[string match -nocase $where $c] == 1} { 
              return
            } 
          }
          # flood protection check
          if {[flood $nick $uhand]} {
            return
          }
          # call google
          foreach line [incith::google::parse_output [google $search]] {
            put_output $where "$incith::google::search_prepend$line"
          }
          break
        }
      }
      # check for !images
      ... rest of script continues ...
Don't forget to add your new config variable as well

Code: Select all

    # Channel filter
    # This is for users who already have a google script running, but would
    # like to use the other functions of this script. You can filter out google 
    # requests in any of the channels listed below.
    # Default is "". To add them use: "#chan1 #CHAN2 #cHaN3 #EtC"
    variable filtered ""
That's all there is to it if you care to have this option available.
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

Small update needed. Corrects !google define:, and 'did you mean' messaging in both !video and !images. Also added the filter code mentioned above, which will let you disable the main 'google search' in channels you wish filtered. Enjoy...

You can get it here 8)

Hopefully soon I will be able to show off the new encoding method I've devised to settle once and for all the encoding issues in this script. It just needs to be expanded upon for all languages, but it does indeed work. Stay tuned... :wink:
g
gencha
Voice
Posts: 15
Joined: Sat Feb 10, 2007 2:52 pm

Post by gencha »

First of all, great script, i love it. Although i encounter this problem with the !local search:
19:07:16 <@gencha> !local weed near alkmaar, holland
19:07:17 <@TTB005> Google | White Weed Records @ 5th Floor (ex Volksrant/PMC), Wibautstraat 150, 1019 GR Amsterdam (), Netherlands - 06 26727660<div class="ssmod2"><a href=""></a> | Ravo Holding Bv @ Otterkoog 1, 1822 BW Alkmaar, Netherlands - 072 5673232<div class="ssmod2"><a href=""></a> | De Weed @ Geerling 14-A, 1613 PG Grootebroek, Netherlands<div class="ssmod2"><a href=""></a> | Clear Spot B.V. @ Hermelijnkoog 25,
19:07:18 <@TTB005> 1822 CA Alkmaar, Netherlands - 072 5679990<div class="ssmod2"><a href=""></a>
I've also noticed it with !groups

The problem in question is the output of html markup, just to make that clear ;D
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

gencha wrote:First of all, great script, i love it. Although i encounter this problem with the !local search:
19:07:16 <@gencha> !local weed near alkmaar, holland
19:07:17 <@TTB005> Google | White Weed Records @ 5th Floor (ex Volksrant/PMC), Wibautstraat 150, 1019 GR Amsterdam (), Netherlands - 06 26727660<div class="ssmod2"><a href=""></a> | Ravo Holding Bv @ Otterkoog 1, 1822 BW Alkmaar, Netherlands - 072 5673232<div class="ssmod2"><a href=""></a> | De Weed @ Geerling 14-A, 1613 PG Grootebroek, Netherlands<div class="ssmod2"><a href=""></a> | Clear Spot B.V. @ Hermelijnkoog 25,
19:07:18 <@TTB005> 1822 CA Alkmaar, Netherlands - 072 5679990<div class="ssmod2"><a href=""></a>
solved the local issue with crufty html bits left in the reply, see below, get the fix HERE or at any v1.96 link above.
irc wrote:<speechles> !local weed near alkmaar, holland
<sp33chy> Google | White Weed Records @ 5th Floor (ex Volksrant/PMC), Wibautstraat 150, 1019 GR Amsterdam (), Netherlands - 06 26727660 | Ravo Holding Bv @ Otterkoog 1, 1822 BW Alkmaar, Netherlands - 072 5673232 | De Weed @ Geerling 14-A, 1613 PG Grootebroek, Netherlands | Clear Spot B.V. @ Hermelijnkoog 25, 1822 CA Alkmaar, Netherlands - 072 5679990
gencha wrote:I've also noticed it with !groups
If you can show me exactly what query caused the html spill-over I could solve it. Groups appears to work fine for what I've test queried.
gencha wrote:The problem in question is the output of html markup, just to make that clear ;D
Indeed, the dreaded cruft of html spill-over, hope this solves the !local issue for you. Get back to me about groups with the query your using that gives you cruft. :wink:
g
gencha
Voice
Posts: 15
Joined: Sat Feb 10, 2007 2:52 pm

Post by gencha »

This was my groups request:
19:02:11 <@gencha> !groups titan
19:02:15 <@TTB005> 8,130 Results | kern/37299: Contribution: Support for so @ http://groups.google.com/group/muc.list ... 6c9daff3aa | <tr><td> Features teen titan porn tee @ http://groups.google.com/group/gg3-myle ... porn">Teen Titan Porn</a> <nobr>Group: <a href="/group/gg3-mylexus-5 | Titan - Tactics @
19:02:16 <@TTB005> http://groups.google.com/group/rec.game ... d705b5259d
I'll install your fix and see what it does for me.
Thanks for the quick reply :)
Post Reply