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

	<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>2021-04-07T14:04:33-04:00</updated>

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

		<entry>
		<author><name><![CDATA[MrBeta]]></name></author>
		<updated>2021-04-07T14:04:33-04:00</updated>

		<published>2021-04-07T14:04:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109720#p109720</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109720#p109720"/>
		<title type="html"><![CDATA[Idle Whois]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109720#p109720"><![CDATA[
Not developed project but returning useful   <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12321">MrBeta</a> — Wed Apr 07, 2021 2:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[MrBeta]]></name></author>
		<updated>2016-04-07T05:54:25-04:00</updated>

		<published>2016-04-07T05:54:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104906#p104906</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104906#p104906"/>
		<title type="html"><![CDATA[Idle Whois]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104906#p104906"><![CDATA[
Hello caesar now have not errors but don't ban.<br>Your work has rightly priority, idleban can wait  <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=12321">MrBeta</a> — Thu Apr 07, 2016 5:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2016-04-06T08:22:58-04:00</updated>

		<published>2016-04-06T08:22:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104898#p104898</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104898#p104898"/>
		<title type="html"><![CDATA[Idle Whois]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104898#p104898"><![CDATA[
Replace:<div class="codebox"><p>Code: </p><pre><code>proc idle:kick {nick uhost hand chan vict reason} {</code></pre></div>with:<div class="codebox"><p>Code: </p><pre><code>proc idle:kick {nick uhost hand channel vict reason} {</code></pre></div>Another busy day at work and didn't get to do much..  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Wed Apr 06, 2016 8:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[MrBeta]]></name></author>
		<updated>2016-04-06T07:58:32-04:00</updated>

		<published>2016-04-06T07:58:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104896#p104896</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104896#p104896"/>
		<title type="html"><![CDATA[Idle Whois]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104896#p104896"><![CDATA[
[11:53:04] Tcl error [::idleBan::idle:kick]: can't read "channel": no such variable<br><br>Don't kick or ban, i have this error message<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12321">MrBeta</a> — Wed Apr 06, 2016 7:58 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2016-04-05T04:42:26-04:00</updated>

		<published>2016-04-05T04:42:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104889#p104889</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104889#p104889"/>
		<title type="html"><![CDATA[Idle Whois]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104889#p104889"><![CDATA[
Right now it will skip a member from idle checking if: has op (@), is voiced (+), or is a valid user having local or global friend (f) flag. Will add more.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Tue Apr 05, 2016 4:42 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[MrBeta]]></name></author>
		<updated>2016-04-05T04:27:56-04:00</updated>

		<published>2016-04-05T04:27:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104888#p104888</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104888#p104888"/>
		<title type="html"><![CDATA[Idle Whois]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104888#p104888"><![CDATA[
Great! If I may add another request is to not make whois for op that often are other eggy, exclude the ban and whois for operators, users who has certain flag on the bot<br>I test it in the evening, again thanks caesar<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12321">MrBeta</a> — Tue Apr 05, 2016 4:27 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2016-04-06T08:24:38-04:00</updated>

		<published>2016-04-05T03:27:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104887#p104887</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104887#p104887"/>
		<title type="html"><![CDATA[Idle Whois]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104887#p104887"><![CDATA[
been a bit busy with work yesterday and didn't get to finish the code as I wanted so done it today. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><div class="codebox"><p>Code: </p><pre><code>namespace eval idleBan {# Default idle time in minutesset idle(idle_default) 30# Delay in seconds between WHOIS commands so the bot won't flood itself offset idle(whois_delay) 3# kick reason for beeing idle in the channelset idle(reason) "Don't be idle in %channel channel please, %duration minutes ban."# Ban type: 1 - channel ban, 2 - ban in it's internal bans list (newchanban)set idle(ban_type) 1# Ban lifetime (if above is set to 2) in minutes. If set to 0 will be permanent.set idle(ban_lifetime) 60# Don't edit past this line unless you know what you are doing!setudef flag idlebansetudef int idletimebind cron - {?0*} [namespace current]::idle:cronbind raw - 317 [namespace current]::idle:rawbind part - * [namespace current]::idle:delbind sign - * [namespace current]::idle:delbind nick - * [namespace current]::idle:nickbind kick - * [namespace current]::idle:kickproc idle:cron {min hour day month weekday} {variable idleforeach channel [channels] {if {![channel get $channel idleban]} continueif {![botisop $channel]} continueset idletime [channel get $channel idletime]if {!$idletime} {channel set idletime $idle(default)}set channel [string tolower $channel]foreach member [chanlist $channel] {if {[isbotnick $member]} continueif {[isop $member $channel]} continueif {[isvoice $member $channel]} continueset handle [nick2hand $member $channel]if {[matchattr $handle f|f]} continueset chanidle [getchanidle $member $channel]if {$chanidle &gt;= $idletime} {variable checkif {![onchan $member $channel]} returnset pos -1if {[info exists check($channel)]} {set pos [idle:pos $member $check($channel)]}if {$pos == -1} {lappend check($channel) $member}utimer $idle(whois_delay) [list puthelp "WHOIS $member $member"]}}}}proc idle:raw {from key text} {variable checkif {![info exists check]} returnif {[scan [lrange $text 1 2] {%s%d} member seconds] != 2} returnforeach channel [channels] {if {![channel get $channel idleban] || ![botisop $channel]} {idle:action channel $channelcontinue}set idletime [channel get $channel idletime]set idle [expr $seconds / 60]if {$idle &lt; $idletime} {idle:action member $channel $member} else {idle:punish $channel $member $idle}}}proc idle:del {nick uhost hand channel {text ""}} {if {[channel get $channel idleban]} {if {[isbotnick $nick]} {idle:action channel $channel} else {idle:action member $channel $nick}}}proc idle:nick {nick uhost hand channel newnick} {if {[isbotnick $nick]} returnif {[channel get $channel idleban]} {idle:action nick $channel $nick $newnick}}proc idle:kick {nick uhost hand channel vict reason} {if {[channel get $channel idleban]} {if {[isbotnick $vict]} {idle:action channel $channel} else {idle:action member $channel $vict}}}proc idle:action {act channel {member ""} {newnick ""}} {variable checkset channel [string tolower $channel]if {![info exists check($channel)]} returnswitch -- $act {default {return}"member" {set pos [idle:pos $member [join $check($channel)]]if {$pos != -1} {set check($channel) [lreplace $check($channel) $pos $pos]}}"channel" {if {[info exists check($channel)]} {unset check($channel)}}"nick" {set pos [idle:pos $member [join $check($channel)]]if {$pos != -1} {set check($channel) [lreplace $check($channel) $pos $pos $newnick]}}}}proc idle:getChannels {member} {variable checkset matched ""foreach channel [channels] {if {![channel get $channel idleban] || ![botisop $channel]} {idle:action channel $channelcontinue}foreach member [join $check($channel)] {if {![onchan $member $channel]} {idle:action member $channel $member}if {[string equal -nocase $nick $member]} {lappend matched $channel}}}return $matched}proc idle:punish {channels member idle} {variable checkforeach channel [join $channels] {if {![channel get $channel idleban] || ![botisop $channel]} {idle:action channel $channel} else {if {[onchan $member $channel]} {scan [getchanhost $member $channel] {%*[^@]@%s} hostset mask "*!*@$host"}idle:action member $channel $memberidle:stack $channel $member $maskidle:check $channel}}}proc idle:stack {channel member mask} {variable kicksvariable bansset channel [string tolower $channel]set pos -1if {[info exists kicks($channel)]} {set pos [idle:pos $member $kicks($channel)]}if {$pos == -1} {lappend kicks($channel) $member} else {set pos -1}if {[info exists bans($channel)]} {set pos [idle:pos $mask $bans($channel)]}if {$pos == -1} {lappend bans($channel) $mask}}proc idle:pos {needle haystack} {set count -1set match 0foreach element [join $haystack] {incr countif {[string equal -nocase $needle $element]} {set match 1break}}return "[expr $match&gt;0?$count:"-1"]"}proc idle:check {channel} {variable checkif {[info exists check($channel)]} {set len [llength [join $check($channel)]]if {$len} {utimer 3 [list [namespace current]::idle:action check $channel]} else {if {[botisop $channel]} {variable bansif {[info exists bans($channel)]} {idle:stackBans $channel $bans($channel)}unset bans($channel)variable kicksif {[info exists kicks($channel)]} {idle:stackKicks $channel $kicks($channel)}unset kicks($channel)}}}}proc idle:stackBans {channel banlist {max 6}} {variable idleset len [llength $banlist]while {$len &gt; 0} {if {$len &gt; $max} {set mode [string repeat "b" $max]set masks [join [lrange $banlist 0 [expr {$max - 1}]]]set banlist [lrange $banlist $max end]incr len -$max} else {set mode [string repeat "b" $len]set masks [join $banlist]incr len -$len}pushmode $channel +$mode $masksif {$idle(ban_type) == 2} {idle:newbans $channel $masks}}}proc idle:newbans {channel banlist} {variable idleforeach mask [join $banlist] {set reason [string map [list "%channel" "$channel" "%duration" "$idle(ban_lifetime)"] $idle(reason)]newchanban $channel $mask "Anti-Idle" $reason $idle(ban_lifetime)}}proc idle:stackKicks {channel kicklist {max 6}} {variable idleset len [llength $kicklist]while {$len &gt; 0} {if {$len &gt; $max} {set stack [join [lrange $kicklist 0 [expr {$max - 1}]]]set kicklist [lrange $kicklist $max end]} else {set stack [join $kicklist]incr len -$len}set reason [string map [list "%channel" "$channel" "%duration" "$idle(ban_lifetime)"] $idle(reason)]putkick [join $stack ","] $reason}}}</code></pre></div>I did some testings and should do what you want if I got it right.<br><br>The bot will do a idle check every 10 minutes and if a member is idle in the channel for more than the specified amount of minutes will do a whois. Depending on how many members had to be whois-ed the bot will wait until the list is empty and then proceed with the punishment.<br><br>This works for all channels that are set to +idleban (<em class="text-italics">.chanset #channel +idleban</em> from DCC Chat/Telnet with the bot). Be sure to set the <em class="text-italics">idletime</em> (<em class="text-italics">.chanset #channel idletime &lt;minutes&gt;</em> from DCC Chat/Telnet with the bot) else the default (30 minutes as I left it) will be set and used.<br><br>Load this on a test bot and see if things go as planned and reply back if you encounter any problems/issues.<br><br>Edit: I used <em class="text-italics">pushmode</em> and <em class="text-italics">putkick</em> that are using slow queues and it's better from my point of view, but I guess you can replace those with a faster queue system if it's badly needed.<br><br>I've extended this so much that I didn't think about all the features it should have so right now this misses two features that I'm working on:<br>- purge bans that are in the idle bans list upon outside ban settings<br>- purge nicks that are in the idle kicks list upon: nick change, kick, part and quit.<br><br>Will update this soon. <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> — Tue Apr 05, 2016 3:27 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[MrBeta]]></name></author>
		<updated>2016-04-03T16:40:07-04:00</updated>

		<published>2016-04-03T16:40:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104880#p104880</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104880#p104880"/>
		<title type="html"><![CDATA[Idle Whois]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104880#p104880"><![CDATA[
Thank you very much caesar  <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=12321">MrBeta</a> — Sun Apr 03, 2016 4:40 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2016-04-03T15:00:17-04:00</updated>

		<published>2016-04-03T15:00:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104879#p104879</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104879#p104879"/>
		<title type="html"><![CDATA[Idle Whois]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104879#p104879"><![CDATA[
Most, if not all, use the get the idle time from the channel aka <em class="text-italics">getchanidle</em>, but this like you also mentioned doesn't mean that person isn't active in another channel or talks with someone in PM.<br><br>Unless the bot has ircop privileges you have no other way but rely on <em class="text-italics">getchanidle</em> and filter out the members that didn't get over the defined limit and whois only those that did.<br><br>Will get back to this in the morning with something for you to test. Now going to bed. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Sun Apr 03, 2016 3:00 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[MrBeta]]></name></author>
		<updated>2016-04-03T14:15:19-04:00</updated>

		<published>2016-04-03T14:15:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104877#p104877</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104877#p104877"/>
		<title type="html"><![CDATA[Idle Whois]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104877#p104877"><![CDATA[
I have search but no one perform a whois for see the real idle time, i don't want kick or ban people to talk in private but only who is inactive.<br>More tcl work on idle of the user in the public channel because in  all irc network with many server is impossible to see the idle time if the user isn't in the same server of the bot.<br>I search  for a tcl that not ban for mistake the user and perform a real user's whois in the same server<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12321">MrBeta</a> — Sun Apr 03, 2016 2:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2016-04-03T08:48:40-04:00</updated>

		<published>2016-04-03T08:48:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104876#p104876</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104876#p104876"/>
		<title type="html"><![CDATA[Idle Whois]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104876#p104876"><![CDATA[
check the tcl archive i saw several there<br><br><a href="http://www.egghelp.org/tclhtml/3478-4-0-0-1-idle.htm" class="postlink">http://www.egghelp.org/tclhtml/3478-4-0-0-1-idle.htm</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Sun Apr 03, 2016 8:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[MrBeta]]></name></author>
		<updated>2021-04-07T06:06:05-04:00</updated>

		<published>2016-04-02T13:48:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104875#p104875</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104875#p104875"/>
		<title type="html"><![CDATA[Idle Whois]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104875#p104875"><![CDATA[
There is an idle tcl that kick / ban you taking the time to <strong class="text-strong">whois</strong>?<br>I do not find a tcl that every 10/15 minutes to do a whois to the user and if exceeds 90 minutes of inactivity in the public and private give the kick/ban.<br>I look for an antidle that makes a Whois to the user verifying how long it really is inactive, many antiidle do not detect that a person can be in PVT. I have no connection problem from multiple servers since certain clients connect only to a server<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12321">MrBeta</a> — Sat Apr 02, 2016 1:48 pm</p><hr />
]]></content>
	</entry>
	</feed>
