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

	<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>2008-04-12T09:07:35-04:00</updated>

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

		<entry>
		<author><name><![CDATA[fls]]></name></author>
		<updated>2008-04-12T09:07:35-04:00</updated>

		<published>2008-04-12T09:07:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=82275#p82275</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=82275#p82275"/>
		<title type="html"><![CDATA[bot set ban]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=82275#p82275"><![CDATA[
Hi mate, appreciate. tks u<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9381">fls</a> — Sat Apr 12, 2008 9:07 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TCL_no_TK]]></name></author>
		<updated>2008-04-10T14:28:54-04:00</updated>

		<published>2008-04-10T14:28:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=82262#p82262</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=82262#p82262"/>
		<title type="html"><![CDATA[bot set ban]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=82262#p82262"><![CDATA[
Untested, <em class="text-italics">may</em> do some testing later on. <div class="codebox"><p>Code: </p><pre><code>#header# kicklimit.tcl version 1.0 by TCL_no_TK &lt;ispmailsucks@googlemail.com&gt;#description# Allows you to set limits on how many times users (from a host) may be kicked# from the channel, per channel limiting/enabling/ban messages.#info# Usage:#  .chanset &lt;#channel&gt; +kicklimit  -- enables#  .chanset &lt;#channel&gt; -kicklimit  -- disables#  .chanset &lt;#channel&gt; kicklimit-kicks 3 -- sets the max kicks for a host to 3#  .chanset &lt;#channel&gt; kicklimit-reason "You have been banned from #channel for being kicked 3 times!" -- sets the ban reason for that channel.#  .chanset &lt;#channel&gt; kicklimit-bantime 2d4h -- sets the bantime for the channel to 2 days and 4 hours.#                                                &lt;time&gt; format &lt;X&gt;[d]&lt;X&gt;[h]#                                                &lt;minets&gt; format @&lt;number-of-minets&gt;##notes# The exempt options for channel ops, halfops and voices use the 'wasop' fuction# and may not provide the correct fuction it is used for in this script. *take a chance*#settings# use a channel ban, when adding a ban on host# that reaches its kick limit for any channels set +kicklimit# 0/1 = no/yesset kicklimit(channelban) "0"# (same as above) only will add channel ban on the bot; 0 (disable) 1 (enable)set kicklimit(botban) "1"# exempt flags '[global]-|-[channel]'set kicklimit(exempt-flags) "bolvf|olvf"# exempt channel ops; 0 (disable) 1 (enable)set kicklimit(exempt-ops) "1"# exempt channel halfops; 0 (disable) 1 (enable)set kicklimit(exempt-hops) "1"# exempt channel voices; 0 (disable) 1 (enable)set kicklimit(exempt-vops) "1"# set the maximum length of the ircd's kick message'sset kicklimit(max-kicklength) "255"#codeproc kick:kicklimit {nick host handle channel target reason} {global kicklimit if {(![isbotnick $target]) &amp;&amp; (![validuser [nick2hand $target]]) &amp;&amp; ([kicklimit:swa "$target" "$channel"])} {  kicklimit:host "$target" "[getchanhost $target]" "$channel"   return } if {(![isbotnick $target]) &amp;&amp; ([validuser [nick2hand $target]]) &amp;&amp; ([kicklimit:dmef "$target" "$channel"]) &amp;&amp; ([kicklimit:swa "$target" "$channel"])} {  kicklimit:host "$target" "[getchanhost $target]" "$channel"   return }}proc kicklimit:swa {target channel} {global kicklimit if {($::kicklimit(exempt-ops) != "") &amp;&amp; ($::kicklimit(exempt-ops) == "1") &amp;&amp; ([wasop $target $channel])} {  set swa "0" } if {($::kicklimit(exempt-hops) != "") &amp;&amp; ($::kicklimit(exempt-hops) == "1") &amp;&amp; ([washalfop $target $channel])} {  set swa "0" } if {($::kicklimit(exempt-vops) != "") &amp;&amp; ($::kicklimit(exempt-vops) == "1") &amp;&amp; ([wasvoice $target $channel])} {  set swa "0" }  if {(![info exists swa])} {set swa "1"}; return $swa}proc kicklimit:dmef {target channel} {global kicklimit if {($::kicklimit(exempt-flags) != "")} {  set flags $::kicklimit(exempts-flags)   if {[matchattr [nick2hand $target] $flags $channel]} {    return 0   } else {    return 1   } }; return 0}proc kicklimit:host {nick host channel} {global kicklimit if {(![string match -nocase "*@*" "$host"])} {set khost "$nick!*@*"} else {set khost "*!*@[lindex [split $host "@"] 1]"}  if {([channel get $channel kicklimit] == "-")} {return}   if {($::kicklimit($channel:$khost) != "")} {    set kicklimit($channel:$khost) "1"     return   }    if {([channel get $channel kicklimit-kicks] != "") &amp;&amp; ($::kicklimit($channel:$khost) &lt; [channel get $channel kicklimit-kicks])} {     set kicklimit($channel:$khost) [expr $::kicklimit($channel:$khost) +1]      return    }     if {([channel get $channel kicklimit-kicks] != "") &amp;&amp; ($::kicklimit($channel:$khost) == [channel get $channel kicklimit-kicks])} {      kicklimit:punish "$nick" "$host" "$channel"       return     }     if {([channel get $channel kicklimit-kicks] != "") &amp;&amp; ($::kicklimit($channel:$khost) &gt; [channel get $channel kicklimit-kicks])} {      set kicklimit($channel:$khost) "0"       return     }}proc kicklimit:punish {nick host channel} {global kicklimit set bhost [kicklimit:checkhost "$nick" "$host"]  if {($::kicklimit(channelban) != "") &amp;&amp; ($::kicklimit(channelban) == "1")} {   kicklimit:chanban "$nick" "$bhost" "$channel"    return  }   if {($::kicklimit(botban) != "") &amp;&amp; ($::kicklimit(botban) == "1")} {    kicklimit:botban "$nick" "$bhost" "$channel"     return   }}proc kicklimit:chanban {nick host channel} {global kicklimit if {($::kicklimit(max-kicklength) == "")} {  set kmml "255" } else {  set kmml $::kicklimit(max-kicklength) }  if {([channel get $channel kicklimit-reason] == "")} {   set kreason [kicklimit:trimchars "Kick limit for your host has expired." "$kmml"]  } else {   set kreason [kicklimit:trimchars "[channel get $channel kicklimit-reason]" "$kmml"]  }   if {([channel get $channel kicklimit-bantime] == "")} {    set bantime "15"   }    if {([channel get $channel kicklimit-bantime] != "")} {     set btime [channel get $channel kicklimit-bantime]      if {([string match "@*" "$btime"])} {       set bantime [lindex [split $btime "@"] 1]      } else {       set bantime [kicklimit:mc:bantime "$btime"]      }   }    putquick "MODE $channel :+b $host"     putquick "KICK $channel $nick :$kreason"      timer $bantime {putserv "MODE $channel :-b $host"}       return}proc kicklimit:botban {nick host channel} {global kicklimit if {($::kicklimit(max-kicklength) == "")} {  set kmml "255" } else {  set kmml $::kicklimit(max-kicklength) }  if {([channel get $channel kicklimit-reason] == "")} {   set kreason [kicklimit:trimchars "Kick limit for your host has expired." "$kmml"]  } else {   set kreason [kicklimit:trimchars "[channel get $channel kicklimit-reason]" "$kmml"]  }   if {([channel get $channel kicklimit-bantime] == "")} {    set bantime "15"   }    if {([channel get $channel kicklimit-bantime] != "")} {     set btime [channel get $channel kicklimit-bantime]      if {([string match "@*" "$btime"])} {       set bantime [lindex [split $btime "@"] 1]m      } else {       set bantime [kicklimit:mc:bantime "$btime"]m      }   }    newchanban $channel $host "kicklimit.tcl" "$kreason" "$bantime" none     if {([isban $host $channel])} {return} else {return}}proc kicklimit:checkhost {nick host} { if {(![onchan $nick])} {return "$host"}  if {(![string match "*@*.*" "$host"])} {   set new_host "*!*@[lindex [split [getchanhost $nick] "@"] 1]"    if {([string match -nocase "$host" "$new_host"])} {     return "$host"    } else {     return "$new_host"    }  }   set new_host "*!*@[lindex [split [getchanhost $nick] "@"] 1]"    if {([string match -nocase "$host" "$new_host"])} {     return "$host"    } else {     return "$new_host"    }}proc kicklimit:mc:bantime {time} { if {$time == ""} {return 0}  if {![regexp -- {^([0-9]*[dhm])([0-9]*[dhm])?([0-9]*[dhm])?$} $time]} {   return 0  } else {   set e $time    if {![regexp -- {([0-9]*)m} $e -&gt; min]  || ($min == "")}  {set min  0}     if {![regexp -- {([0-9]*)h} $e -&gt; hour] || ($hour == "")} {set hour 0}      if {![regexp -- {([0-9]*)d} $e -&gt; day]  || ($day == "")}  {set day  0}       set expire [expr ($min*60)+($hour*3600)+($day*86400)]  }; return [expr ($expire/60)]}proc kicklimit:trimchars {chars index} {return [join [lrange "[split "$chars" {}]" 0 $index] {}]}#bindsbind kick - "* * *" kick:kicklimit#channel optionssetudef flag kicklimitsetudef str kicklimit-kickssetudef str kicklimit-reasonsetudef str kicklimit-bantime#endputlog "loaded kicklimit.tcl version 1.0 by TCL_no_TK"return</code></pre></div> Feel free to point out errors/bugs and i'll fix them, its rough as always.<br>btw, the script will allow channelban's and botbans to enabled dont wanna change this <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"> just call it a "special" feature <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"><br>The script will reset a hosts kick limit if it detects it has gone over the allowed channel limit... (this wont affect channels having differant limits) but if you wish to disable it remove the following line of code (what this will do is auto ban any host that has been kicked more than the allowed limit for the channel, not allowed them to reuse up 3 more limits) <div class="codebox"><p>Code: </p><pre><code>     if {([channel get $channel kicklimit-kicks] != "") &amp;&amp; ($::kicklimit($channel:$khost) &gt; [channel get $channel kicklimit-kicks])} {      set kicklimit($channel:$khost) "0"       return     } </code></pre></div> from <strong class="text-strong">kicklimit:host</strong> proc. The bantime code from MC_8  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> Thx MC_8 <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> P.S sorry for the late reply.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8130">TCL_no_TK</a> — Thu Apr 10, 2008 2:28 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[fls]]></name></author>
		<updated>2008-02-14T21:54:26-04:00</updated>

		<published>2008-02-14T21:54:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=80868#p80868</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=80868#p80868"/>
		<title type="html"><![CDATA[bot set ban]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=80868#p80868"><![CDATA[
Hey guys,<br><br>Is there a script for this listed?<br><br>IF a user been kick by any op 3 times and the bot will auto set ban on tat user within a period of time let say 10mins.<br><br>can the period of time be change/updated too?<br><br>can the bot auto unban after a period of time too?<br><br>OP level will be excuse for this ban<br><br><br>Regard<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9381">fls</a> — Thu Feb 14, 2008 9:54 pm</p><hr />
]]></content>
	</entry>
	</feed>
