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

	<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-05-06T20:48:57-04:00</updated>

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

		<entry>
		<author><name><![CDATA[sKy]]></name></author>
		<updated>2005-05-06T20:48:57-04:00</updated>

		<published>2005-05-06T20:48:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=49146#p49146</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=49146#p49146"/>
		<title type="html"><![CDATA[newban/newchanban expire]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=49146#p49146"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>proc newchan:ban { channel hostname creator comment lifetime } {if { ! [isban $hostname $channel] } { newchanban $channel $hostname $creator $comment $lifetimereturn} else { foreach ban [banlist $channel] {if { [string match -nocase "*[lindex $ban 0]*" $hostname] } {set expire [lindex $ban 2]if { $expire == 0 } { break ; return }set remain [expr $expire - [unixtime]]set remain [expr $remain / 60]if { $remain &gt; $lifetime } { break ; return }newchanban $channel $hostname $creator $comment $lifetime}}}}proc new:ban { hostname creator comment lifetime } {if { ! [isban $hostname] } { newban $hostname $creator $comment $lifetimereturn} else { foreach ban [banlist] {if { [string match -nocase "*[lindex $ban 0]*" $hostname] } {set expire [lindex $ban 2]if { $expire == 0 } { break ; return }set remain [expr $expire - [unixtime]]set remain [expr $remain / 60]if { $remain &gt; $lifetime } { break ; return }newban $hostname $creator $comment $lifetime}}}}</code></pre></div>works now, thanks anyway.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6101">sKy</a> — Fri May 06, 2005 8:48 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-05-06T20:08:55-04:00</updated>

		<published>2005-05-06T20:08:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=49139#p49139</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=49139#p49139"/>
		<title type="html"><![CDATA[newban/newchanban expire]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=49139#p49139"><![CDATA[
Something like this should do it:<div class="codebox"><p>Code: </p><pre><code>proc newchan:ban {chan ban who arg time} { if {![isban $ban $chan]} {  newchanban $chan $ban $who $arg $time } else {  foreach setban [banlist $chan] {   if {[string equal -nocase [lindex $setban 0] $ban]} {    if {$time &gt; [lindex $setban 2]} {     newchanban $chan $ban $who $arg $time     break    }   }  } }}</code></pre></div>same goes with new:ban.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Fri May 06, 2005 8:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[sKy]]></name></author>
		<updated>2005-05-06T19:23:08-04:00</updated>

		<published>2005-05-06T19:23:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=49135#p49135</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=49135#p49135"/>
		<title type="html"><![CDATA[newban/newchanban expire]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=49135#p49135"><![CDATA[
right,<br><br>but if the bantime will be longer (permanent) i wish to have the new ban and not the old (shorter).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6101">sKy</a> — Fri May 06, 2005 7:23 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-05-06T18:57:38-04:00</updated>

		<published>2005-05-06T18:57:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=49129#p49129</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=49129#p49129"/>
		<title type="html"><![CDATA[newban/newchanban expire]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=49129#p49129"><![CDATA[
Can't you simply add a check before adding the ban, like <div class="codebox"><p>Code: </p><pre><code>if {![isban $ban $channel]} { # newchanban}</code></pre></div>this way the bot will not change the ban if it's already set.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Fri May 06, 2005 6:57 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[sKy]]></name></author>
		<updated>2005-05-06T17:29:44-04:00</updated>

		<published>2005-05-06T17:29:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=49125#p49125</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=49125#p49125"/>
		<title type="html"><![CDATA[newban/newchanban expire]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=49125#p49125"><![CDATA[
I need 2 little procs. If a newchanban is allready set and bantime is 0 (permanent) and another script try to set a newchanban with a shorter expiretime this should be blocked.<br><div class="codebox"><p>Code: </p><pre><code>proc newchan:ban { channel hostname creator comment lifetime } {if { ! [isban $hostname $channel] } {newchanban $channel $hostname $creator $comment $lifetime}if { [isban $hostname $channel] } {set h [string tolower $hostname]foreach ban [banlist $channel] {set host [lindex $ban 0]set hostt [string tolower $host]set expire [lindex $ban 2]if { $h == $hostt } {if { $expire == 0 } {return}}}}newchanban $channel $hostname $creator $comment $lifetime}proc new:ban { hostname creator comment lifetime } {if { ! [isban $hostname] } {newban $hostname $creator $comment $lifetime}set h [string tolower $hostname]if { [isban $hostname] } {foreach ban [banlist] {set host [lindex $ban 0]set hostt [string tolower $host]set expire [lindex $ban 2]if { $h == $hostt } {if { $expire == 0 } {return}}}}newban $hostname $creator $comment $lifetime}</code></pre></div>Can you find a error?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6101">sKy</a> — Fri May 06, 2005 5:29 pm</p><hr />
]]></content>
	</entry>
	</feed>
