| View previous topic :: View next topic |
| Author |
Message |
BeBoo Halfop
Joined: 26 Sep 2007 Posts: 42
|
Posted: Mon Oct 22, 2007 5:09 pm Post subject: Re: a problem |
|
|
| 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
| Quote: | | 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. |
|
| Back to top |
|
 |
vans Voice
Joined: 09 Aug 2007 Posts: 20
|
Posted: Sun Oct 28, 2007 4:03 pm Post subject: |
|
|
| Is there a way for to remove some of the searches by editing out a line or something? thanx |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Sun Oct 28, 2007 7:13 pm Post subject: |
|
|
| 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: | # 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: | Quote: | !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. |
|
| Back to top |
|
 |
vans Voice
Joined: 09 Aug 2007 Posts: 20
|
Posted: Sun Oct 28, 2007 8:03 pm Post subject: |
|
|
thank you that did it  |
|
| Back to top |
|
 |
panasonic Voice
Joined: 15 Sep 2007 Posts: 25
|
Posted: Wed Oct 31, 2007 7:26 am Post subject: |
|
|
speechless,
thank you for such a great tcl script
i've tried http://ereader.kiczek.com/UNOFFICIAL-incith-google-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  |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Wed Oct 31, 2007 7:33 am Post subject: |
|
|
| panasonic wrote: | speechless,
thank you for such a great tcl script
i've tried http://ereader.kiczek.com/UNOFFICIAL-incith-google-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  |
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. |
|
| Back to top |
|
 |
panasonic Voice
Joined: 15 Sep 2007 Posts: 25
|
Posted: Wed Oct 31, 2007 8:16 am Post subject: |
|
|
| 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..? |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Wed Oct 31, 2007 5:34 pm Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
BeBoo Halfop
Joined: 26 Sep 2007 Posts: 42
|
Posted: Sat Nov 03, 2007 10:48 pm Post subject: |
|
|
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: | # List of channels to restrict google running in
variable banned_chan "#bar #friends #majestic" |
Then search for "# call google" and put this there:
| Code: | # 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 |
|
| Back to top |
|
 |
panasonic Voice
Joined: 15 Sep 2007 Posts: 25
|
Posted: Thu Nov 08, 2007 4:59 am Post subject: |
|
|
hi! BeeBo,
i have tried as suggested but unfortunately didn't succeed
code added:
| Code: |
# List of channels to restrict google running in
variable banned_chan "#channel2"
|
i have replaced:
| Code: |
# call google
foreach line [incith::google::parse_output [google $search]] {
put_output $where "$incith::google::search_prepend$line"
}
break
}
}
|
with:
| Code: |
# 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... |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Thu Nov 08, 2007 4:10 pm Post subject: |
|
|
| panasonic wrote: | hi! BeeBo,
i have tried as suggested but unfortunately didn't succeed
code added:
| Code: |
# List of channels to restrict google running in
variable banned_chan "#channel2"
|
i have replaced:
| Code: |
# call google
foreach line [incith::google::parse_output [google $search]] {
put_output $where "$incith::google::search_prepend$line"
}
break
}
}
|
with:
| Code: |
# 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: | # 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: | # 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. |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Sun Nov 11, 2007 1:31 pm Post subject: |
|
|
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
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...  |
|
| Back to top |
|
 |
gencha Voice
Joined: 10 Feb 2007 Posts: 15
|
Posted: Thu Nov 15, 2007 2:12 pm Post subject: |
|
|
First of all, great script, i love it. Although i encounter this problem with the !local search:
| Quote: | 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 |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Thu Nov 15, 2007 6:01 pm Post subject: |
|
|
| gencha wrote: | First of all, great script, i love it. Although i encounter this problem with the !local search:
| Quote: | 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.  |
|
| Back to top |
|
 |
gencha Voice
Joined: 10 Feb 2007 Posts: 15
|
Posted: Thu Nov 15, 2007 6:59 pm Post subject: |
|
|
This was my groups request:
I'll install your fix and see what it does for me.
Thanks for the quick reply  |
|
| 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
|
|