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

	<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>2005-08-20T05:47:16-04:00</updated>

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

		<entry>
		<author><name><![CDATA[SaPrOuZy]]></name></author>
		<updated>2005-08-20T05:47:16-04:00</updated>

		<published>2005-08-20T05:47:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54545#p54545</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54545#p54545"/>
		<title type="html"><![CDATA[inactive op/voice control]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54545#p54545"><![CDATA[
that's how it was, but when it was doing this i tried doing it the way it's posted now<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4727">SaPrOuZy</a> — Sat Aug 20, 2005 5:47 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-08-20T05:45:15-04:00</updated>

		<published>2005-08-20T05:45:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54544#p54544</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54544#p54544"/>
		<title type="html"><![CDATA[inactive op/voice control]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54544#p54544"><![CDATA[
Remove the global line from outside the procs, and keep the ones inside the procs (uncomment them).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sat Aug 20, 2005 5:45 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SaPrOuZy]]></name></author>
		<updated>2005-08-20T03:14:19-04:00</updated>

		<published>2005-08-20T03:14:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54531#p54531</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54531#p54531"/>
		<title type="html"><![CDATA[inactive op/voice control]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54531#p54531"><![CDATA[
anyone figured out what's wrong with the script?<br>cause i suddenly have this prob in another script that was working!  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_eek.gif" width="15" height="15" alt=":shock:" title="Shocked"> <br>the global variables aren't keeping their values from proc to proc<br> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_exclaim.gif" width="15" height="15" alt=":!:" title="Exclamation">  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_exclaim.gif" width="15" height="15" alt=":!:" title="Exclamation"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4727">SaPrOuZy</a> — Sat Aug 20, 2005 3:14 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2005-08-18T02:04:54-04:00</updated>

		<published>2005-08-18T02:04:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54422#p54422</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54422#p54422"/>
		<title type="html"><![CDATA[inactive op/voice control]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54422#p54422"><![CDATA[
Another method can be to get the idle time using a /ctcp FINGER. However, some people change their finger ctcp replies to random texts and messages, so NOT always the idle time in seconds shows up in replies.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Thu Aug 18, 2005 2:04 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SaPrOuZy]]></name></author>
		<updated>2005-08-18T01:40:31-04:00</updated>

		<published>2005-08-18T01:40:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54421#p54421</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54421#p54421"/>
		<title type="html"><![CDATA[inactive op/voice control]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54421#p54421"><![CDATA[
thanks awyeah, i already have a script based on getchanidle,<br>i thought it gets the IRC idle time, not the chan idle time...<br>i didn't get the time to test it again,but you guys seem to be sure about it<br>anyways, regardless of the logic of my script, could anyone tell me what's wrong. why isn't it keeping the info for time_op / time_vo in all the procs.<br>i tried declaring them as global in each proc, and i tried declaring them as global outside the procs (like the code now) but in both cases it was the same.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4727">SaPrOuZy</a> — Thu Aug 18, 2005 1:40 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2005-08-17T21:16:50-04:00</updated>

		<published>2005-08-17T21:16:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54407#p54407</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54407#p54407"/>
		<title type="html"><![CDATA[inactive op/voice control]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54407#p54407"><![CDATA[
Put this in a procedure and call it every 5-10 seconds or when ever you like.<br><div class="codebox"><p>Code: </p><pre><code>if {![botisop $chan]} { return 0 }foreach user [chanlist $chan] { if {[isvoice $user $chan] &amp;&amp; ([getchanidle $user $chan] &gt;= $vo_allowed_time)} { pushmode $chan -v $user } elseif {[isop $user $chan] &amp;&amp; ([getchanidle $user $chan] &gt;= $op_allowed_time)} { pushmode $chan -o $user }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Wed Aug 17, 2005 9:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SaPrOuZy]]></name></author>
		<updated>2005-08-17T17:58:59-04:00</updated>

		<published>2005-08-17T17:58:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54397#p54397</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54397#p54397"/>
		<title type="html"><![CDATA[inactive op/voice control]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54397#p54397"><![CDATA[
it could have been a coincidence that the idle time for the chan and irc where the same for the cases i checked, i'll look more into it tomorrow <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>thanks guys.<br>if it doesn't work , i'll ask again<br>g'night opposing , and good day demond hehe<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4727">SaPrOuZy</a> — Wed Aug 17, 2005 5:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-08-17T17:55:08-04:00</updated>

		<published>2005-08-17T17:55:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54396#p54396</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54396#p54396"/>
		<title type="html"><![CDATA[inactive op/voice control]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54396#p54396"><![CDATA[
<blockquote class="uncited"><div>thanks for the quick reply, but...<br><blockquote class="uncited"><div>  getchanidle &lt;nickname&gt; &lt;channel&gt;<br>    Returns: number of minutes that person has been idle; 0 if the<br>      specified user isn't on the channel</div></blockquote>it doesn't specify that it's the idletime on the chan, and as i have noticed from using it, it returns the irc idle time.</div></blockquote>A little test on your eggdrop doesn't hurt, it returns the idle time of the user on the channel.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Wed Aug 17, 2005 5:55 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SaPrOuZy]]></name></author>
		<updated>2005-08-17T17:46:23-04:00</updated>

		<published>2005-08-17T17:46:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54395#p54395</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54395#p54395"/>
		<title type="html"><![CDATA[inactive op/voice control]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54395#p54395"><![CDATA[
thanks for the quick reply, but...<br><blockquote class="uncited"><div>  getchanidle &lt;nickname&gt; &lt;channel&gt;<br>    Returns: number of minutes that person has been idle; 0 if the<br>      specified user isn't on the channel</div></blockquote>it doesn't specify that it's the idletime on the chan, and as i have noticed from using it, it returns the irc idle time.<br><br>and i think the logic is very correct , it checks the difference between the current time, and the last time that the person said anything (or got oped)<br>if the person was already oped before the script started running, then logically the info shouldn't exist and thus it would set the time as now, and starts checking from then.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4727">SaPrOuZy</a> — Wed Aug 17, 2005 5:46 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-08-17T17:39:57-04:00</updated>

		<published>2005-08-17T17:39:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54394#p54394</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54394#p54394"/>
		<title type="html"><![CDATA[inactive op/voice control]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54394#p54394"><![CDATA[
your logic is unnecessarily complicated (and incorrect) - simply use [getchanidle], it gives you the inactivity time you need on the channel you are interested in, not the IRC idle time<br><br>also, the [bind mode] mask should be in the format "#chan +o" and similar, no need of asterisk there<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Wed Aug 17, 2005 5:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SaPrOuZy]]></name></author>
		<updated>2005-08-17T17:21:44-04:00</updated>

		<published>2005-08-17T17:21:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54391#p54391</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54391#p54391"/>
		<title type="html"><![CDATA[inactive op/voice control]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54391#p54391"><![CDATA[
hello there,<br>this script i made is getting on my nerves, i can't figure out what's wrong, <br>if anyone can take an outside look maybe you'll catch a bug that am missing.<br><br>the purpose of the script is to deop/devoice inactive users on a chan (not idle, cause they can be active in other chans, so they wouldn't be idle)<br><br><br>here's the code:<div class="codebox"><p>Code: </p><pre><code>bind pubm - * update_timersbind mode - "*+*o*" nick_got_opedbind mode - "*+*v*" nick_got_voicedbind mode - "*-*o*" nick_got_Dopedbind mode - "*-*v*" nick_got_Dvoicedset list_of_chans "#aub"set check_interval 2set op_allowed_time 180set vo_allowed_time 60global time_op time_voproc update_timers {nick uhost hand chan text } {#global time_op time_vo if {[isop $nick $chan]} {set time_op($chan,$nick) [unixtime]putlog "timer updated for $nick (+o for another 40 min) - timer is now $time_op($chan,$nick)"}if {[isvoice $nick $chan]} {set time_vo($chan,$nick) [unixtime]putlog "timer updated for $nick (+v for another 6 min)"}}proc nick_got_oped {nick uhost hand chan mode target} {#global time_op set time_op($chan,$target) [unixtime]putlog "$target just got oped , starting timer: $time_op($chan,$target)"}proc nick_got_voiced {nick uhost hand chan mode target} {#global time_vo set time_vo($chan,$target) [unixtime]putlog "$target just got voiced , starting timer: $time_vo($chan,$target)"}proc nick_got_Doped {nick uhost hand chan mode target} {#global time_op if {[info exists time_op($chan,$target)]} { unset time_op($chan,$target) }putlog "removed timer for $target (-o)"}proc nick_got_Dvoiced {nick uhost hand chan mode target} {#global time_vo if {[info exists time_vo($chan,$target)]} { unset time_vo($chan,$target) }putlog "removed timer for $target (-v)"}proc run_checking_timer { } {global list_of_chans check_interval #time_vo time_opforeach check_chan [split $list_of_chans] {putlog "Checking for inactive: \002$check_chan\002"inactive_checker $check_chan}timer $check_interval run_checking_timer}proc inactive_checker { chan } {global check_interval op_allowed_time vo_allowed_time botnick#time_vo time_op foreach usernick [chanlist $chan] {if {[isop $usernick $chan] &amp;&amp; $usernick != $botnick } {if {![info exists time_op($chan,$usernick)]} {set time_op($chan,$usernick) [unixtime]putlog "info for OP $usernick doesn't exist , setting time to $time_op($chan,$usernick)"}set inactivity_time [expr [unixtime] - $time_op($chan,$usernick)]putlog "$usernick: $inactivity_time = [unixtime] - $time_op($chan,$usernick)"if { $inactivity_time  &gt; $op_allowed_time } {putlog "Inactive OP: $usernick - time: [expr $inactivity_time / 60] mins."pushmode $chan -o $usernickunset time_op($chan,$usernick)}}if {[isvoice $usernick $chan] &amp;&amp; $usernick != $botnick } {if {![info exists time_vo($chan,$usernick)]} {set time_vo($chan,$usernick) [unixtime] }set inactivity_time [expr [unixtime] - $time_vo($chan,$usernick)]if { $inactivity_time &gt; $vo_allowed_time } {putlog "Inactive VO: $usernick - time: [expr $inactivity_time / 60] mins."pushmode $chan -v  $usernickunset time_vo($chan,$usernick)}}}}timer $check_interval run_checking_timerputlog "\[LOADED\] Inactive op/voice control - by SaPrOuZy."</code></pre></div>i have alot of putlog to try to debug it, here's the result:<blockquote class="uncited"><div>[23:49] &lt;)Profanity&gt; [16:49] Checking for inactive: #aub<br>[23:49] &lt;)Profanity&gt; [16:49] info for OP Dilemma doesn't exist , setting time to 1124311740<br>[23:49] &lt;)Profanity&gt; [16:49] Dilemma: 0 = 1124311740 - 1124311740 <br>[23:49] &lt;)Profanity&gt; [16:49] info for OP SaPrOuZy doesn't exist , setting time to 1124311740<br>[23:49] &lt;)Profanity&gt; [16:49] SaPrOuZy: 0 = 1124311740 - 1124311740<br>[23:49] &lt;)Profanity&gt; [16:49] info for OP Algorithm doesn't exist , setting time to 1124311740 <br>[23:49] &lt;)Profanity&gt; [16:49] Algorithm: 0 = 1124311740 - 1124311740<br> <br>[23:51] &lt;)Profanity&gt; [16:51] Checking for inactive: #aub<br>[23:51] &lt;)Profanity&gt; [16:51] Dilemma: 120 = 1124311860 - 1124311740<br>[23:51] &lt;)Profanity&gt; [16:51] SaPrOuZy: 120 = 1124311860 - 1124311740 <br>[23:51] &lt;)Profanity&gt; [16:51] Algorithm: 120 = 1124311860 - 1124311740<br> <br>[23:53] &lt;)Profanity&gt; [16:53] Checking for inactive: #aub<br>[23:53] &lt;)Profanity&gt; [16:53] Dilemma: 241 = 1124311981 - 1124311740<br>[23:53] &lt;)Profanity&gt; [16:53] Inactive OP: Dilemma - time: 4 mins.<br>[23:53] &lt;)Profanity&gt; [16:53] SaPrOuZy: 241 = 1124311981 - 1124311740<br>[23:53] &lt;)Profanity&gt; [16:53] Inactive OP: SaPrOuZy - time: 4 mins.<br>[23:53] &lt;)Profanity&gt; [16:53] Algorithm: 241 = 1124311981 - 1124311740 <br>[23:53] &lt;)Profanity&gt; [16:53] Inactive OP: Algorithm - time: 4 mins.<br>[23:53] &lt;)Profanity&gt; [16:53] removed timer for Dilemma (-o)<br>[23:53] &lt;)Profanity&gt; [16:53] removed timer for SaPrOuZy (-o)<br>[23:53] &lt;)Profanity&gt; [16:53] removed timer for Algorithm (-o) <br>[23:53] &lt;)Profanity&gt; [16:53] SaPrOuZy just got oped , starting timer: 1124311982  &lt;---------- it was just set here  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_exclaim.gif" width="15" height="15" alt=":!:" title="Exclamation"> <br> <br>[23:55] &lt;)Profanity&gt; [16:55] Checking for inactive: #aub<br>[23:55] &lt;)Profanity&gt; [16:55] info for OP SaPrOuZy doesn't exist , setting time to 1124312100 &lt;----------- here it can't read it  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_confused.gif" width="15" height="15" alt=":?" title="Confused">  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_exclaim.gif" width="15" height="15" alt=":!:" title="Exclamation"> <br>[23:55] &lt;)Profanity&gt; [16:55] SaPrOuZy: 0 = 1124312100 - 1124312100 </div></blockquote>thanks for your help...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4727">SaPrOuZy</a> — Wed Aug 17, 2005 5:21 pm</p><hr />
]]></content>
	</entry>
	</feed>
