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

	<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>2010-04-01T13:50:04-04:00</updated>

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

		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2010-04-01T13:50:04-04:00</updated>

		<published>2010-04-01T13:50:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=92667#p92667</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=92667#p92667"/>
		<title type="html"><![CDATA[timer]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=92667#p92667"><![CDATA[
At a first glance, there seems to be one } missing at the end. I'd recommend using the "code" BB-code tags for code, as this preserve indenting, and generally makes the code easier to read.<br><br>Also, you could easily replace all those for-loops and multiple lindex operations with a simple foreach-loop.<br><br>As for the logics, should a user be deauth'd if (s)he's idle on a single channel (even if (s)he's been active on any other), or does (s)he have to be idle on all channels?<br><br>Finally, how do you trigger the code? Timers/utimers, time binding, other event?<br><br>That said, here's a cleanup of your code sofar:<div class="codebox"><p>Code: </p><pre><code>proc auth_idle {} { global authflag foreach chan [channels] {  foreach nick [chanlist $chan $authflag] {   if {[getchanidle $nick $chan] &gt; 60 &amp;&amp; [hand2idx [nick2hand $nick]] == -1} {    putlog "$nick Idle over 60 minutes. Deauthenticated."    chattr $hand "-${authflag}"    putserv "NOTICE $nick :Idle over 60 minutes. Deauthenticated."   }  } }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Thu Apr 01, 2010 1:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dfxrick]]></name></author>
		<updated>2010-03-31T22:59:04-04:00</updated>

		<published>2010-03-31T22:59:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=92663#p92663</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=92663#p92663"/>
		<title type="html"><![CDATA[timer]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=92663#p92663"><![CDATA[
Can someone please help me out with this code? I'm having problems finding out why its not working. I dont see it. after 60 minutes of idle its supposed to remove the authflag, and it isn't, can anyone please help with this problem. u can find me on #fam or #tzirc on efnet. Please help me out. Thanks!!!<br><br><br>proc auth_idle {} {<br>global _auth authflag<br><br>set idletime 1<br> set chans [channels]<br> set chan_tot [llength $chans]<br> set chan_num 0<br> for {set loop 0} {$loop &lt; $chan_tot} {incr loop} {<br>   set nicks [chanlist [lindex $chans $loop] $authflag]<br>   set nickidle 1<br>   set nick_tot [llength $nicks]<br>    for {set loop2 0} {$loop2 &lt; $nick_tot} {incr loop2} {<br>      set idletime [getchanidle [lindex $nicks $loop2] [lindex $chans $loop]]<br>      if {$idletime &gt;= $nickidle} {set nickidle $idletime}<br>      if {($idletime &gt; 60)} {<br>                           set nick [lindex $nicks $loop2]<br>                           set hand [nick2hand [lindex $nicks $loop2]]<br>     if {[hand2idx $hand] == -1} {<br>                           putlog "$nick Idle over 60 minutes. Deauthenticated."<br>                           chattr $hand "-${authflag}"<br>                           putserv "NOTICE $nick :Idle over 60 minutes. Deauthenticated."<br>                                 }<br>                          } <br>                                                                }<br>                                                  }<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11079">dfxrick</a> — Wed Mar 31, 2010 10:59 pm</p><hr />
]]></content>
	</entry>
	</feed>
