<?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/7405" />

	<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>2004-05-06T18:29:57-04:00</updated>

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

		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2004-05-06T18:29:57-04:00</updated>

		<published>2004-05-06T18:29:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36163#p36163</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36163#p36163"/>
		<title type="html"><![CDATA[looking for this word counting script that auto voices.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36163#p36163"><![CDATA[
Replace the wordsLeft proc and add the msg bind:<div class="codebox"><p>Code: </p><pre><code>bind msg - !words [namespace current]::wordsLeftbind pub - !words [namespace current]::wordsLeftproc wordsLeft {n u h args} {variable countvariable limitif {[scan [join $args] %s%s c t]&lt;1||![validchan $c]} returnif {[info exists t]} {set u [getchanhost $t]} {set t $n}if {![onchan $t $c]||![info exists count($c,$u)]||[isvoice $t $c]} returnset i [expr {$limit-[scan $count($c,$u) %*i,%i]}]puthelp "PRIVMSG $n :[expr {$n==$t?"You have":"$t has"}] $i word[expr {$i==1?"":"s"}] to go."}</code></pre></div>When requesting the count by private message, the first argument must be a channel name...<br>'/msg #chan !words ?nick?' or '/msg bot !words #chan ?nick?'<br>I hate helpful error messages, so, as you've seen, if you screw up, the script will give you the silent treatment <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Thu May 06, 2004 6:29 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Mystery-X]]></name></author>
		<updated>2004-05-05T16:41:35-04:00</updated>

		<published>2004-05-05T16:41:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36141#p36141</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36141#p36141"/>
		<title type="html"><![CDATA[looking for this word counting script that auto voices.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36141#p36141"><![CDATA[
thx i've go it working :p<br>It was becaus i was an +o <br>How can i set it, that the command needs to be said private @ the bot and that the bot answers private?<br><br>Greetz Mystery-X<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4873">Mystery-X</a> — Wed May 05, 2004 4:41 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2004-05-05T07:25:37-04:00</updated>

		<published>2004-05-05T07:25:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36130#p36130</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36130#p36130"/>
		<title type="html"><![CDATA[looking for this word counting script that auto voices.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36130#p36130"><![CDATA[
I don't get it...it should work. Are you by any chance +v/+o in the channel you're testing it from? The script doesn't count words spoken by +v/+o users.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Wed May 05, 2004 7:25 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Mystery-X]]></name></author>
		<updated>2004-05-05T01:51:50-04:00</updated>

		<published>2004-05-05T01:51:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36126#p36126</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36126#p36126"/>
		<title type="html"><![CDATA[looking for this word counting script that auto voices.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36126#p36126"><![CDATA[
This is what i do and what i get :<br><div class="codebox"><p>Code: </p><pre><code>[07:42] &lt;[Sp4wn]&gt; testing 1 2 3[07:42] &lt;[Sp4wn]&gt; testing 1 2 3[07:42] &lt;[Sp4wn]&gt; bla bla bla[07:42] &lt;[Sp4wn]&gt; !words [Sp4wn][07:42] &lt;[Sp4wn]&gt; !words[07:44] &lt;[Sp4wn]&gt; !words[07:44] &lt;[Sp4wn]&gt; !words[07:44] &lt;[Sp4wn]&gt; !words[07:44] &lt;[Sp4wn]&gt; !words[07:45] &lt;[Sp4wn]&gt; bla bla bla[07:45] &lt;[Sp4wn]&gt; bla bla bla[07:45] &lt;[Sp4wn]&gt; bla bla bla[07:45] &lt;[Sp4wn]&gt; bla bla bla[07:47] &lt;[Sp4wn]&gt; bla bla bla[07:47] &lt;[Sp4wn]&gt; bla bla bla[07:47] &lt;[Sp4wn]&gt; bla bla bla</code></pre></div><div class="codebox"><p>Code: </p><pre><code>[07:47] &lt;[myteddy]&gt; [07:47] #[Sp4wn]# binds pub*[07:47] &lt;[myteddy]&gt; Command bindings:[07:47] &lt;[myteddy]&gt;   TYPE FLGS     COMMAND              HITS BINDING (TCL)[07:47] &lt;[myteddy]&gt;   pub  -|-      !seen                   0 pub_seen[07:47] &lt;[myteddy]&gt;   pub  -|-      !asl                    0 asl_search[07:47] &lt;[myteddy]&gt;   pub  o|-      !asldel                 0 asl_del[07:47] &lt;[myteddy]&gt;   pub  o|-      !asladd                 0 asl_add[07:47] &lt;[myteddy]&gt;   pub  -|-      !lijst                  0 pub_list[07:47] &lt;[myteddy]&gt;   pub  o|o      !zwijg                  0 pub_shutup[07:47] &lt;[myteddy]&gt;   pub  o|o      !spreek                 0 pub_speak[07:47] &lt;[myteddy]&gt;   pub  o|o      !vergeet                0 pub_forget[07:47] &lt;[myteddy]&gt;   pub  o|o      !leer                   0 pub_teach[07:47] &lt;[myteddy]&gt;   pub  -|-      !words                  6 ::talkIsCheap::wordsLeft[07:47] &lt;[myteddy]&gt;   pubm -|-      *                       3 pubm_search[07:47] &lt;[myteddy]&gt;   pubm -|-      *                      10 ::talkIsCheap::count</code></pre></div>Loaded scripts are :<br><div class="codebox"><p>Code: </p><pre><code>source scripts/alltools.tclsource scripts/action.fix.tclsource scripts/teach.tclsource scripts/asl.tclsource scripts/seen5.5.4.tcl# source scripts/mc.idledemode.tcl# source scripts/count.tclsource scripts/talkIsCheap.tcl</code></pre></div>what am I doing wrong <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"> do.<br>I also tried <br><div class="codebox"><p>Code: </p><pre><code>source scripts/alltools.tclsource scripts/action.fix.tcl# source scripts/teach.tcl# source scripts/asl.tcl# source scripts/seen5.5.4.tcl# source scripts/mc.idledemode.tcl# source scripts/count.tclsource scripts/talkIsCheap.tcl</code></pre></div>If ya need mor info, just ask <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4873">Mystery-X</a> — Wed May 05, 2004 1:51 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2004-05-04T18:51:55-04:00</updated>

		<published>2004-05-04T18:51:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36117#p36117</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36117#p36117"/>
		<title type="html"><![CDATA[No error?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36117#p36117"><![CDATA[
I tried the script once more now and it seems to work just fine. Are you running any other scripts that might be blocking the messages? Check '.binds pubm' to verify that the bind is created and that the hitcount is over 0. And make sure you speak some words (after loading the script) before trying the trigger. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Tue May 04, 2004 6:51 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2004-05-04T16:42:09-04:00</updated>

		<published>2004-05-04T16:42:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36113#p36113</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36113#p36113"/>
		<title type="html"><![CDATA[looking for this word counting script that auto voices.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36113#p36113"><![CDATA[
&lt;snip&gt;<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Tue May 04, 2004 4:42 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Mystery-X]]></name></author>
		<updated>2004-05-04T16:27:04-04:00</updated>

		<published>2004-05-04T16:27:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36111#p36111</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36111#p36111"/>
		<title type="html"><![CDATA[looking for this word counting script that auto voices.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36111#p36111"><![CDATA[
I made this of it:<br><div class="codebox"><p>Code: </p><pre><code>namespace eval talkIsCheap {    # When a person has spoken 500 words without being idle    # for more than 10 minutes, he/she is rewarded a voice.    # The voice is lost if idle for more than 10 minutes.    # - Unless you change the following settings:    variable limit 500;# words    variable idle 10;# minutes        # change the mask or add more binds if you need it to    # work in other channels:    bind pubm - "*" [namespace current]::count        # public command to get the number of words left for    # yourself or the given person:    bind pub - !words [namespace current]::wordsLeft    # the timer checking for idlers    bind time - * [namespace current]::devoice        # variable for keeping track of user counts    variable count        # the counting proc (called when someone speaks)    proc count {n u h c s} {       variable limit       variable count       if {[isvoice $n $c]||[isop $n $c]} {          if {[info exists count($c,$u)]} {set count($c,$u) [clock sec],$limit}          return       }       if {[info exists count($c,$u)]} {scan $count($c,$u) %*i,%i a} {set a 0}       set a [expr {$a+1+[regexp -all {[ \t,]+} $s]}]       if {$a&gt;=$limit} {          set count($c,$u) [clock sec],$limit          pushmode $c +v $n       } {          set count($c,$u) [clock sec],$a       }    }        # the devoice proc (run once every minute)    proc devoice args {       variable idle       variable count       set t [expr {[clock sec]-$idle*60}]       foreach {e v} [array get count] {          if {[scan $v %i]&lt;$t} {             unset count($e)             scan $e {%[^,],%s} c u             if {![validchan $c]} continue             foreach n [chanlist $c] {                if {[getchanhost $n $c]==$u&amp;&amp;[isvoice $n $c]&amp;&amp;![isop $n $c]} {                   pushmode $c -v $n                }             }          }       }    }        # the public counter display (by user request)    proc wordsLeft {n u h c a} {       if {$a!=""} {          if {[onchan $a $c]} {             set n $a             set u [getchanhost $n $c]          } else return       }       variable count       if {![isvoice $n $c]&amp;&amp;[info exists count($c,$u)]} {          variable limit          set words [expr {$limit-[scan $count($c,$u) %*i,%i]}]          set s [expr {$words==1?"":"s"}]          puthelp "PRIVMSG $c :$n has to speak $words more word$s to get voiced."       }    } }</code></pre></div>even setting bind pubm - "*" [namespace current]::count <br>to bind pubm - "#myteddy *" [namespace current]::count<br>didn't work, what i'm i doing wrong.<br><br>loading the script in eggdrop on shell with <br>source scripts/talkIsCheap.tcl<br><br><br><br>Greetz Mystery-X<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4873">Mystery-X</a> — Tue May 04, 2004 4:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2004-05-04T16:03:57-04:00</updated>

		<published>2004-05-04T16:03:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36110#p36110</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36110#p36110"/>
		<title type="html"><![CDATA[looking for this word counting script that auto voices.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36110#p36110"><![CDATA[
Did you change the bind before loading the script? (to "#myteddy *") Did you talk before doing '!wordsLeft'? (doing the command doesn't count as talking) Changing the command is as easy as changing the bind and restarting your bot.<br><br>The script doesn't answer if there's no record of you speaking in the last X minutes. And it only keeps track of words spoken in channels matching the bind mask. I was under the impression this was for a particular channel, but you can change the mask to "*" if you want the script to work in all channels or add more binds if you want several channels but not all.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Tue May 04, 2004 4:03 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Mystery-X]]></name></author>
		<updated>2004-05-04T15:43:16-04:00</updated>

		<published>2004-05-04T15:43:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36107#p36107</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36107#p36107"/>
		<title type="html"><![CDATA[looking for this word counting script that auto voices.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36107#p36107"><![CDATA[
i used !wordsLeft but don't seems to work?<br>my channel is myteddy and is there a way to change command?<br>what i'm i doing wrong?<br><br>Greetz Mystery-X<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4873">Mystery-X</a> — Tue May 04, 2004 3:43 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2004-05-04T02:51:01-04:00</updated>

		<published>2004-05-04T02:51:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36089#p36089</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36089#p36089"/>
		<title type="html"><![CDATA[looking for this word counting script that auto voices.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36089#p36089"><![CDATA[
there was a missing ] (fixed now)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Tue May 04, 2004 2:51 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Mystery-X]]></name></author>
		<updated>2004-05-04T01:51:14-04:00</updated>

		<published>2004-05-04T01:51:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36088#p36088</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36088#p36088"/>
		<title type="html"><![CDATA[looking for this word counting script that auto voices.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36088#p36088"><![CDATA[
thx for this script, only one question.<br>i've got this error<br><br>[07:49] &lt;[myteddy]&gt; [07:49] Tcl error [::talkIsCheap::count]: missing close-bracket<br><br>i don't got a clue what it is :$<br><br>Greetz Mystery-X<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4873">Mystery-X</a> — Tue May 04, 2004 1:51 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2004-05-04T02:50:02-04:00</updated>

		<published>2004-05-03T21:06:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36085#p36085</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36085#p36085"/>
		<title type="html"><![CDATA[looking for this word counting script that auto voices.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36085#p36085"><![CDATA[
I was bored, so I gave it a shot...I tested it once, so I guess it'll work <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br>The script keeps track of people by their complete user@host, so it may become a bit confused if the people competing for voice are clones ;P<div class="codebox"><p>Code: </p><pre><code>namespace eval talkIsCheap {# When a person has spoken 500 words without being idle# for more than 10 minutes, he/she is rewarded a voice.# The voice is lost if idle for more than 10 minutes.# - Unless you change the following settings:variable limit 500;# wordsvariable idle 10;# minutes# change the mask or add more binds if you need it to# work in other channels:bind pubm - "#get_clue *" [namespace current]::count# public command to get the number of words left for# yourself or the given person:bind pub - !wordsLeft [namespace current]::wordsLeft# the timer checking for idlersbind time - * [namespace current]::devoice# variable for keeping track of user countsvariable count# the counting proc (called when someone speaks)proc count {n u h c s} {variable limitvariable countif {[isvoice $n $c]||[isop $n $c]} {if {[info exists count($c,$u)]} {set count($c,$u) [clock sec],$limit}return}if {[info exists count($c,$u)]} {scan $count($c,$u) %*i,%i a} {set a 0}set a [expr {$a+1+[regexp -all {[ \t,]+} $s]}]if {$a&gt;=$limit} {set count($c,$u) [clock sec],$limitpushmode $c +v $n} {set count($c,$u) [clock sec],$a}}# the devoice proc (run once every minute)proc devoice args {variable idlevariable countset t [expr {[clock sec]-$idle*60}]foreach {e v} [array get count] {if {[scan $v %i]&lt;$t} {unset count($e)scan $e {%[^,],%s} c uif {![validchan $c]} continueforeach n [chanlist $c] {if {[getchanhost $n $c]==$u&amp;&amp;[isvoice $n $c]&amp;&amp;![isop $n $c]} {pushmode $c -v $n}}}}}# the public counter display (by user request)proc wordsLeft {n u h c a} {if {$a!=""} {if {[onchan $a $c]} {set n $aset u [getchanhost $n $c]} else return}variable countif {![isvoice $n $c]&amp;&amp;[info exists count($c,$u)]} {variable limitset words [expr {$limit-[scan $count($c,$u) %*i,%i]}]set s [expr {$words==1?"":"s"}]puthelp "PRIVMSG $c :$n has to speak $words more word$s to get voiced."}}}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Mon May 03, 2004 9:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Mystery-X]]></name></author>
		<updated>2004-05-03T16:41:04-04:00</updated>

		<published>2004-05-03T16:41:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36081#p36081</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36081#p36081"/>
		<title type="html"><![CDATA[looking for this word counting script that auto voices.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36081#p36081"><![CDATA[
Hi i'm looking for a script that counts the words that a chatter says<br>like this : Hello i'm john<br>this would give an count of 3<br>When it reaches 500 words not sentenses it rewards the user with an +voice.<br>And including an commands so i can request how many words remaining beforce +voice.<br>And including an anti idle script so if an user idles 10min it will lose it's +voice<br><br>Anyone that can help me?<br>Sorry for my bad english<br><br>Greetz Mystery-X<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4873">Mystery-X</a> — Mon May 03, 2004 4:41 pm</p><hr />
]]></content>
	</entry>
	</feed>
