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

	<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>2012-06-15T11:31:49-04:00</updated>

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

		<entry>
		<author><name><![CDATA[sapo]]></name></author>
		<updated>2012-06-15T11:31:49-04:00</updated>

		<published>2012-06-15T11:31:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99605#p99605</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99605#p99605"/>
		<title type="html"><![CDATA[my tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99605#p99605"><![CDATA[
try this tcl, it works fine for me:<div class="codebox"><p>Code: </p><pre><code>####################################################                                              ####             I d l E   T o o l Z              ####                                              ######  ##  ##  ##  ##  ##  ##  ##  ##  ##  ##  ######                                              ####     This script has a objective to take of   ####   op/voice to persons with superior idle     ####   value pre-defined. When the ppl lose the   ####   idle the script give it back the taken     ####   mode. This script it's configurated by     ####   console.                                   ####                                              ######  ##  ##  ##  ##  ##  ##  ##  ##  ##  ##  ######                                              ####                  e-mail:      mafiaz@gmx.net ####                  irc: MafiaZ @ irc.ptnet.org #########################################################################################################################  Settings  #################### Sets auto/off (1/0) check idleset itz_timer_on_off "1"# Interval between verifications of idle, in minutesset itz_between_checkz "3"# Maximum idle that a op/voice can have, in minutesset itz_max_idle "30"# Channels to look idle; leave "ALL" to look for in allset itz_check_channels "#Palmela"# It does not verify bots (1 not verify; 0 verify)set itz_not_check_botz "0"# List of nicks that they are not verifiedset itz_exclude_nicks "Info Palmeloa Abafado"################  End of Settings  ############################################################################################################################## Do NOT edit anything HERE! ###########set itz_list_of_voicez {}set itz_list_of_opz {}proc itz_lista {hand idx args} {global itz_list_of_opz itz_list_of_voicezputcmdlog "#$hand# idlelist of ¬IdleToolZ¬"putdcc $idx "¬Ops:¬"foreach n $itz_list_of_opz {set nk [lindex $n [expr 0]]set ch [lindex $n [expr 1]]putdcc $idx "&gt;&gt;  $nk  ($ch)"}putdcc $idx "¬Voices:¬"foreach n $itz_list_of_voicez {set nk [lindex $n [expr 0]]set ch [lindex $n [expr 1]]putdcc $idx "&gt;&gt;  $nk  ($ch)"}}proc itz_set_ii {hand idx args} {global itz_between_checkzset itz_between_checkz $argsputcmdlog "#$hand# setinterval of ¬IdleToolZ¬"putdcc $idx "Time between idle checks is set to:  $args "}proc itz_set_is {hand idx args} {global itz_timer_on_offset itz_timer_on_off $argsputcmdlog "#$hand# setidlestatus of ¬IdleToolZ¬"if {$itz_timer_on_off == 1} {putdcc $idx "Check idle status:  AUTO "itz_run_timer} else {putdcc $idx "Check idle status:  OFF "}}proc itz_set_mi {hand idx args} {global itz_max_idleset itz_max_idle $argsputcmdlog "#$hand# setmaxidle of ¬IdleToolZ¬"putdcc $idx "Max idle is set to:  $args "}proc itz_set_cc {hand idx args} {global itz_check_channelsputcmdlog "#$hand# setidlechans of ¬IdleToolZ¬"if {[string tolower $args] == "all"} {set res "ALL"} else {set res ""foreach ch $args {set res "$res $ch"}}set itz_check_channels $resputdcc $idx "Check channels is set to:  $itz_check_channels "}proc itz_add_en {hand idx args} {global itz_exclude_nicksputcmdlog "#$hand# addexclnick of ¬IdleToolZ¬"if {[llength $args] &gt;= 0} {set tmp [join $args " "]set itz_exclude_nicks "$tmp $itz_exclude_nicks"}putdcc $idx "Exclude nicks is set to:  $itz_exclude_nicks "}proc itz_rem_en {hand idx args} {global itz_exclude_nicksputcmdlog "#$hand# remexclnick of ¬IdleToolZ¬"set res ""foreach item $itz_exclude_nicks {if {[lsearch [string tolower [join $args " "]] [string tolower $item]] &lt; 0} {set res "$res$item "}}set itz_exclude_nicks $resputdcc $idx "Exclude nicks is set to:  $itz_exclude_nicks "}proc itz_rem_all_en {hand idx args} {global itz_exclude_nicksputcmdlog "#$hand# remallexclnick of ¬IdleToolZ¬"set itz_exclude_nicks ""putdcc $idx "Exclude nicks is set to:  $itz_exclude_nicks "}proc itz_get_ii {hand idx args} {global itz_between_checkzputcmdlog "#$hand# getinterval of ¬IdleToolZ¬"putdcc $idx "Time between idle checks is:  $itz_between_checkz "}proc itz_get_mi {hand idx args} {global itz_max_idleputcmdlog "#$hand# getmaxidle of ¬IdleToolZ¬"putdcc $idx "Max idle is:  $itz_max_idle "}proc itz_get_cc {hand idx args} {global itz_check_channelsputcmdlog "#$hand# getidlechans of ¬IdleToolZ¬"putdcc $idx "Check channels is:  $itz_check_channels "}proc itz_get_en {hand idx args} {global itz_exclude_nicksputcmdlog "#$hand# getexclnicks of ¬IdleToolZ¬"putdcc $idx "Exclude nicks is:  $itz_exclude_nicks "}proc itz_get_all {hand idx args} {global itz_between_checkz itz_max_idle itz_check_channels itz_exclude_nicks itz_timer_on_offputcmdlog "#$hand# getidleall of ¬IdleToolZ¬"if {$itz_timer_on_off == 1} {putdcc $idx "Check idle status:  AUTO "} else {putdcc $idx "Check idle status:  OFF "}putdcc $idx "Time between idle checks:  $itz_between_checkz "putdcc $idx "Max idle:  $itz_max_idle "putdcc $idx "Check channels is:  $itz_check_channels "putdcc $idx "Exclude nicks:  $itz_exclude_nicks "}proc itz_run_timer {} {global itz_timer_on_off itz_between_checkzif {(![string match "*itz_whois_engine*" [timers]]) &amp;&amp; ($itz_timer_on_off == 1)} {timer $itz_between_checkz itz_whois_engine}}proc itz_checkidle {hand idx args} {putcmdlog "#$hand# checkidle of ¬IdleToolZ¬"itz_whois_engine}proc itz_idlehelp {hand idx args} {putcmdlog "#$hand# idlehelp of ¬IdleToolZ¬"putdcc $idx "¬ Help of  Idle ToolZ : ¬"putdcc $idx " checkidle  - Checks for people width idle;"putdcc $idx " setidlestatus  (owners only) - Set  auto / off  ( 0 / 1 ) check idle;"putdcc $idx " idlelist  - List of the people who are in idle and had lost op/voice;"putdcc $idx " getidleall  - List of all the configurations;"putdcc $idx " setinterval  (owners only) - Sets interval between verifications of idle, in minutes;"putdcc $idx " setmaxidle  (owners only) - Sets maximum idle that a op/voice can have, in minutes;"putdcc $idx " setidlechans  (owners only) - Sets channels to look idle; leave \"ALL\" to look for in all;"putdcc $idx " addexclnick  (owners only) - Adds nicks to the list of that they are not verified;"putdcc $idx " remexclnick  (owners only) - Removes nicks of the list of that they are not verified;"putdcc $idx " remallexclnick  (owners only) - Removes all nicks of the list of that they are not verified;"putdcc $idx " getinterval  - Gets interval between verifications of idle;"putdcc $idx " getmaxidle  - Gets maximum idle that a op/voice can have;"putdcc $idx " getidlechans  - Gets channels to look idle;"putdcc $idx " getexclnicks  - List of nicks that they are not verified;"}proc itz_check {nick int argumentz} {global itz_max_idle itz_check_channels itz_list_of_opz itz_list_of_voicezset nick [lindex $argumentz 1]set lnick [string tolower $nick]set itz_idle [lindex $argumentz 2]set itz_idle_in_minutes [expr $itz_idle / 60]if {$itz_check_channels == "ALL"} {set itz_chan_temp [channels]} else {set itz_chan_temp $itz_check_channels}foreach itz_chan $itz_chan_temp {set itz_mods ""set itz_nks ""if {[onchan $lnick $itz_chan]} {set tmp "$nick $itz_chan"if {$itz_idle_in_minutes &gt; $itz_max_idle} {if {[isop $lnick $itz_chan]} {putlog " DEOP  ($itz_chan):  $nick  - Idle: $itz_idle_in_minutes minutes"set itz_mods "$itz_mods-o"set itz_nks "$itz_nks $lnick"if {[lsearch $itz_list_of_opz $tmp] == -1} {lappend itz_list_of_opz $tmp}}if {[isvoice $lnick $itz_chan]} { putlog " DEVOICE  ($itz_chan):  $nick  - Idle: $itz_idle_in_minutes minutes"set itz_mods "$itz_mods-v"set itz_nks "$itz_nks $lnick"if {[lsearch $itz_list_of_voicez $tmp] == -1} {lappend itz_list_of_voicez $tmp}}} else {set pos [lsearch $itz_list_of_opz $tmp]if {$pos != -1} {if {$itz_idle_in_minutes &lt; $itz_max_idle} {putlog " OP  ($itz_chan):  $nick  - Idle: $itz_idle_in_minutes minutes"set itz_mods "$itz_mods+o"set itz_nks "$itz_nks $lnick"set itz_list_of_opzt {}foreach n $itz_list_of_opz {if {$n != $tmp} {lappend itz_list_of_opzt $n}}set itz_list_of_opz {}foreach n $itz_list_of_opzt {lappend itz_list_of_opz $n}}}set pos [lsearch $itz_list_of_voicez $tmp]if {$pos != -1} {if {$itz_idle_in_minutes &lt; $itz_max_idle} {putlog " VOICE  ($itz_chan):  $nick  - Idle: $itz_idle_in_minutes minutes"set itz_mods "$itz_mods+v"set itz_nks "$itz_nks $lnick"set itz_list_of_voicezt {}foreach n $itz_list_of_voicez {if {$n != $tmp} {lappend itz_list_of_voicezt $n}}set itz_list_of_voicez {}foreach n $itz_list_of_voicezt {lappend itz_list_of_voicez $n}}}}putserv "MODE $itz_chan $itz_mods $itz_nks"}}}proc itz_whois_engine {} {global itz_check_channels botnick itz_not_check_botz itz_list_of_opz itz_list_of_voicez itz_exclude_nicksif {$itz_check_channels == "ALL"} {set itz_chan_temp [channels]} else {set itz_chan_temp $itz_check_channels}set tmp_ch [join $itz_chan_temp " "]putlog "Checking for idle:  $tmp_ch "foreach itz_chan $itz_chan_temp {foreach coisa [chanlist $itz_chan] { if {[isop $coisa $itz_chan] || [isvoice $coisa $itz_chan]} {set pos [lsearch [string tolower $itz_exclude_nicks] [string tolower $coisa]]if {$itz_not_check_botz == 1} {if {(![matchattr [nick2hand $coisa $itz_chan] b]) &amp;&amp; ($coisa != $botnick) &amp;&amp; ($pos == -1)} {putserv "WHOIS $coisa $coisa"}}if {$itz_not_check_botz == 0} {if {$coisa != $botnick &amp;&amp; ($pos == -1)} {putserv "WHOIS $coisa $coisa"}}} } }set itz_list_of_opzt {}foreach n $itz_list_of_opz {set nk [lindex $n 0]if {[onchan $nk [lindex $n 1]]} {putserv "WHOIS $nk $nk"lappend itz_list_of_opzt $n}}set itz_list_of_opz {}foreach n $itz_list_of_opzt {lappend itz_list_of_opz $n}set itz_list_of_voicezt {}foreach n $itz_list_of_voicez {set nk [lindex $n 0]if {[onchan $nk [lindex $n 1]]} {putserv "WHOIS $nk $nk"lappend itz_list_of_voicezt $n}}set itz_list_of_voicez {}foreach n $itz_list_of_voicezt {lappend itz_list_of_voicez $n}itz_run_timer}itz_run_timerbind dcc -|- checkidle itz_checkidlebind dcc n setinterval itz_set_iibind dcc n setmaxidle itz_set_mibind dcc n setidlechans itz_set_ccbind dcc n addexclnick itz_add_enbind dcc n remexclnick itz_rem_enbind dcc n remallexclnick itz_rem_all_enbind dcc n setidlestatus itz_set_isbind dcc -|- idlelist itz_listabind dcc -|- getinterval itz_get_iibind dcc -|- getmaxidle itz_get_mibind dcc -|- getidlechans itz_get_ccbind dcc -|- getexclnicks itz_get_enbind dcc -|- getidleall itz_get_allbind dcc -|- idlehelp itz_idlehelpbind raw - 317 itz_checkputlog "IdlE ToolZ loaded"putlog "Type  .idlehelp  for more help. "################### END OF FILE ####################################################################</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12014">sapo</a> — Fri Jun 15, 2012 11:31 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Amr]]></name></author>
		<updated>2012-06-06T14:21:48-04:00</updated>

		<published>2012-06-06T14:21:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99571#p99571</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99571#p99571"/>
		<title type="html"><![CDATA[deop/devoice on idle]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99571#p99571"><![CDATA[
It's deoping now after the command , but it's deopping the exempt users.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9309">Amr</a> — Wed Jun 06, 2012 2:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2012-06-06T08:30:32-04:00</updated>

		<published>2012-06-06T08:30:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99566#p99566</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99566#p99566"/>
		<title type="html"><![CDATA[deop/devoice on idle]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99566#p99566"><![CDATA[
If there had been an op/voice idle more than the time you've set then it would do the deop or deop and devoice if it's the case.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Wed Jun 06, 2012 8:30 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Amr]]></name></author>
		<updated>2012-06-06T06:48:41-04:00</updated>

		<published>2012-06-06T06:48:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99563#p99563</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99563#p99563"/>
		<title type="html"><![CDATA[deop/devoice on idle]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99563#p99563"><![CDATA[
here is the output;<br><div class="codebox"><p>Code: </p><pre><code>.tcl idlemode::idleTimeTcl:</code></pre></div>with no reaction on the channel from the bot.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9309">Amr</a> — Wed Jun 06, 2012 6:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2012-06-06T00:23:36-04:00</updated>

		<published>2012-06-06T00:23:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99558#p99558</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99558#p99558"/>
		<title type="html"><![CDATA[deop/devoice on idle]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99558#p99558"><![CDATA[
For some reason I still can't see the cron nor the time bind in the <em class="text-italics">.binds</em> list while the bind is in a namespace, thus explains why nothing happens. This needs more testing. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"><br><br>If you got .tcl active in telnet with the bot then do <em class="text-italics">.tcl idlemode::idleTime</em><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Wed Jun 06, 2012 12:23 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Amr]]></name></author>
		<updated>2012-06-05T15:19:29-04:00</updated>

		<published>2012-06-05T15:19:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99555#p99555</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99555#p99555"/>
		<title type="html"><![CDATA[deop/devoice on idle]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99555#p99555"><![CDATA[
I got no reaction from the bot after the last editing.<br>btw how to force it to run the scan by my request.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9309">Amr</a> — Tue Jun 05, 2012 3:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2012-06-05T06:25:00-04:00</updated>

		<published>2012-06-05T06:25:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99546#p99546</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99546#p99546"/>
		<title type="html"><![CDATA[deop/devoice on idle]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99546#p99546"><![CDATA[
Drop the ". Apart that, any issues so far?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Tue Jun 05, 2012 6:25 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Amr]]></name></author>
		<updated>2012-06-05T02:45:35-04:00</updated>

		<published>2012-06-05T02:45:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99545#p99545</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99545#p99545"/>
		<title type="html"><![CDATA[deop/devoice on idle]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99545#p99545"><![CDATA[
I'm adding users like this .chanset #chan idleExempt "user1 user2 3 4 5 6 7 8 9 10"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9309">Amr</a> — Tue Jun 05, 2012 2:45 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2012-06-05T00:18:12-04:00</updated>

		<published>2012-06-05T00:18:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99541#p99541</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99541#p99541"/>
		<title type="html"><![CDATA[deop/devoice on idle]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99541#p99541"><![CDATA[
Meh, I'll stop replying on forum at late hours as apparently I screw things up. Will try to test the code and return later on.<br><br>Edit: Here is the code I've tested and it's working fine. I haven't waited 10 minutes to see if the time bind is called, just forced it to run at my request. How did you add users in the except list? Could you provide an example?<div class="codebox"><p>Code: </p><pre><code>namespace eval idlemode {setudef flag idleModesetudef str idleExemptsetudef int idleTimebind time {?0 *} [namespace current]::idleTimeproc idleTime {args} {foreach chan [channels] {if {![channel get $chan idleMode]} continuetimedCheck $chan}}proc timedCheck {chan} {variable idleswitch -- [catch {botisop $chan} err] {"0" {if {!$err} {putlog "idleMode error: I'm not oped in $chan channel."return}}"1" {putlog "idleMode error: $chan channel is not valid."return}}set users [string tolower [lrange [chanlist $chan] 1 end]]set except [string tolower [channel get $chan idleExempt]]set time [channel get $chan idleTime]foreach user $users {if {[lsearch -exact $except $user] != -1} continue if {[isop $user $chan]} {lappend checkList $user:1}if {[isvoice $user $chan]} {if {[info exists checkList]} {set pos [lsearch -exact $checkList $user:1]if {$pos == -1} {lappend checkList $user:2} else {set checkList [lreplace $checkList $pos $pos $user:3]}} else {lappend checkList $user:2}}}if {[info exists checkList]} {foreach ele [split $checkList] {scan $ele {%[^:]:%s} user countcheckIdle $count $user $chan $time}}}proc checkIdle {mode user chan time} {set idle [getchanidle $user $chan]if {$idle &gt;= $time} {switch -- $mode {"1" {pushmode $chan -o $userputlog "idleMode: deoped $user in $chan cos was idle for $idle minutes"}"2" {pushmode $chan -v $userputlog "idleMode: devoiced $user in $chan cos was idle for $idle minutes"}"3" {puthelp "MODE $chan -ov $user $user"putlog "idleMode: deoped and devoiced $user in $chan cos was idle for $idle minutes"}}}}}putlog "idlemode.tcl loaded..."</code></pre></div>PS: I've found and fixed a bug that occurred when the only op was an user that was in except list.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Tue Jun 05, 2012 12:18 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Amr]]></name></author>
		<updated>2012-06-04T19:38:33-04:00</updated>

		<published>2012-06-04T19:38:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99539#p99539</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99539#p99539"/>
		<title type="html"><![CDATA[deop/devoice on idle]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99539#p99539"><![CDATA[
another thing , the bot deop/devoice the users which is on the idleExempt + It will deop/devoice the users which their idle less than 60 minutes :/<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9309">Amr</a> — Mon Jun 04, 2012 7:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2012-06-04T16:33:47-04:00</updated>

		<published>2012-06-04T16:33:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99532#p99532</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99532#p99532"/>
		<title type="html"><![CDATA[deop/devoice on idle]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99532#p99532"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind time - {*/10 * * * *} [namespace current]::idleTime </code></pre></div>This is absolutely wrong. This is cron syntax. The fellow is using tcl 8.4. Cron exists in tcl 8.5. So how will a bind to time interpret the cron syntax? It won't... It will never match so will never get invoked.<br><br><a href="http://forum.egghelp.org/viewtopic.php?p=72492" class="postlink">http://forum.egghelp.org/viewtopic.php?p=72492</a><br>Perhaps you need to read this thread?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Mon Jun 04, 2012 4:33 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2012-06-04T15:30:53-04:00</updated>

		<published>2012-06-04T15:30:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99530#p99530</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99530#p99530"/>
		<title type="html"><![CDATA[deop/devoice on idle]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99530#p99530"><![CDATA[
That's cos of the time bind. Either make it:<div class="codebox"><p>Code: </p><pre><code>bind time - {*/10 * * * *} [namespace current]::idleTime </code></pre></div>or as speechles suggested:<div class="codebox"><p>Code: </p><pre><code>bind time - {?0*} [namespace current]::idleTime </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Mon Jun 04, 2012 3:30 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Amr]]></name></author>
		<updated>2012-06-04T07:05:31-04:00</updated>

		<published>2012-06-04T07:05:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99527#p99527</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99527#p99527"/>
		<title type="html"><![CDATA[deop/devoice on idle]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99527#p99527"><![CDATA[
okay the whole script is below;<br><div class="codebox"><p>Code: </p><pre><code>namespace eval idlemode {   setudef flag idleMode   setudef str idleExempt   setudef int idleTimebind time - {10*} [namespace current]::idleTimeproc idleTime {args} {      foreach chan [channels] {         if {![channel get $chan idleMode]} continue            cronCheck $chan      }   }   proc cronCheck {chan} {      variable idle      switch -- [catch {botisop $chan} err] {         "0" {            if {!$err} {               putlog "idleMode error: I'm not oped in $chan channel."               return            }         }         "1" {            putlog "idleMode error: $chan channel is not valid."            return         }      }      set users [string tolower [lrange [chanlist $chan] 1 end]]set excempt [string tolower [channel get $chan idleExempt]]set time [channel get $chan idleTime]foreach user $users {          if {[lsearch -exact $excempt $user] != -1} continue         if {[isop $user $chan]} {            lappend checkList $user:1         }         if {[isvoice $user $chan]} {            if {[info exists checkList]} {               set pos [lsearch -exact $checkList $user:1]                if {$pos == -1} {                  lappend checkList $user:2               } else {                  set checkList [lreplace $checkList $pos $pos $user:3]               }            } else {               lappend checkList $user:2            }         }      }      foreach ele [split $checkList] {         scan $ele {%[^:]:%s} user count         checkIdle $count $user $chan $time      }   }   proc checkIdle {mode user chan time} {      set idle [getchanidle $user $chan]      if {$idle &gt;= $time} {         switch -- $mode {            "1" {               pushmode $chan -o $user               putlog "idleMode: deoped $user in $chan cos was idle for $idle minutes"            }            "2" {               pushmode $chan -v $user               putlog "idleMode: devoiced $user in $chan cos was idle for $idle minutes"            }            "3" {               puthelp "MODE $chan -ov $user $user"               putlog "idleMode: deoped and devoiced $user in $chan cos was idle for $idle minutes"            }         }      }   }}putlog "idlemode.tcl loaded..."</code></pre></div>I got no errors + the bot respond after about 1 hour not 10 mins.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9309">Amr</a> — Mon Jun 04, 2012 7:05 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2012-06-04T00:33:56-04:00</updated>

		<published>2012-06-04T00:33:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99526#p99526</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99526#p99526"/>
		<title type="html"><![CDATA[deop/devoice on idle]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99526#p99526"><![CDATA[
I know speechles, hence I've asked him about the TCL version. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"> <br><br>Anyway, I would rather convert all the lists to lower case from the start by replacing:<div class="codebox"><p>Code: </p><pre><code>set users [lrange [chanlist $chan] 1 end]set excempt [channel get $chan idleExempt]set time [channel get $chan idleTime]foreach user $users {if {[lsearch -nocase $excempt $user] != -1} continue</code></pre></div>with:<div class="codebox"><p>Code: </p><pre><code>set users [string tolower [lrange [chanlist $chan] 1 end]]set excempt [string tolower [channel get $chan idleExempt]]set time [channel get $chan idleTime]foreach user $users {if {[lsearch -exact $excempt $user] != -1} continue</code></pre></div>as the string to lower conversion is made only once not repeated in a for loop, and then:<div class="codebox"><p>Code: </p><pre><code>set pos [lsearch -nocase $checkList $user:1]</code></pre></div>with:<div class="codebox"><p>Code: </p><pre><code>set pos [lsearch -exact $checkList $user:1]</code></pre></div>and it should be TCL 8.4 friendly. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Mon Jun 04, 2012 12:33 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2012-06-03T20:12:24-04:00</updated>

		<published>2012-06-03T20:12:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99525#p99525</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99525#p99525"/>
		<title type="html"><![CDATA[deop/devoice on idle]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99525#p99525"><![CDATA[
You only need to alter the "set pos" line, like I've done below:<div class="codebox"><p>Code: </p><pre><code>set pos [lsearch -exact [string tolower $checkList] [string tolower $user:1]]</code></pre></div>I should've looked ahead to see if there were more to change. That looks like the last one. <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=8138">speechles</a> — Sun Jun 03, 2012 8:12 pm</p><hr />
]]></content>
	</entry>
	</feed>
