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

	<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>2011-10-21T17:29:14-04:00</updated>

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

		<entry>
		<author><name><![CDATA[BillTech]]></name></author>
		<updated>2011-10-21T17:29:14-04:00</updated>

		<published>2011-10-21T17:29:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=97983#p97983</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=97983#p97983"/>
		<title type="html"><![CDATA[script help and optimization help please]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=97983#p97983"><![CDATA[
heres what i have so far seems to work as needed<br><br>bind sign - * xs:flood<br>set xsbantime 3<br><br>bind pub - .xs xs:flood<br><br>proc xs:flood {nick uhost hand chan arg} {<br>global xsbantime xsflooder<br>  if {![botisop $chan]} { return 0 }<br>  if {![string equal "Excess Flood" $arg]} { return 0 }<br>  if {![info exists xsflooder($chan:$uhost)]} {<br>  set xsflooder($chan:$uhost) 1<br>  putlog "No Info - $nick $chan Flood Count $xsflooder($chan:$uhost)"<br>  utimer 30 "set xsflooder($chan:$uhost) 0"<br>  } else {<br>  incr xsflooder($chan:$uhost)<br>  putlog "Add Flood Count - $nick $chan Flood Count $xsflooder($chan:$uhost)"<br>  utimer 30 "set xsflooder($chan:$uhost) 0"<br>  }<br>  if {$xsflooder($chan:$uhost) &gt;= 3} {<br>  puthelp "PRIVMSG $chan :Temp Ban $nick $xsbantime Min XS-Flood"<br>  putserv "MODE $chan +b *!$uhost"<br>  timer $xsbantime "pushmode $chan -b *!$uhost"<br>  puthelp "PRIVMSG $nick :Temp Ban $xsbantime Min on $chan XS-Flood"<br>  putlog "Temp Ban $xsbantime Min $nick *!$uhost on $chan XS-Flood"<br>  set xsflooder($chan:$uhost) 0"<br>  putlog "Reset - $nick $chan Flood Count $xsflooder($chan:$uhost)"<br> }<br>}<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11810">BillTech</a> — Fri Oct 21, 2011 5:29 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[BillTech]]></name></author>
		<updated>2011-10-21T00:49:46-04:00</updated>

		<published>2011-10-21T00:49:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=97978#p97978</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=97978#p97978"/>
		<title type="html"><![CDATA[script help and optimization help please]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=97978#p97978"><![CDATA[
think i got it<br>also seems i was having a issue with the _ in some of the variables<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11810">BillTech</a> — Fri Oct 21, 2011 12:49 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2011-10-20T08:45:54-04:00</updated>

		<published>2011-10-20T08:45:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=97963#p97963</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=97963#p97963"/>
		<title type="html"><![CDATA[script help and optimization help please]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=97963#p97963"><![CDATA[
Sorry, I didn't mean to imply that simply changing xs_flooder to xs_flooder($chan) would suffice.<br><br>I was generalising when pointing the way to using an array variable rather than a normal scalar variable to store information in a per channel way. There would be one array element per channel you wished the code to function in.<br><br>What I perhaps failed to explain is that this would inevitably require other changes in the code.<br><br>As far as I can see, there is also nothing in your code to indicate which nick has previously done the flooding. The variable xs_flooder is simply incremented, resulting in the last nick to contribute getting banned.<br><br>To correct this, you would have to emulate a two dimensional array. Say something like xs_flooder($uhost,$chan). My code doesn't require this because I don't ban a user, rather I regulate a channel.<br><br>In any event I would advise that what you are trying to do is somewhat more difficult than your original code.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Thu Oct 20, 2011 8:45 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[BillTech]]></name></author>
		<updated>2011-10-20T05:56:56-04:00</updated>

		<published>2011-10-20T05:56:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=97961#p97961</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=97961#p97961"/>
		<title type="html"><![CDATA[script help and optimization help please]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=97961#p97961"><![CDATA[
thanks for the responce still a lil bit over my head<br>i have tried xs_flooder($chan) i think i get an array error i couldnt track<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11810">BillTech</a> — Thu Oct 20, 2011 5:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2011-10-20T04:50:52-04:00</updated>

		<published>2011-10-20T04:50:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=97960#p97960</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=97960#p97960"/>
		<title type="html"><![CDATA[script help and optimization help please]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=97960#p97960"><![CDATA[
I see your problem. You would have to somehow employ an array variable to keep track of the flood on a per channel basis xs_flooder($chan).<br><br>This script does such a thing to restrict channel access when a PART flood occurs WITH part messages. You may be able to adapt it.<br><div class="codebox"><p>Code: </p><pre><code># part.tcl# profers channel protection for mass parts with part message### ....................................................................... ###### .......... configuration (edit as required) ........................... #### set here the bot channels you want part flood protection inset vPartChannels "#channel1 #channel2"# set here the number of parts in how many seconds for the script to reactset vPartLimit 4:8# set here the channel throttle (joins per seconds) when channel is restrictedset vPartJoins 3:3# set here the time in minutes for the channel to remain restrictedset vPartTime 5# set here the modes to set to restrict channel (excluding throttle mode j)set vPartModes mMR### ....................................................................... ###### .......... code (do not edit) ......................................... ###set vPartChannels [split [string tolower $vPartChannels]]scan $vPartLimit {%d:%d} vPartNumber vPartSecondsbind PART - * pPartBindproc pPartBind {nick uhost hand chan msg} {    global vPartActive vPartChannels vPartData vPartJoins vPartModes vPartNumber vPartSeconds vPartTime    if {[lsearch -exact $vPartChannels [string tolower $chan]] != -1} {        if {![info exists vPartActive($chan)]} {set vPartActive($chan) 0}        if {!$vPartActive($chan)} {            if {[string length $msg] != 0} {                lappend vPartData($chan) [clock seconds]                set vPartData($chan) [lrange $vPartData($chan) end-[expr {$vPartNumber - 1}] end]                if {[llength $vPartData($chan)] == $vPartNumber} {                    set period [expr {[lindex $vPartData($chan) end] - [lindex $vPartData($chan) 0]}]                    if {$period &lt;= $vPartSeconds} {                        set vPartActive($chan) 1                        putquick "MODE $chan +${vPartModes}j $vPartJoins"                        timer $vPartTime [list pPartCancel $chan]                    }                }            }        }    }    return 0}proc pPartCancel {chan} {    global vPartActive vPartModes    set vPartActive($chan) 0    putquick "MODE $chan -${vPartModes}j"    return 0}# eof</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Thu Oct 20, 2011 4:50 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[BillTech]]></name></author>
		<updated>2011-10-20T00:42:27-04:00</updated>

		<published>2011-10-20T00:42:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=97957#p97957</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=97957#p97957"/>
		<title type="html"><![CDATA[script help and optimization help please]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=97957#p97957"><![CDATA[
need a little help and optimization help please<br><br>i couldnt find a script to do this so i gave it a shot and tried to make one myself<br><br>what i want the script to do is count the number of excess floods a user does and temp ban after 3 in less then a minute<br>my script does this but i cant seem to make it include the channel and evaluate the channel on the count tried a few things but they havent worked out<br><br>my script works but if the users on multiple channels they get combined in the count<br><br>heres my hacked up code that works except for parsing channel in checks<div class="codebox"><p>Code: </p><pre><code>#xs_flood.tclbind sign - * xs_floodset xs_bantime 3bind pub - .xs xs_floodproc xs_flood {nick uhost hand chan arg} {global xs_bantime xs_flooder    if {![botisop $chan]} { return 0 }    if {[string equal "Excess Flood" $arg]} {    if {![info exists xs_flooder]} {    set xs_flooder 0    } else {    incr xs_flooder    putlog "xs_flooder = $nick $chan Flood count $xs_flooder"    timer 1 "set xs_flooder 0"    }    if {$xs_flooder &gt;= 3} {    puthelp "PRIVMSG $chan :Temp Ban $nick $xs_bantime Min XS-Flood"    putserv "MODE $chan +b *!$uhost"    timer $xs_bantime "pushmode $chan -b *!$uhost"    puthelp "PRIVMSG $nick :Temp Ban $xs_bantime Min on $chan XS-Flood"    putlog "Temp Ban $xs_bantime Min $nick *!$uhost on $chan XS-Flood"    timer 1 "set xs_flooder 0"  return 0  } }}putlog "XS-Flood Loaded Bantime $xs_bantime Min RaT"</code></pre></div>tia for your help<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11810">BillTech</a> — Thu Oct 20, 2011 12:42 am</p><hr />
]]></content>
	</entry>
	</feed>
