<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/16555" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2023-11-30T14:27:47-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/16555</id>

		<entry>
		<author><name><![CDATA[aslpls]]></name></author>
		<updated>2023-11-30T14:27:47-04:00</updated>

		<published>2023-11-30T14:27:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=112302#p112302</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=112302#p112302"/>
		<title type="html"><![CDATA[Re: Statistics.tcl  by  perpleXa      (the pubm problem)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=112302#p112302"><![CDATA[
hi all, I've tested the script also and it seem work well. All the commands working with no error.<br>I am using eggdrop 1.6.21 ..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12622">aslpls</a> — Thu Nov 30, 2023 2:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2023-11-30T11:09:11-04:00</updated>

		<published>2023-11-30T11:09:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=112301#p112301</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=112301#p112301"/>
		<title type="html"><![CDATA[Re: Statistics.tcl  by  perpleXa      (the pubm problem)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=112301#p112301"><![CDATA[
Well, I tested the script you provided:<div class="codebox"><p>Code: </p><pre><code>15:58:29 &lt;@CrazyCat&gt; Ne vous taisez pas, je fais un test et j'ai besoin d'activité15:59:37 &lt;@CrazyCat&gt; !top15:59:37 &lt;Jarvis&gt; Top 10 by "words": #1 - CrazyCat(13/100.00%).16:01:36 &lt;@CrazyCat&gt; !place16:01:38 &lt;Jarvis&gt; CrazyCat takes 1 place of 1 by "words" (14) in channel #eggdrop for all time.</code></pre></div>also tested with <em class="text-italics">!tplace</em> and <em class="text-italics">!tplace lines</em> and I hadn't any error.<br><br>I'll let the script running a few time to check if it occures later.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Thu Nov 30, 2023 11:09 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[bayo]]></name></author>
		<updated>2023-11-30T10:39:22-04:00</updated>

		<published>2023-11-30T10:39:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=112300#p112300</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=112300#p112300"/>
		<title type="html"><![CDATA[Re: Statistics.tcl  by  perpleXa      (the pubm problem)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=112300#p112300"><![CDATA[
Wonderful! I must say I'll have to add it on a seperate paste link as the forum says "<em class="text-italics"><em class="text-italics"><span style="text-decoration:underline">Your message contains 76915 characters.<br>The maximum number of allowed characters is 60000.</span></em></em>"<br><br>Meanwhile, I'll check the old version and see how it behaves. Until then, I'm posting the link code below. Good luck!!!<br><br><a href="https://paste.ec/paste/7te9nkOM#hm4gF5A1sBh9JcCg2Y1hT3cqCY8rz3IFziOiuZZ9fZ6" class="postlink">https://paste.ec/paste/7te9nkOM#hm4gF5A ... iOiuZZ9fZ6</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12958">bayo</a> — Thu Nov 30, 2023 10:39 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2023-11-29T18:38:35-04:00</updated>

		<published>2023-11-29T18:38:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=112299#p112299</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=112299#p112299"/>
		<title type="html"><![CDATA[Re: Statistics.tcl  by  perpleXa      (the pubm problem)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=112299#p112299"><![CDATA[
I had a look to the script I found @ tclarchive (version 1.0.2). None of the erroreous proc are in it, so share your actual script to let us help you.<br><br>I've a small idea but can't confirm without the script<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Wed Nov 29, 2023 6:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[bayo]]></name></author>
		<updated>2023-11-29T15:59:54-04:00</updated>

		<published>2023-11-29T15:59:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=112298#p112298</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=112298#p112298"/>
		<title type="html"><![CDATA[Re: Statistics.tcl  by  perpleXa      (the pubm problem)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=112298#p112298"><![CDATA[
Hello guys, to bring the topic back to life, I'm experiencing issues with the script and it doesn't seems to have a new, updated version so I'll ask here if possible. The question is how we can fix some of the triggers so they can work again.<br><div class="codebox"><p>Code: </p><pre><code>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></pre></div>!all {all} works<br><br>!top {top} and !ttop {ttop} doesn't work with error showing : <div class="codebox"><p>Code: </p><pre><code>[21:50:04] Tcl error [::statistics::totaltop]: element 1 missing from sublist " 0".set errorInfo[21:51:06] #BAYO# set errorInfoCurrently: element 1 missing from sublist " 0"Currently:     while executingCurrently: "lsort -integer -increasing -index 1 $toplist"Currently:     (procedure "::statistics::top" line 93)Currently:     invoked from withinCurrently: "::statistics::top $nickname $hostname $handle $channel $arguments total"Currently:     (procedure "::statistics::totaltop" line 2)Currently:     invoked from withinCurrently: "::statistics::totaltop $_pub1 $_pub2 $_pub3 $_pub4 $_pub5"</code></pre></div>!stat {stat} works<br><br>!place {place} and !tplace {tplace} doesn't work with error showing: <div class="codebox"><p>Code: </p><pre><code>[21:53:51] Tcl error [::statistics::totalplace]: element 1 missing from sublist " 0".set errorInfo[21:54:18] #BAYO# set errorInfoCurrently: element 1 missing from sublist " 0"Currently:     while executingCurrently: "lsort -integer -increasing -index 1 $toplist"Currently:     (procedure "::statistics::place" line 91)Currently:     invoked from withinCurrently: "::statistics::place $nickname $hostname $handle $channel $arguments total"Currently:     (procedure "::statistics::totalplace" line 2)Currently:     invoked from withinCurrently: "::statistics::totalplace $_pub1 $_pub2 $_pub3 $_pub4 $_pub5"</code></pre></div>!tstat {tstat} works.<br><br>Is there any chance this can be fixed? I can provide the whole code if you say so.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12958">bayo</a> — Wed Nov 29, 2023 3:59 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2009-01-21T12:04:45-04:00</updated>

		<published>2009-01-21T12:04:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87056#p87056</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87056#p87056"/>
		<title type="html"><![CDATA[Statistics.tcl  by  perpleXa      (the pubm problem)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87056#p87056"><![CDATA[
<blockquote class="uncited"><div>tcl-commands.doc:<div class="codebox"><p>Code: </p><pre><code>    (6)  PUBM (stackable)         bind pubm &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;         procname &lt;nick&gt; &lt;user@host&gt; &lt;handle&gt; &lt;channel&gt; &lt;text&gt;         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></pre></div>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)</div></blockquote>Thank you for the reply.<br><br>Commands not being logged?   I don't understand the question.  Sorry.<br><br>Perhaps I've not explained the problem and symptoms.<br>I have a script that I want to use.<br>When I enable it,  logging of regular messages in the channel  to the channel log ceases.<br>Further,  I can no longer see regular channel messages from within the partyline.<br>For channel logging, I do have the +p flag set<br>For channel monitoring via the partyline, I do have the +p flag set in console.<br>Both channel monitoring and logging work, when that script is disabled.<br>Both stop as soon as the script is enabled.<br>It is not that some commands are not being logged...  EVERYTHING is not being logged.<br><br>The script in question is already mentioned in my first post.  I didn't think I should try to post the whole script in here.<br>Should I?    <br><br><br>I did find this, in the top of the script:<div class="codebox"><p>Code: </p><pre><code>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></pre></div>if that has meaning to you.   <br>I can see what you mentioned... the    bind PUBM     part ,  but I don't know what to do with it or how to interpret it.   Sorry.<br>Does the asterisk mean that this script reacts to everything?    (sorry if that sounds dumb)<br><br>Regarding the proc s   throughout the rest of the script,  I do see that some of them include a line    "return 0"  at the end of them.<br><br>But some do not.<br>Some seem to have specific values in the  "return".<br>Could a "return 0" be added as the last line in the proc , without upsetting the operation of the script?<br><br>Text searching the script for "return"  and ignoring all the "return 0" found,<br>I find:<br><div class="codebox"><p>Code: </p><pre><code>    return "\[Top$number $type - No valuable information available for \002$channel\002\]"andreturn $outputandreturn $killedandreturn $iandreturn $num\.0andreturn [expr {($secondary == 10) ? ($primary+1.0) : "$primary.$secondary"}]at various places in the script</code></pre></div>I guess you'd have to look at the script...  I'm not doing a very good job of explaining it, I'm afraid.<br><br><br>Thank you for looking at this with me.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Wed Jan 21, 2009 12:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2009-01-21T10:44:22-04:00</updated>

		<published>2009-01-21T10:44:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87048#p87048</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87048#p87048"/>
		<title type="html"><![CDATA[Statistics.tcl  by  perpleXa      (the pubm problem)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87048#p87048"><![CDATA[
tcl-commands.doc:<div class="codebox"><p>Code: </p><pre><code>    (6)  PUBM (stackable)         bind pubm &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;         procname &lt;nick&gt; &lt;user@host&gt; &lt;handle&gt; &lt;channel&gt; &lt;text&gt;         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></pre></div>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)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Wed Jan 21, 2009 10:44 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2009-01-20T11:42:41-04:00</updated>

		<published>2009-01-20T11:42:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87029#p87029</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87029#p87029"/>
		<title type="html"><![CDATA[Statistics.tcl  by  perpleXa      (the pubm problem)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87029#p87029"><![CDATA[
<blockquote class="uncited"><div><div class="codebox"><p>Code: </p><pre><code>if {(![channel get $channel stat])} {   return 0}</code></pre></div>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.</div></blockquote>Thank you for replying.<br><br>I am a bit confused though.    From what I previously read here:<br><a href="http://forum.egghelp.org/viewtopic.php?p=86959#86959" class="postlink">http://forum.egghelp.org/viewtopic.php?p=86959#86959</a><br>"return 0"    IS what is needed.<br><br>But, as an experiment anyway,  I have tried what you suggested.<br>I edited the .tcl script.<br>Text searched for      'return 0'         , and changed every instance to  simply 'return' .<br><br>Loaded bot.<br>With .chanset -stat   ,     +p in console and I can monitor traffic in the channel,  same as before.<br>With .chanset +stat ,  and still +p in console,   I cannot...  same as before<br><br>In other words,   no change.   <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad">              Editing the 'return 0' instances to 'return'   did not fix it.<br><br>I do appreciate your time in this though.     Or anyone else that can comment here and help,  as I'd like to get this script fixed.<br><br>Do you (or anyone else)  have further suggestions for me to try next?<br><br>Thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Tue Jan 20, 2009 11:42 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2009-01-19T20:21:09-04:00</updated>

		<published>2009-01-19T20:21:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87013#p87013</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87013#p87013"/>
		<title type="html"><![CDATA[Statistics.tcl  by  perpleXa      (the pubm problem)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87013#p87013"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>if {(![channel get $channel stat])} {   return 0}</code></pre></div>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.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Mon Jan 19, 2009 8:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2009-01-18T17:36:50-04:00</updated>

		<published>2009-01-18T17:36:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86979#p86979</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86979#p86979"/>
		<title type="html"><![CDATA[Statistics.tcl  by  perpleXa      (the pubm problem)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86979#p86979"><![CDATA[
Hello,<br>I hope this is the right place for this.<br><br>This is about Statistics.tcl by perplexa.<br>Can be found here: <a href="http://www.egghelp.org/cgi-bin/tcl_archive.tcl?mode=download&amp;id=1079" class="postlink">http://www.egghelp.org/cgi-bin/tcl_arch ... ad&amp;id=1079</a><br><br><br>Discovered that scripts can cause channel monitoring via console with +p flag, and channel logging of all traffic with the +p flag,  can be interferred with (stopped)  by some scripts.<br><br>I do not know .tcl scripting myself.    <br><br>Inititally found mention of the problem here: <a href="http://forum.egghelp.org/viewtopic.php?t=12824&amp;highlight=logging+channel+message" class="postlink">http://forum.egghelp.org/viewtopic.php? ... el+message</a><br>see the post(s) by nml375    Posted: Tue Dec 12, 2006 <br><br>I found that xchannel will cause it.<br><br>Then, stumbled into some help with it here:<br><a href="http://forum.egghelp.org/viewtopic.php?p=86959#86959" class="postlink">http://forum.egghelp.org/viewtopic.php?p=86959#86959</a><br>I'd actually given up on it,  since I can't work on it myself.<br>This was sort of accidental in this thread.    (much thanks to "user"!")<br><br>Now I have discovered the same problem again, with Statistics.tcl by perplexa.<br>If I simply shut it off via .chanset,  then console viewing of the channel traffic returns.   I'm sure it is the Statistics.tcl script.<br><br>Would anyone that knows .tcl be able to look at the Statistics script and let me know if it is fixable (without causing other problems) ?<br>and if so,  how and where to edit it?<br><br>Thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Sun Jan 18, 2009 5:36 pm</p><hr />
]]></content>
	</entry>
	</feed>
