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

	<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>2009-04-26T10:29:17-04:00</updated>

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

		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2009-04-26T10:29:17-04:00</updated>

		<published>2009-04-26T10:29:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88585#p88585</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88585#p88585"/>
		<title type="html"><![CDATA[Bans]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88585#p88585"><![CDATA[
<blockquote class="uncited"><div>can you give your script for me see?</div></blockquote>sure, try:<div class="codebox"><p>Code: </p><pre><code># Author: tomekk                                                                                   # e-mail:  tomekk/@/oswiecim/./eu/./org                                                            # home page: http://tomekk.oswiecim.eu.org/                                                        #                                                                                                  # Version 0.1                                                                                      #                                                                                                  # This file is Copyrighted under the GNU Public License.                                                         # http://www.gnu.org/copyleft/gpl.html                                                                           # !aban &lt;nick&gt; &lt;interval_in_minutes&gt;# script is using [maskhost] for mask host# from tcl-commands.txt# maskhost &lt;nick!user@host&gt;# Returns: masked hostmask for the string given ("n!u@1.2.3.4" -&gt; "*!u@1.2.3.*",#"n!u@lame.com" -&gt; "*!u@lame.com", "n!u@a.b.edu" -&gt; "*!u@*.b.edu")# !aban channelsset aban_channels {#channel #channel2}# file with banned hostsset banned_hosts_file "bans.db"########################################################bind pub o|o !aban aban_procbind join -|- "*" aban_join_procif {![file exists $banned_hosts_file]} {set touch_file [open $banned_hosts_file w]close $touch_file}proc get_banned_hosts { } {global banned_hosts_fileset banned_hosts ""set open_hosts [open $banned_hosts_file r]set banned_hosts [split [read $open_hosts] "\n"]close $open_hostsreturn $banned_hosts}proc add_banned_host { uhost utime uint uchan } {global banned_hosts_fileset new_db_ban [open $banned_hosts_file a]puts $new_db_ban "$uhost%$utime%$uint%$uchan"close $new_db_ban}proc del_banned_host { uhost } {global banned_hosts_fileset bnd_hosts [get_banned_hosts]if {$bnd_hosts != ""} {set bnd_hosts_u [open $banned_hosts_file w]foreach bnd_host $bnd_hosts {if {$bnd_host != ""} {set clear_host [lindex [split $bnd_host "%"] 0]if {$clear_host != $uhost} {puts $bnd_hosts_u $bnd_host}}}close $bnd_hosts_u}}proc check_for_ban { uhost } {set ban_exists 0set bnd_hosts [get_banned_hosts]if {$bnd_hosts != ""} {foreach bnd_host $bnd_hosts {if {$bnd_host != ""} {set clear_host [lindex [split $bnd_host "%"] 0]if {$clear_host == $uhost} {set ban_exists 1break}}}}return $ban_exists}proc aban_timer { } {check_ban_intervalsif {[string match *aban_timer* [utimers]] != 1} {utimer 10 aban_timer}}proc aban_join_proc { nick uhost hand chan } {global aban_channels botnickif {[lsearch $aban_channels $chan] == -1} {return}if {$botnick != $nick} {set victim_host [maskhost [getchanhost $nick $chan]]if {[check_for_ban $victim_host] == 1} {putquick "MODE $chan +b $victim_host"putkick $chan $nick "old ban..."}}}proc aban_proc { nick uhost hand chan arg } {global aban_channelsset proc_args [split $arg]set proc_nick [lindex $proc_args 0]set proc_interval [lindex $proc_args 1]if {[lsearch $aban_channels $chan] == -1} {return                                }  if {$proc_interval != ""} {set proc_interval [expr int($proc_interval)]if {[regexp {^[0-9]+$} $proc_interval]} {if {$proc_interval &gt; 0} {if {[onchan $proc_nick $chan]} {set victim_host [maskhost [getchanhost $proc_nick $chan]]if {[check_for_ban $victim_host] == 0} {add_banned_host $victim_host [clock seconds] $proc_interval $chanputquick "MODE $chan +b $victim_host"putkick $chan $proc_nick "banned for $proc_interval minute/s"} {putquick "NOTICE $nick :$victim_host is already on the list"}} {putquick "NOTICE $nick :user $proc_nick is not on $chan"}} {putquick "NOTICE $nick :interval must be greater than 0"}}} {putquick "NOTICE $nick :use: !aban &lt;nick&gt; &lt;interval_in_minutes&gt;"}}proc check_ban_intervals { } {set bnd_hosts [get_banned_hosts]if {$bnd_hosts != ""} {set time_now [clock seconds]foreach bnd_host $bnd_hosts {if {$bnd_host != ""} {set bnd_rows [split $bnd_host "%"]set ban_user_host [lindex $bnd_rows 0]set ban_user_time [lindex $bnd_rows 1]set ban_user_int [lindex $bnd_rows 2]set ban_user_chan [lindex $bnd_rows 3]if {[expr $time_now - $ban_user_time] &gt; [expr $ban_user_int * 60]} {if {[botonchan $ban_user_chan]} {putquick "MODE $ban_user_chan -b $ban_user_host"}del_banned_host $ban_user_host}}}}}if {[string match *aban_timer* [utimers]] != 1} {utimer 10 aban_timer}putlog "tb2.tcl ver 0.1 by tomekk loaded"</code></pre></div>i wrote it for someone on another forum, it should work<br><br>!aban &lt;nick&gt; &lt;interval_in_minutes&gt; <br><br>auto  unban after $int time (+/- 10 seconds), 'akick' feature should work too<br><br>cheers<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10332">tomekk</a> — Sun Apr 26, 2009 10:29 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[McMilan]]></name></author>
		<updated>2009-04-26T07:54:04-04:00</updated>

		<published>2009-04-26T07:54:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88583#p88583</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88583#p88583"/>
		<title type="html"><![CDATA[Bans]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88583#p88583"><![CDATA[
can you give your script for me see?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10539">McMilan</a> — Sun Apr 26, 2009 7:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2009-04-26T06:16:56-04:00</updated>

		<published>2009-04-26T06:16:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88581#p88581</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88581#p88581"/>
		<title type="html"><![CDATA[Bans]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88581#p88581"><![CDATA[
yeah, cool i just asked because i have one timeban script, but i see that you want something else<br><br>cheers<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10332">tomekk</a> — Sun Apr 26, 2009 6:16 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[McMilan]]></name></author>
		<updated>2009-04-25T18:24:38-04:00</updated>

		<published>2009-04-25T18:24:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88577#p88577</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88577#p88577"/>
		<title type="html"><![CDATA[Bans]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88577#p88577"><![CDATA[
!ban &lt;nickname/address&gt; +duration reason<br><br>If i want to give a duration i need to specify "+value" after the given nickname/address.<br><br>m: minutes<br>h: hours<br>d: days<br>w: weeks<br>y: years<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10539">McMilan</a> — Sat Apr 25, 2009 6:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[McMilan]]></name></author>
		<updated>2009-04-25T15:22:41-04:00</updated>

		<published>2009-04-25T15:22:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88574#p88574</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88574#p88574"/>
		<title type="html"><![CDATA[Re: Bans]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88574#p88574"><![CDATA[
<blockquote class="uncited"><div><blockquote class="uncited"><div>*This must work in akick from bot.</div></blockquote>what you mean?<br><br>script can kick user after !ban command ;&gt;</div></blockquote>For exemple, if someone remove the ban and the user join again to channel, it will kickban him again.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10539">McMilan</a> — Sat Apr 25, 2009 3:22 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2009-04-25T14:43:29-04:00</updated>

		<published>2009-04-25T14:43:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88573#p88573</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88573#p88573"/>
		<title type="html"><![CDATA[Re: Bans]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88573#p88573"><![CDATA[
<blockquote class="uncited"><div>*This must work in akick from bot.</div></blockquote>what you mean?<br><br>script can kick user after !ban command ;&gt;<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10332">tomekk</a> — Sat Apr 25, 2009 2:43 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[McMilan]]></name></author>
		<updated>2009-04-25T13:34:26-04:00</updated>

		<published>2009-04-25T13:34:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=88571#p88571</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=88571#p88571"/>
		<title type="html"><![CDATA[Bans]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=88571#p88571"><![CDATA[
Hello There.<br><br>I need a script to, per exemple, i say on channel:<br><br>!ban NICK  REASON %1h30m<br><br>That ban will expire after 1 hour 30 minutes.<br>*This must work in akick from bot.<br><br>Thx<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10539">McMilan</a> — Sat Apr 25, 2009 1:34 pm</p><hr />
]]></content>
	</entry>
	</feed>
