Code: Select all
if {(![channel get $channel stat])} {
return 0
}
Thank you for replying.speechles wrote:Basically, if the channel isn't set +stat a return of 0 is issued. This is the problem with returning values (in this case a zero, 0) from procedures that are triggered by binds. Change it to merely a 'return'. And by the looks of skimming through that script, every single 'return 0' can be changed safely to 'return'. This should undo the "trapping" the script was doing.Code: Select all
if {(![channel get $channel stat])} { return 0 }
Code: Select all
(6) PUBM (stackable)
bind pubm <flags> <mask> <proc>
procname <nick> <user@host> <handle> <channel> <text>
Description: just like MSGM, except it's triggered by things said
on a channel instead of things /msg'd to the bot. The mask is
matched against the channel name followed by the text and can
| contain wildcards. If the proc returns 1, Eggdrop will not log
| the message that triggered this bind.
Thank you for the reply.user wrote:tcl-commands.doc:Returning 0 is the right thing to do. There must be some procs returning something else... What commands are not being logged? Try all commands, note which ones prevent logging, look up the bind (in the top of the script), find the proc triggered by the bind and take a look at the end of the proc (if you don't invoke "return", the value returned by the last command invoked will be returned - which can be pretty unpredictable in some cases)Code: Select all
(6) PUBM (stackable) bind pubm <flags> <mask> <proc> procname <nick> <user@host> <handle> <channel> <text> Description: just like MSGM, except it's triggered by things said on a channel instead of things /msg'd to the bot. The mask is matched against the channel name followed by the text and can | contain wildcards. If the proc returns 1, Eggdrop will not log | the message that triggered this bind.
Code: Select all
bind PUB -|- ${trigger}stat [namespace current]::spew
bind PUB -|- ${trigger}top10 [namespace current]::toplist
bind PUB -|- ${trigger}top20 [namespace current]::toplist
bind PUBM -|- * [namespace current]::monitor
bind CTCP -|- ACTION [namespace current]::ctcp
bind EVNT -|- save [namespace current]::save
bind TIME -|- {00 * * * *} [namespace current]::cleanupdb
Code: Select all
return "\[Top$number $type - No valuable information available for \002$channel\002\]"
and
return $output
and
return $killed
and
return $i
and
return $num\.0
and
return [expr {($secondary == 10) ? ($primary+1.0) : "$primary.$secondary"}]
at various places in the script
Code: Select all
variable statistics
array set statistics {
storage {scripts/stats/statistics1en.txt}
todaystorage {scripts/stats/tdaystatistics.txt}
allbinds {all}
helpbinds {shelp}
topbinds {top}
statbinds {stat}
placebinds {place}
todaytopbinds {ttop}
todaystatbinds {tstat}
todayplacebinds {tplace}
Code: Select all
[21:50:04] Tcl error [::statistics::totaltop]: element 1 missing from sublist " 0"
.set errorInfo
[21:51:06] #BAYO# set errorInfo
Currently: element 1 missing from sublist " 0"
Currently: while executing
Currently: "lsort -integer -increasing -index 1 $toplist"
Currently: (procedure "::statistics::top" line 93)
Currently: invoked from within
Currently: "::statistics::top $nickname $hostname $handle $channel $arguments total"
Currently: (procedure "::statistics::totaltop" line 2)
Currently: invoked from within
Currently: "::statistics::totaltop $_pub1 $_pub2 $_pub3 $_pub4 $_pub5"
Code: Select all
[21:53:51] Tcl error [::statistics::totalplace]: element 1 missing from sublist " 0"
.set errorInfo
[21:54:18] #BAYO# set errorInfo
Currently: element 1 missing from sublist " 0"
Currently: while executing
Currently: "lsort -integer -increasing -index 1 $toplist"
Currently: (procedure "::statistics::place" line 91)
Currently: invoked from within
Currently: "::statistics::place $nickname $hostname $handle $channel $arguments total"
Currently: (procedure "::statistics::totalplace" line 2)
Currently: invoked from within
Currently: "::statistics::totalplace $_pub1 $_pub2 $_pub3 $_pub4 $_pub5"
Code: Select all
15:58:29 <@CrazyCat> Ne vous taisez pas, je fais un test et j'ai besoin d'activité
15:59:37 <@CrazyCat> !top
15:59:37 <Jarvis> Top 10 by "words": #1 - CrazyCat(13/100.00%).
16:01:36 <@CrazyCat> !place
16:01:38 <Jarvis> CrazyCat takes 1 place of 1 by "words" (14) in channel #eggdrop for all time.