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

	<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>2016-09-15T13:17:50-04:00</updated>

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

		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2016-09-15T13:17:50-04:00</updated>

		<published>2016-09-15T13:17:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105436#p105436</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105436#p105436"/>
		<title type="html"><![CDATA[Protect to massive change nicks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105436#p105436"><![CDATA[
<blockquote class="uncited"><div>puedes tener ambos en una tcl solo deja un solo <strong class="text-strong">putlog</strong><br>ejemplo:<br><br><strong class="text-strong">putlog "=- \002anti mass joins y \002Protection Anti Changes Massive NickNames\002 cargado -=" </strong><br><br>por algo esta ultima modifique el bind, sets y su proc la cual no entrara en conflicto con la original, funcionan ambas en una solo tcl.</div></blockquote>Perfecto! Gracias <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><br>Aún no he tenido tiempo de programar, cuando lo tenga voy a revisar eso y si en algún momento hay otro ataque en la Red (cosa muy dificil) por aqui mismo reabriré este hilo para comentarles como me fue con este script.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Thu Sep 15, 2016 1:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2016-09-14T23:34:52-04:00</updated>

		<published>2016-09-14T23:34:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105434#p105434</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105434#p105434"/>
		<title type="html"><![CDATA[Protect to massive change nicks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105434#p105434"><![CDATA[
puedes tener ambos en una tcl solo deja un solo <strong class="text-strong">putlog</strong><br>ejemplo:<br><br><strong class="text-strong">putlog "=- \002anti mass joins y \002Protection Anti Changes Massive NickNames\002 cargado -=" </strong><br><br>por algo esta ultima modifique el bind, sets y su proc la cual no entrara en conflicto con la original, funcionan ambas en una solo tcl.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8327">Arnold_X-P</a> — Wed Sep 14, 2016 11:34 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2016-09-14T22:49:40-04:00</updated>

		<published>2016-09-14T22:49:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105432#p105432</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105432#p105432"/>
		<title type="html"><![CDATA[Protect to massive change nicks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105432#p105432"><![CDATA[
<blockquote class="uncited"><div>juanamores tal vez esto es lo que usted esta buscando..  funciona muy bien</div></blockquote>Vale Arnold_X-P, voy a ver como lo uno con el original Mass Join, asi tengo ambas protecciones.<br>Muchas gracias amigo <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Wed Sep 14, 2016 10:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2016-09-15T13:11:54-04:00</updated>

		<published>2016-09-14T14:08:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105430#p105430</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105430#p105430"/>
		<title type="html"><![CDATA[Protect to massive change nicks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105430#p105430"><![CDATA[
<blockquote class="uncited"><div>juanamores perhaps this is for what you are looking<br>juanamores tal vez esto es lo que usted esta buscando..  funciona muy bien<div class="codebox"><p>Code: </p><pre><code>#--------------------------------------------------------------------------------------------------------------------##                                PROTECTION ANTI CHANGES MASSIVE IN NICKNAMES                                      ##--------------------------------------------------------------------------------------------------------------------##  AUTHOR :  Arnold_X-P BASED ON THE TCL OF RANA USMAN (ANTI MASS JOIN / JOIN FLOOD)## EMAIL  :  urquizoandrade@hotmail.com  /server irc.dal.net channel #tcls nick's Arnold_X-P &amp; sedition ## URL    :  http://forum.egghelp.org/viewtopic.php?t=20213# VERSION :  0.5################ DESCRIPTION ################# this tcl will protect its channel against massive changes of nicknames that the attackers use.######################### HOW TO ENABLE SCRIPT ##########################In Bots Partline simple give the following command --&gt; .chanset #channelname flood-nick nicks:seconds.   #Example : .chanset #yourchannel flood-nick 4:6 &lt;-- bot will detect if 4 change nicks in channel, in 6 seconds.######        .chanset #yourchannel flood-nick 0:0 &lt;-- the tcl will be disabled.   #ejemplo : .chanset #tu-canal flood-nick 4:6 &lt;-- el bot detectara 4 cambios de nicks en tu canal, en un lapso de 6 segundos. ######        .chanset #tu-canal flood-nick 0:0 &lt;-- la tcl estara desactivada.############################= CONFIGURATION SECTION =############################## Set the Lock Modes# Bot will change channel mode to the modes you will specify below in case the bot will detect change massive in nicks. # To Disable Mode change set it to ""# estos modos se usan en los nuevos ircds, son efectivos contra ataques.set changenickslockmodes "NMR"## Set the banmask type to use in banning, change massive in nicks # Currently BAN Type is set to 1 (*!*@any.domain.com),# BAN Types are given below;  # 1 - *!*@some.domain.com  # 2 - *!*@*.domain.com  # 3 - *!*ident@some.domain.com  # 4 - *!*ident@*.domain.com  # 5 - *!*ident*@some.domain.com  # 6 - *nick*!*@*.domain.com  # 7 - *nick*!*@some.domain.com  # 8 - nick!ident@some.domain.com  # 9 - nick!ident@*.host.comset bantype "1"## Set the time in seconds to Unlock Modes# The Bot will Unlock the channel after the specified time you will set belowset unlocktime "35"## Set The Punish Type# Set it to '1' if you want to add the Ban for change massive in nicks or bots list. By doing it Bot will ban the IP everytime when the# clone will join the channel even if it is unbanned from channel OR Simply a stick ban# Set it to '2' for a simple channel Ban :) :: RECOMMENDED ::set changenickspunish "2"## Set the reason you want to give while kickingset changenicksjreason "Not Changes Massive in NickNames!!! Stop."############################ CONFIGURATION ENDS HERE #############################--------------------------------------------------------------------------------------------------------------------##  SCRIPT STARTS FROM HERE.YOU CAN MAKE MODIFICATIONS AT UR OWN RISK, I DONT RESTRICT YOU TO NOT TO TOUCH THE CODE!  ##--------------------------------------------------------------------------------------------------------------------#bind flud - nick changenickflood:RanaUsmanproc changenickflood:RanaUsman {newnick uhost hand type chan } {global changenickslockmodes banmask unlocktime changenickspunish changenicksjreason botnickif {![botisop $chan] || [matchattr $hand of]} { return 0 }set banmask [changenickflood $uhost $newnick]if {($changenickspunish == 1)} {putquick "MODE $chan +$changenickslockmodes"newchanban $chan $banmask $botnick $changenicksjreasonputquick "KICK $chan $newnick :$changenicksjreason"utimer $unlocktime [list putquick "MODE $chan -$changenickslockmodes"]}if {($changenickspunish == 2)} {putquick "MODE $chan +$changenickslockmodes"putquick "MODE $chan +b $banmask"putquick "KICK $chan $newnick :$changenicksjreason"utimer $unlocktime [list putquick "MODE $chan -$changenickslockmodes"] }}proc changenickflood {uhost newnick} { global bantype  switch -- $bantype {   1 { set banmask "*!*@[lindex [split $uhost @] 1]" }   2 { set banmask "*!*@[lindex [split [maskhost $uhost] "@"] 1]" }   3 { set banmask "*!*$uhost" }   4 { set banmask "*!*[lindex [split [maskhost $uhost] "!"] 1]" }   5 { set banmask "*!*[lindex [split $uhost "@"] 0]*@[lindex [split $uhost "@"] 1]" }   6 { set banmask "*$newnick*!*@[lindex [split [maskhost $uhost] "@"] 1]" }   7 { set banmask "*$newnick*!*@[lindex [split $uhost "@"] 1]" }   8 { set banmask "$newnick![lindex [split $uhost "@"] 0]@[lindex [split $uhost @] 1]" }   9 { set banmask "$newnick![lindex [split $uhost "@"] 0]@[lindex [split [maskhost $uhost] "@"] 1]" }   default { set banmask "*!*@[lindex [split $uhost @] 1]" }   return $banmask  }}#-------------------------------------------------------------------------------------------------------------------------#putlog "=- \002Protection Anti Changes Massive in NickNames\002 For Arnold_X-P -="#-------------------------------------------------------------------------------------------------------------------------#</code></pre></div></div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8327">Arnold_X-P</a> — Wed Sep 14, 2016 2:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2016-09-13T16:41:25-04:00</updated>

		<published>2016-09-13T16:41:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105428#p105428</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105428#p105428"/>
		<title type="html"><![CDATA[Protect to massive change nicks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105428#p105428"><![CDATA[
<blockquote class="uncited"><div>juanamores is right, I checked the <a href="https://chathispano.com/ayuda/modos_de_canales" class="postlink">channel modes</a> and there's no mode to prevent nick changes, only option would be to lock the channel with whatever modes he wishes and do some bans.<br><br>Btw, you know about <a href="http://ircguard.iwalkalone.org/index.php" class="postlink">ircguard</a>?</div></blockquote>Yes, I know ircguard.<br>But I want to have everything in my bot , I avoid putting bots of third .<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Tue Sep 13, 2016 4:41 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2016-09-13T11:01:00-04:00</updated>

		<published>2016-09-13T11:01:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105427#p105427</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105427#p105427"/>
		<title type="html"><![CDATA[Protect to massive change nicks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105427#p105427"><![CDATA[
juanamores is right, I checked the <a href="https://chathispano.com/ayuda/modos_de_canales" class="postlink">channel modes</a> and there's no mode to prevent nick changes, only option would be to lock the channel with whatever modes he wishes and do some bans.<br><br>Btw, you know about <a href="http://ircguard.iwalkalone.org/index.php" class="postlink">ircguard</a>?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Tue Sep 13, 2016 11:01 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2016-09-12T09:24:51-04:00</updated>

		<published>2016-09-12T09:24:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105422#p105422</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105422#p105422"/>
		<title type="html"><![CDATA[Protect to massive change nicks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105422#p105422"><![CDATA[
<blockquote class="uncited"><div>modern ircds have features for that like the +N channel mode preventing nick changes incase of abuse i saw you are running bot on a network running ircu wich doesnt provide such features</div></blockquote>On the network that I frequent, there is no way (<a href="https://chathispano.com/ayuda/modos_de_canales" class="postlink">modes</a>) to prevent nicks changes.<blockquote class="uncited"><div>miranda.chathispano.com, running version u2.10.H.10.238</div></blockquote><blockquote class="uncited"><div>but the spike tcl should do the trick tho to detect fast nick changes  and set ban and channel modes</div></blockquote>Would you help me adapt this part of the code in the previous script?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Mon Sep 12, 2016 9:24 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2016-09-12T05:20:21-04:00</updated>

		<published>2016-09-12T05:20:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105420#p105420</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105420#p105420"/>
		<title type="html"><![CDATA[Protect to massive change nicks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105420#p105420"><![CDATA[
modern ircds have features for that like the +N channel mode preventing nick changes incase of abuse i saw you are running bot on a network running ircu wich doesnt provide such features<br><br>but the spike tcl should do the trick tho to detect fast nick changes  and set ban and channel modes<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Mon Sep 12, 2016 5:20 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2016-09-06T10:10:22-04:00</updated>

		<published>2016-09-06T10:10:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105397#p105397</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105397#p105397"/>
		<title type="html"><![CDATA[Protect to massive change nicks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105397#p105397"><![CDATA[
<blockquote class="uncited"><div>In this case you can't use Spike's script.<br><br>How many times dose a bot change it's name in the massive nicks changes flood? They change to some random characters or there's a pattern? Copy/paste a small sample of their attack.</div></blockquote>The clones changes their nicks in seconds and they doesn´t follow any random characters neither nor any pattern.<br><br>The attack:<blockquote class="uncited"><div>21:04 ?                         =&gt; ¦ jaimon5 es ahora MeninaVenen0<br>21:04 ?                         =&gt; ¦ hgasta es ahora roperitolok<br>21:04 ?                         =&gt; ¦ hamorositat es ahora vivi15<br>21:04 ?                         =&gt; ¦ kimmara es ahora horacio65<br>21:04 ?                         =&gt; ¦ leonardittoo es ahora Petardita<br>21:04 ?                         =&gt; ¦ lulun es ahora windowsxd<br>21:04 ?                         =&gt; ¦ mamasoota es ahora podesal<br>21:04 ?                         =&gt; ¦ walkiriita es ahora hamandda^<br>21:04 ?                         =&gt; ¦ chicaa_solaa es ahora demasita15<br>21:04 ?                         =&gt; ¦ kaosmalign es ahora reseta<br>21:04 ?                         =&gt; ¦ nani418011 es ahora solocamsita<br>21:04 ?                         =&gt; ¦ deniise es ahora cacalito45<br>21:04 ?                         =&gt; ¦ cocasa es ahora ana_lokita53<br>21:04 ?                         =&gt; ¦ soldadito22 es ahora SERE-LEYENDA^<br>21:04 ?                         =&gt; ¦ camilitoo es ahora O_oJo^^<br>21:04 ?                         =&gt; ¦ GOGOVIDEO es ahora VeNe_21<br>21:04 ?                         =&gt; ¦ joselo58 es ahora jaiimito<br>21:04 ?                         =&gt; ¦ quesoods es ahora analuzzia</div></blockquote>I have found the other script that puts bans and change the channel mode (example +iRm).<br>Now, I would like to implement to this script how to control massive nicks changes.<br>The scripts only should work only in one specific channel.<br><div class="codebox"><p>Code: </p><pre><code>#--------------------------------------------------------------------------------------------------------------------##                                 ANTI MASS JOIN / JOIN FLOOD PROTECTION SCRIPT BY RANA USMAN                        ##--------------------------------------------------------------------------------------------------------------------##  AUTHOR :  RANA USMAN## EMAIL  :  coolguy_rusman@yahoo.com , usmanrana33@hotmail.com## URL    :  www.ranausman.tk , www.airevision.tk# VERSION :  1# If you have any suggesstion about my script kindly let me know i will be glad to look forward :)################ DESCRIPTION #################Assalam O Aleikum n Hiya :) again ok i have written this script cuz i havent found any good mass join protection yet.There #are different join/part protection available but not a sinlge MASSJOIN / JOIN FLOOD protection.Simply what this script do#is it will stop the heavy amout of clones joining your channel for flood n for more protection it changes the modes of the #channel to the Modes specified by you in configuration section.More it will gonna ban the flooding clone's IP n you have #both options for banning stick ban n Simple chan ban :))######################### HOW TO ENABLE SCRIPT ##########################PartyLine : (While Your in DCC chat with bot the place where you give commands like .+chan #chan is called partyline)#In Bots Partline simple give the following command --&gt; .chanset #channelname flood-join joins:seconds #Example : .chanset #yourchannel flood-join 4:6 &lt;-- bot will detect if 4 clone joins in 6 seconds ::) ( 0:0 to disable )############################= CONFIGURATION SECTION =############################## Set the Lock Modes # Bot will change channel mode to the modes you will specify below in case the bot will detect join flood# To Disable Mode change set it to "" set joinlockmodes "iRm"## Set the banmask type to use in banning the join floods# Currently BAN Type is set to 1 (*!*@any.domain.com),# BAN Types are given below;# 1 - *!*@some.domain.com # 2 - *!*@*.domain.com# 3 - *!*ident@some.domain.com# 4 - *!*ident@*.domain.com# 5 - *!*ident*@some.domain.com# 6 - *nick*!*@*.domain.com# 7 - *nick*!*@some.domain.com# 8 - nick!ident@some.domain.com# 9 - nick!ident@*.host.comset bantype "1"## Set the time in seconds to Unlock Modes # The Bot will Unlock the channel after the specified time you will set belowset unlocktime "15"## Set The Punish Type# Set it to '1' if you want to add the Ban for joinflood in bots list.By doing it Bot will ban the IP everytime when the # clone will join the channel even if it is unbanned from channel OR Simply a stick ban# Set it to '2' for a simple channel Ban :) :: RECOMMENDED ::set joinpunish "2"## Set the reason you want to give while kicking set jreason "Mass Join Flood"############################ CONFIGURATION ENDS HERE #############################--------------------------------------------------------------------------------------------------------------------##  SCRIPT STARTS FROM HERE.YOU CAN MAKE MODIFICATIONS AT UR OWN RISK, I DONT RESTRICT YOU TO NOT TO TOUCH THE CODE!  ##--------------------------------------------------------------------------------------------------------------------#bind flud - join joinflood:RanaUsmanproc joinflood:RanaUsman {nick uhost hand type chan} {global joinlockmodes banmask unlocktime joinpunish jreason botnickif {![botisop $chan] || [matchattr $hand of]} { return 0 }set banmask [joinpart:banmask $uhost $nick]if {($joinpunish == 1)} { putquick "MODE $chan +$joinlockmodes"newchanban $chan $banmask $botnick $jreasonputquick "KICK $chan $nick :$jreason"utimer $unlocktime [list putquick "MODE $chan -$joinlockmodes"]}if {($joinpunish == 2)} { putquick "MODE $chan +$joinlockmodes"putquick "MODE $chan +b $banmask"putquick "KICK $chan $nick :$jreason"utimer $unlocktime [list putquick "MODE $chan -$joinlockmodes"] }}proc joinpart:banmask {uhost nick} { global bantype  switch -- $bantype {   1 { set banmask "*!*@[lindex [split $uhost @] 1]" }   2 { set banmask "*!*@[lindex [split [maskhost $uhost] "@"] 1]" }   3 { set banmask "*!*$uhost" }   4 { set banmask "*!*[lindex [split [maskhost $uhost] "!"] 1]" }   5 { set banmask "*!*[lindex [split $uhost "@"] 0]*@[lindex [split $uhost "@"] 1]" }   6 { set banmask "*$nick*!*@[lindex [split [maskhost $uhost] "@"] 1]" }   7 { set banmask "*$nick*!*@[lindex [split $uhost "@"] 1]" }   8 { set banmask "$nick![lindex [split $uhost "@"] 0]@[lindex [split $uhost @] 1]" }   9 { set banmask "$nick![lindex [split $uhost "@"] 0]@[lindex [split [maskhost $uhost] "@"] 1]" }   default { set banmask "*!*@[lindex [split $uhost @] 1]" }   return $banmask  }}#-------------------------------------------------------------------------------------------------------------------------#putlog "=- \002ANTI MASS JOIN/JOIN FLOOD PROTECTION BY RANA USMAN (www.ranausman.tk) HAS BEEN  LOADED SUCCESSFULLY \002 -="#-------------------------------------------------------------------------------------------------------------------------#</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Tue Sep 06, 2016 10:10 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2016-09-06T08:04:40-04:00</updated>

		<published>2016-09-06T08:04:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105396#p105396</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105396#p105396"/>
		<title type="html"><![CDATA[Protect to massive change nicks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105396#p105396"><![CDATA[
In this case you can't use Spike's script.<br><br>How many times dose a bot change it's name in the massive nicks changes flood? They change to some random characters or there's a pattern? Copy/paste a small sample of their attack.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Tue Sep 06, 2016 8:04 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2016-09-06T05:31:28-04:00</updated>

		<published>2016-09-06T05:31:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105395#p105395</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105395#p105395"/>
		<title type="html"><![CDATA[Protect to massive change nicks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105395#p105395"><![CDATA[
How I can protect a channel of massive change nicks ?<br>They have clones attacked and clones nicks are changed massively.<br>Already configured the <strong class="text-strong">flood-join</strong> but want to control massive changes nicks.<br><br><span style="color:blue"><strong class="text-strong">EDIT:</strong></span><br>I found this  <strong class="text-strong">SpiKe^^</strong> 's script.<br>How I can do to work only in one specific channel ?<br><span style="text-decoration:underline">In my channel is allowed to repeat and use scripts dances (flood)</span> , I do not want that being affected by the script.<br><br>I just want to control clones attacks and massive changes nicks, <span style="text-decoration:underline">NOT flood by repetition NOR by number of sucesives lines written on</span>.<br><div class="codebox"><p>Code: </p><pre><code># multi-host-nick-flood.tcl v1.6.1 (1Mar2016) by SpiKe^^, closely based on# repeat.tcl v1.1 (9Apr1999) by slennox &lt;slenny@ozemail.com.au&gt;# Special Thanks go out to speechles &amp; caesar## NEW ADDED: This version adds three new settings  (see below) ### Nick flood, kick-ban on repeats:seconds #set mhnk(flood) 3:10# Nick flood kick-ban reason #set mhnk(reasn) "Nick Flood!"# Max number of bans to stack in one mode command #set mhnk(maxb) 6# Max number of kicks to stack in one kick command #          &lt;- NEW SETTING &lt;-# NOTE: many networks allow more than one nick to be kicked per command. ##       set this at or below the max for your network.set mhnk(maxk) 3# Length of time in minutes to ban Nick flooders ## - set 0 to disable this script removing bans (ex. set mhnk(btime) 0) #set mhnk(btime) 1# After a valid Nick flood, script will continue to ## kick-ban offenders for an additional 'x' seconds #set mhnk(xpire) 10# Set the type of ban masks to use #                          &lt;- NEW SETTING &lt;-#  1 = use host/ip specific bans (ex. *!*@some.host.com) ##  2 = use wide masked host/ip bans (ex. *!*@*.host.com) ##      note: setting 2 requires eggdrop 1.6.20 or newer. #set mhnk(btype) 2# Set protected host(s) that should not be wide masked #      &lt;- NEW SETTING &lt;-# - Example:  set mhnk(phost) "*.undernet.org"#  Note: this setting only applies to ban type 2 above! ##  Note: set empty to not protect any hosts (ex. set mhnk(phost) "") ##  Note: space separated if listing more than one protected host #set mhnk(phost) ""# Set channel mode(s) on flood detected. ## - set empty to disable setting channel modes (ex. set mhnk(mode) "") #set mhnk(mode) "imN"# Remove these channel modes after how many seconds? #set mhnk(mrem) 20# END OF SETTINGS # Don't edit below unless you know what you're doing #bind nick - * nk_bindnickproc nk_bindnick {oldnick uhost hand chan nick} {  global mhnk mhnc mhnq  set uhost [string tolower $nick!$uhost]  set chan [string tolower $chan]  if {[isbotnick $nick]} { return 0 }  if {[matchattr $hand f|f $chan]} { return 0 }  set utnow [unixtime]  set target [lindex $mhnk(flood) 0]  if {[info exists mhnc($chan)]} {    set uhlist [lassign $mhnc($chan) cnt ut]    set utend [expr {$ut + [lindex $mhnk(flood) 1]}]    set expire [expr {$utend + $mhnk(xpire)}]    if {$cnt &lt; $target} {      if {$utnow &gt; $utend} { unset mhnc($chan) }    } elseif {$utnow &gt; $expire} { unset mhnc($chan) }  }  if {![info exists mhnc($chan)]} {    set mhnc($chan) [list 1 $utnow $uhost]    return 0  }  incr cnt  if {$cnt &lt;= $target} {    if {[lsearch $uhlist $uhost] == -1} { lappend uhlist $uhost }    if {$cnt &lt; $target} {      set mhnc($chan) [linsert $uhlist 0 $cnt $ut]    } else {      set mhnc($chan) [list $cnt $ut]      if {$mhnk(mode) ne "" &amp;&amp; [string is digit -strict $mhnk(mrem)]} {        putquick "MODE $chan +$mhnk(mode)"        utimer $mhnk(mrem) [list putquick "MODE $chan -$mhnk(mode)"]      }      nk_dobans $chan $uhlist    }    return 0  }  if {![info exists mhnq($chan)]} {    utimer 1 [list nk_bque $chan]    set mhnq($chan) [list $uhost]  } elseif {[lsearch $mhnq($chan) $uhost] == -1} {    lappend mhnq($chan) $uhost  }  if {[llength $mhnq($chan)] &gt;= $mhnk(maxb)} {    nk_dobans $chan $mhnq($chan)    set mhnq($chan) ""  }  return 0}proc nk_dobans {chan uhlist} {  global mhnk  if {![botisop $chan]} return  set banList ""  set nickList ""  foreach ele $uhlist {    scan $ele {%[^!]!%[^@]@%s} nick user host    if {$mhnk(btype) == 2} {      set type 4      foreach ph $mhnk(phost) {        if {[string match -nocase $ph $host]} {          set type 2  ;  break        }      }      set bmask [maskhost $ele $type]    } else {  set bmask "*!*@$host"  }    if {[lsearch $banList $bmask] == -1} { lappend banList $bmask }    if {[lsearch $nickList $nick] == -1} { lappend nickList $nick }  }  stack_bans $chan $mhnk(maxb) $banList  foreach nk $nickList {    if {[onchan $nk $chan]} {  lappend nkls $nk  } else { continue }    if {[llength $nkls] == $mhnk(maxk)} {      putquick "KICK $chan [join $nkls ,] :$mhnk(reasn)"      unset nkls    }  }  if {[info exists nkls]} {    putquick "KICK $chan [join $nkls ,] :$mhnk(reasn)"  }  if {$mhnk(btime) &gt; 0} {    set expire [expr {[unixtime] + $mhnk(btime)}]    lappend mhnk(rmls) [list $expire $chan $banList]  }}proc stack_bans {chan max banlist {opt +} } {  set len [llength $banlist]  while {$len &gt; 0} {    if {$len &gt; $max} {      set mode [string repeat "b" $max]      set masks [join [lrange $banlist 0 [expr {$max - 1}]]]      set banlist [lrange $banlist $max end]      incr len -$max    } else {      set mode [string repeat "b" $len]      set masks [join $banlist]      set len 0    }    putquick "MODE $chan ${opt}$mode $masks"  }}proc nk_bque {chan} {  global mhnq  if {![info exists mhnq($chan)]} { return }  if {$mhnq($chan) eq ""} { unset mhnq($chan) ; return }  nk_dobans $chan $mhnq($chan)  unset mhnq($chan)}proc nk_breset {} {  global mhnc mhnk  set utnow [unixtime]  set target [lindex $mhnk(flood) 0]  foreach {key val} [array get mhnc] {    lassign $val cnt ut    set utend [expr {$ut + [lindex $mhnk(flood) 1]}]    set expire [expr {$utend + $mhnk(xpire)}]    if {$cnt &lt; $target} {      if {$utnow &gt; $utend} { unset mhnc($key) }    } elseif {$utnow &gt; $expire} { unset mhnc($key) }  }  if {[info exists mhnk(rmls)]} {    while {[llength $mhnk(rmls)]} {      set next [lindex $mhnk(rmls) 0]      lassign $next expire chan banList      if {$expire &gt; $utnow} {  break  }      set mhnk(rmls) [lreplace $mhnk(rmls) 0 0]      if {![info exists rmAra($chan)]} {  set rmAra($chan) $banList      } else {  set rmAra($chan) [concat $rmAra($chan) $banList]  }    }    foreach {key val} [array get rmAra] {      set banList ""      foreach mask $val {        if {![ischanban $mask $key]} {  continue  }        lappend banList $mask      }      if {$banList eq ""} {  continue  }      if {![botisop $key]} {        set mhnk(rmls) [linsert $mhnk(rmls) 0 [list $utnow $key $banList]]      } else {  stack_bans $key $mhnk(maxb) $banList -  }    }    if {![llength $mhnk(rmls)]} {  unset mhnk(rmls)  }  }  utimer 30 [list nk_breset]}if {![info exists nk_running]} {  utimer 10 [list nk_breset]  set nk_running 1}set mhnk(flood) [split $mhnk(flood) :]set mhnk(btime) [expr {$mhnk(btime) * 60}]set mhnk(phost) [split [string trim $mhnk(phost)]]if {$mhnk(btime)==0 &amp;&amp; [info exists mhnk(rmls)]} {  unset mhnk(rmls)  }putlog "Loaded multi-host-nick-flood.tcl v1.6.1 by SpiKe^^" </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Tue Sep 06, 2016 5:31 am</p><hr />
]]></content>
	</entry>
	</feed>
