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

	<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>2022-09-26T11:32:21-04:00</updated>

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

		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2022-09-26T11:32:21-04:00</updated>

		<published>2022-09-26T11:32:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111430#p111430</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111430#p111430"/>
		<title type="html"><![CDATA[repeat tcl with warning with error]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111430#p111430"><![CDATA[
thanks CrazyCat overlooked  that and warn reset as well that seemed to fix it<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Mon Sep 26, 2022 11:32 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2022-09-26T09:34:38-04:00</updated>

		<published>2022-09-26T09:34:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111429#p111429</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111429#p111429"/>
		<title type="html"><![CDATA[repeat tcl with warning with error]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111429#p111429"><![CDATA[
Where is defined warn(max) ? Not in this part of script<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Mon Sep 26, 2022 9:34 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2022-09-26T09:08:39-04:00</updated>

		<published>2022-09-26T09:08:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=111428#p111428</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=111428#p111428"/>
		<title type="html"><![CDATA[repeat tcl with warning with error]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=111428#p111428"><![CDATA[
greetingz gentz,<br><br>ive been trying this edited version of an anti  repeat lines and anti repeat chars tcl with warnings added  wich doesnt seem work as expected gettin this error:<br><blockquote class="uncited"><div>Tcl error [::repeatf::repeatpubm]: can't read "warn(max)": no such element in array</div></blockquote><div class="codebox"><p>Code: </p><pre><code>     proc string2pattern {str} { regsub -all -- {(\[|\]|\\|\?|\*)} $str {\\\1} } namespace eval ::repeatf {bind pubm - * [namespace current]::repeatpubmvariable followingvariable repeatfvariable warnset repeatf(wmsg) "Warning: You've triggered %type repeating protection, stop repeating."          #.chanset #channel ap:repeatc 25 30 w:k:kb 2          #.chanset * ap:repeatl 2:10 60 k:kb 2#setudef flag antirepeatsetudef str ap:repeatcvariable defrepeatc {25 30 w:k:kb 2}setudef str ap:repeatlvariable defrepeatl {2:10 60 k:kb 2}bind ctcp - ACTION [namespace current]::anti_char-repeat:action proc anti_char-repeat:action {n u h d k t} { if {[isbotnick $d] || [isop $n $d] || [ishalfop $n $d] || [matchattr [nick2hand $n] ofn|ofn $d]} { return 0 }  repeatpubm $n $u $h $d $t}proc repeatpubm {nick uhost hand chan arg} {    if {[isvoice $nick $chan] || [isbotnick $chan] || [isop $nick $chan] || [ishalfop $nick $chan] || [matchattr [nick2hand $nick] ofn|ofn $chan]} { return 0 }set users [list]set umasks [list]variable repeatf#if {![channel get $chan antirepeat]} {return 1}variable defrepeatcvariable defrepeatl         variable warnif {[string is space [channel get $chan ap:repeatc]]} {channel set $chan ap:repeatc $defrepeatc}if {[string is space [channel get $chan ap:repeatl]]} {channel set $chan ap:repeatl $defrepeatl}foreach {off btime pmeth btype} [set cgot [split [channel get $chan ap:repeatl]]] {break}foreach {o s} [cgsplit $off] {break}set arg [string map {\017 {}} [stripcodes bcruag $arg]]if {![invalid:apf $o $s]} {if {[set ts [follow $s rpt:[md5 [string tolower $uhost:$arg:$chan]] $o]] != -1} {set kmsg "$o repeats in $ts secs"set wmsg [string map {%type text} $repeatf(wmsg)] ; set reptype repeatl}}if {![info exists kmsg]} {set cgotc [split [channel get $chan ap:repeatc]]if {[string is integer [set i [lindex $cgotc 0]]] &amp;&amp; $i &gt; 0} {set cl "abcdefghijklmnopqrstuvwxyz0123456789?!@#$%^&amp;.-_=)([]{}\\\/~`*|,&lt;'&gt;"for {set c 0} {$c &lt; [string length $cl]} {incr c} {if {[string match -nocase *[string2pattern [string repeat [string index $cl $c] $i]]* $arg]} {foreach {btime pmeth btype} [lrange $cgotc 1 end] {break}set kmsg "${i}+ consecutive [string index $cl $c]'s"set wmsg [string map {%type letter} $repeatf(wmsg)] ; set reptype repeatc ; break}}}}if {[info exists kmsg]} {set chost [getchanhost $nick $chan]                  regsub -all -- ~ $chost "" chost  if {![info exists warn($uhost)]} {    set warn($uhost) 1    utimer $warn(reset) [list [namespace current]::action:reset $uhost]  } else {  incr warn($uhost)  }  if {$warn($uhost) &gt; $warn(max)} {          if {[string match -nocase "*@*irccloud*" [maskhost $nick!$chost 2]] || [string match -nocase "*@*kiwiirc*" [maskhost $nick!$chost 2]] || [string match -nocase "*@*mibbit*" [maskhost $nick!$chost 2]]} {                     set ident  [lindex [split $chost @] 0]                   set xbmaskx [string map {sid id uid id} $ident]                    set bmask  *!*[string tolower $xbmaskx ]@*                    pushmode $chan +b $bmask         } else {  pushmode $chan +b "*!*@[maskhost $nick!$chost 2]"  }    putquick "kick $chan $nick dont repeat please thank you..."  } else {    putserv "PRIVMSG $chan :Warning $warn($uhost): No Action Please"           }} return 1}proc action:reset {uhost} {  variable warn  if {[info exists warn($uhost)]} {  unset warn($uhost)  }} proc cgsplit off {foreach {o s} [split $off :] {break}expr {([info exists o]&amp;&amp;[info exists s])?[list $o $s]:{0 0}}}proc invalid:apf {o s} {expr {![string is integer -strict $o] || $o &lt;= 0 || ![string is double -strict $s] || $s &lt;= 0}}proc follow {s fv pun {v 1} {ty 0}} {variable followingif {![info exists following($fv)]} {set o $vset t [clock clicks -milliseconds]} {foreach {o t} $following($fv) {break}incr o $v}if {[set z [expr {([clock clicks -milliseconds]-$t)/1000.}]] &gt;= $s} {set o $vset t [clock clicks -milliseconds]}set following($fv) [list $o $t]if {$o &gt;= $pun} {if {!$ty} {followrem following($fv)} ; return [expr {$z&gt;=$s?0.0:$z}]}return -1}proc followrem fv {upvar [namespace current]::$fv fif {[info exists f]} {unset f}}} </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Mon Sep 26, 2022 9:08 am</p><hr />
]]></content>
	</entry>
	</feed>
