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

	<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>2003-07-10T03:47:02-04:00</updated>

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

		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-07-10T03:47:02-04:00</updated>

		<published>2003-07-10T03:47:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=23248#p23248</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=23248#p23248"/>
		<title type="html"><![CDATA[auto-voice flood protection]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=23248#p23248"><![CDATA[
I've took the liberty to change it a bit, here is the result:<div class="codebox"><p>Code: </p><pre><code># Channels you want to auto-voice Nicks on. # Multiple channels seperated by spaces. # set av_chans "#TCLhelp #TCLlovers" set av(chans) "#cGameTesting #dGameTesting" # Set the max number of joins during the number of seconds hereset av(stuff) 3:13:7foreach chan [strlwr $av(chans)] {  if {![info exists av_ctr([strlwr $chan])] &amp;&amp; [botonchan $chan]} {    set av_ctr([strlwr $chan]) 0  }}bind join - * auto:voice proc auto:voice {nick uhost handle chan} { global av_ctr  set chan [strlwr $chan]   if {![botisop $chan]} {    return  }  if {![info exists av_ctr($chan)]} {    set av_ctr($chan) 0  }   incr av_ctr($chan)  set limit [lindex [split $::av(stuff) ":"] 0]  set insec [lindex [split $::av(stuff) ":"] 1]  set offset [lindex [split $::av(stuff) ":"] 2]  # trying to see what is happening   putserv "PRIVMSG $chan :av_ctr($chan) is $av_ctr($chan)"   utimer $insec [list av:dec $chan]   if {$av_ctr($chan) &gt;= $limit} {     return     } else {     utimer $offset [list av:voice $nick $chan]     return   } }proc av:dec {chan} {   global av_ctr  incr av_ctr($chan) -1   # trying to see what is happening   putserv "PRIVMSG $chan :av_ctr is $av_ctr($chan)" }proc av:voice {vnick vchan} {   if {[onchan $vnick $vchan] &amp;&amp; ![isvoice $vnick $vchan]} {     pushmode $vchan +v $vnick   } } </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Thu Jul 10, 2003 3:47 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dedan]]></name></author>
		<updated>2003-07-10T01:58:02-04:00</updated>

		<published>2003-07-10T01:58:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=23243#p23243</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=23243#p23243"/>
		<title type="html"><![CDATA[auto-voice flood protection]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=23243#p23243"><![CDATA[
I am trying to write a small script that <br>waits to see if there is a join flood or if <br>the nick has already been +voiced or left <br>the channel before it tries to +voice him.<br><br>Tcl error [auto:voice]: <br>syntax error in expression "$av_ctr.($chan) &gt;= $av_limit"<br><br>This script gives various errors, <br>I have made many changes without success.<br>Thank you for any help given. <br><br>  Dedan<br><div class="codebox"><p>Code: </p><pre><code># Channels you want to auto-voice Nicks on. # Multiple channels seperated by spaces.# set av_chans "#TCLhelp #TCLlovers"set av_chans "#cGameTesting #dGameTesting"# Set the Max Number of Joins hereset av_limit 3# During the Number of Seconds hereset av_sec 13# Set the Number of Seconds to wait before Voicing the Nick hereset av_offset 7bind join - * auto:voiceproc auto:voice {nick uhost handle chan} {  global botnick av_chans av_limit av_sec av_offset  set chan [string tolower $chan]  if {[botisop $chan]} {    foreach c [string tolower $av_chans] {      if {$c == $chan} {         if {![info exists av_ctr.($chan)]} { set av_ctr.($chan) 0 }        incr av_ctr.($chan) 1        # trying to see what is happening        putserv "PRIVMSG $chan :av_ctr.($chan) is $av_ctr.($chan)"        utimer $av_sec [list av:dec av_ctr.($chan)]        if {$av_ctr.($chan) &gt;= $av_limit} {           return        } else {          utimer $av_offset [list av:voice $nick $chan]          return        }      }    }  }}proc av:dec {ctr} {   incr ctr -1   # trying to see what is happening  putserv "PRIVMSG $chan :ctr is $ctr"}proc av:voice {vnick vchan} {  if {[onchan $vnick $vchan] &amp;&amp; ![isvoice $vnick $vchan]} {    pushmode $vchan +v $vnick  }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3472">Dedan</a> — Thu Jul 10, 2003 1:58 am</p><hr />
]]></content>
	</entry>
	</feed>
