This is the new home of the community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.

For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

AllProtection.tcl (Stable: v4.8 / Beta: v4.9b4)

Support & discussion of released scripts, and announcements of new releases.
Post Reply
User avatar
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon

Re: rehash

Post by Sir_Fz »

gembels wrote:Tested with putdcc $antispam(idx) quit

It didnt change ident, realname and IP, it just change the nickname only.
Can you share your changes so I can understand what you're trying to do?
Posts: 26
Joined: Sat Jul 07, 2012 9:31 pm

Post by gembels »

Code: Select all

proc timerehash {} {

 set listnamabot [list "sinagabonar" "rukiyati"]
 set listident [list "bonar" "yati"]
 set listrealname [list "android" "andro"]
 set listip [list "" "" ]
on antispamcore because I only use IPV4 so I bypass your var from the top.. I changed to old version and I am using timerehash to disconnected them and reconnected with new ip, new nick, new ident and new realname..

Code: Select all

  proc antispamcore {m h args} {
     variable antispam; variable Sec
     if {![info exists antispam(idx)] || ![valididx $antispam(idx)]} {
         if {[info exists antispam(idx)]} {unset antispam(idx)}
         if {[info exists antispam(cnick)]} {unset antispam(cnick)}
         foreach {s p} [split [lindex [lindex $::servers [expr {[incr antispam(next)]%[llength $::servers]}]] 0] :] {break}
         foreach c [channels] {
             if {[vcg $c ap:antispam] && [lindex [split [channel get $c ap:antispam]] 0] == "+"} {
                 set ::my-ip $antispam(ip); set ::my-hostname $antispam(host)
                 control [connect $s $p] [namespace current]::antispambot
     putlog "\002AP\002: AntiSpamBot: Connecting to $s:$p..."
     putlog "\002AP\002: AntiSpamBot: IP $antispam(ip)"    
     set asbc 0
     foreach c [channels] {
         set mins [expr {[scan $m %d]+([scan $h %d]*60)}]
         foreach {off greet cycle idle} [split [channel get $c ap:antispam]] {break}
         if {$off == "+"} {incr asbc}
         if {[onchan $antispam(cnick) $c] && $off != "+"} {
                 putdcc $antispam(idx) "part $c"
         } elseif {$cycle != 0 && $mins%$cycle == 0 && [onchan $antispam(cnick) $c]} {
             if {![info exists antispam([set e [string tolower $c]:idle])]} {set antispam($e) [unixtime]}
             if {[unixtime]-$antispam($e) < $idle*60 && [botisop $c]} {
                 putlog "\002AP\002: AntiSpamBot: mondar mandir $c..."
         set listnamabot [list "telstrax" "dayplex"]
         set namabot [lindex $listnamabot [rand [llength $listnamabot]]]      
             putdcc $antispam(idx) "join $c"
             putdcc $antispam(idx) "nick $namabot"
             putdcc $antispam(idx) "privmsg $c :[lindex $antispam(r) [rand [llength $antispam(r)]]]"
             after 30000
         putdcc $antispam(idx) "part $c"
         } {if {![onchan $antispam(cnick) $c] && $off == "+"} {putdcc $antispam(idx) "join $c"}}
     if {!$asbc} {
         putdcc $antispam(idx) quit
         putlog "\002AP\002: AntiSpamBot: Disconnected (disabled on all channels)..."
So i am looking for solution to make antispamcore quit without rehash comand..

thanks in advance
User avatar
Posts: 97
Joined: Mon Jan 30, 2017 3:24 pm

bad nicks

Post by m4s »

Hi Sir_Fz!

The script is super but I found something.

I set the bot to watch bad nicks.
My config is: ap:bnicks: {+ 0 bk 11}

When the idiot with bad nick joined to my channel my bot kicked it then put the ban to the bad nick.

According to the config the bot first should ban then kick, right?
Shall I change anything in the config?

Thank You! :)
Last edited by m4s on Sat Jan 20, 2018 2:24 pm, edited 1 time in total.
Posts: 24
Joined: Thu Jul 12, 2007 11:44 am

ChanServ (-l)

Post by taxick »


I'm totally new to IRC, and I'm trying to go get allprotection to work in my channel, I'm running the AllProtection v4.9b4

The problem is, my channel get spammed by the bot / chanserv..

The bot (Blop) set +I and ChanServ remove it again.

How can I fix this? So it don't spam the chat - Please help.
(14:00:02)  -› Blop (+l) 11
(14:00:02)  -› ChanServ (-l) #botheaven
(14:01:02)  -› Blop (+l) 11
(14:01:02)  -› ChanServ (-l) #botheaven
(14:02:02)  -› Blop (+l) 11
(14:02:02)  -› ChanServ (-l) #botheaven
(14:03:02)  -› Blop (+l) 11
(14:03:02)  -› ChanServ (-l) #botheaven
(14:04:02)  -› Blop (+l) 11
(14:04:02)  -› ChanServ (-l) #botheaven
(14:05:02)  -› Blop (+l) 11
(14:05:02)  -› ChanServ (-l) #botheaven
(14:06:02)  -› Blop (+l) 11
(14:06:02)  -› ChanServ (-l) #botheaven
(14:07:02)  -› Blop (+l) 11
(14:07:02)  -› ChanServ (-l) #botheaven
(14:08:02)  -› Blop (+l) 11
(14:08:02)  -› ChanServ (-l) #botheaven
(14:09:02)  -› Blop (+l) 11
(14:09:03)  -› ChanServ (-l) #botheaven
(14:10:02)  -› Blop (+l) 11
(14:10:02)  -› ChanServ (-l) #botheaven
(14:11:02)  -› Blop (+l) 11
(14:11:02)  -› ChanServ (-l) #botheaven
And it keep spamming this for ever..
Revered One
Posts: 1195
Joined: Thu Jan 15, 2009 12:55 am

Re: ChanServ (-l)

Post by willyw »

taxick wrote: ...

The bot (Blop) set +I and ChanServ remove it again.
First, are you sure that is +I ?
Due to that "11" in there, it looks like it might be +l (lower case L)

It depends on what the problem really is.
Meaning - do you want the bot to monitor something such that it might need to set +l , or not?
If yes, then you need to examine the settings of Chanserv itself, to see why it is un-doing what the bot does. I suspect some sort of mode lock setting, but usually you can dig through all the settings descriptions with something like: /msg chanserv help

If no, then you might be satisfied to simply shut off that particular protection function in AP.
Try doing:
.chaninfo #channelname
and look for:
ap:limit: 0

If it is set to zero, like the example line above, then it is off.
If not zero, then it is on.
Read about it in the script itself.
Experiment with it, and see if that helps.

I hope this helps.
For a fun (and popular) Trivia game, visit us at: #science-fiction . Over 300K Q & A to play in BogusTrivia !
Posts: 10
Joined: Wed Apr 18, 2012 6:17 am
Location: Pakistan

Post by aleepervaiz »


I have observed one thing which is missing in all flood protection, when a mass join happens in a channel the bot just only set the modes +mR on the channel which is mostly in use but it wont kick all the flood bots who joins the channel.

I have noticed another thing that there are 2 type of mass join in the script

Code: Select all

## 15 ## Join flood.

lappend ap:udefs {ap:cjoin "3:2 120 kb 2"}

# Join flood: Check for join flood from same idents as well? (0: no, 1: yes)
set joinflood(checkident) 1

# Join flood: Lock channel when triggered ? (1: yes , 0: no)
set joinflood(lockchan) 1

# Join flood: If lock channel is enable, what modes ?
set joinflood(lockmode) "mR-k clone.join.flood"

# Join flood: lock time in seconds.
set joinflood(locktime) 45

set joinflood(kmsg) "Join flood detected. $kckcount(form)"

set joinflood(wmsg) "Warning: you've triggered join flood protection, further offence will cause harsher actions."

## Edit the following only if you choose a punish method above 5 (oper commands):

set joinflood(ktype) 2

set joinflood(klmsg) "Join floods are not permissable on this network."

set joinflood(ktime) 0
and the second one is

Code: Select all


## 6 ## Botnet join flood.

lappend ap:udefs {ap:massjoin "9:3 mR-k join.flood 60"}
The bot only kicks on clone joining but wont kick on botnet flood, this script should kick those nicks over mass joining coming from different ip or idents, like i have seen now a days people use hash tables in mirc which kick all of them together in a one go without even any lag. This script is amazing have each and every feature but the only thing is missing is this which i have observed.
Posts: 34
Joined: Wed Oct 21, 2009 3:59 am

Problem with timers

Post by LoKii »

Hello everyone,

I'm having a small snag here with the allprotection.tcl.

When the bot performs a channel lock for whatever reason,
it does not unlock them after the attack.

In DCC it spits out:
<b0x> [13:20:25] Tcl error in script for 'timer31478':
<b0x> [13:20:25] couldn't compile regular expression pattern: quantifier operand invalid
Any ideas on how to get it to unlock the channel after the specified time (in my case its 20 secs) ?

User avatar
Posts: 97
Joined: Mon Jan 30, 2017 3:24 pm

Post by m4s »


Is there any possibility to set a host as an exempt and the bot won't think ppl from this host are clones?

On my network I have a special vhost
There are two other friends on my channel with the same host (different ident).
One of them has +of on my bot, another has nothing and I am the owner.

When I am joined to my own channel the bot is bankicked us because recognized us as clones.
This was set in the script: variable exmptype {+fmnol|+fmnol}

Thank You!
Posts: 30
Joined: Thu Apr 30, 2015 11:23 pm
Location: Pakistan

all protection 4.9 beta

Post by F|irT »

I am Using ALL protection 4.9 beta.

using this option .

Code: Select all

## 8 ## Advertising. 

# NOTE: This protection also works for private advertising. 

# Use .chanset #channel ap:adv + <btime> <pmeth> <btype> (to enable) 
# set default value here: (+ enabled, - disabled) 
lappend ap:udefs {ap:adv "+ 180 kb 2"} 

# Set here the string you want to exempt (don't consider as spam): 
# Note: %chan = current channel. Also, you can change these for every channel via DCC 
# using the .ap:add command. (no wildcards used) 
set adexempts(global) { %chan } 
i have add some words that bot ignores from spam or repeating . like this

Code: Select all

[21:31] <F|irT> .ap:add adexempts #SuKooN hello 
[21:31] <(monit0r> AP: Succesfully added hello to #sukoon adexempts list. 
[22:05] <F|irT> .ap:add bwords #sukoon hello 
[22:05] <(monit0r> AP: Succesfully added hello to #sukoon bwords list. 
[22:06] <F|irT> .ap:add adwords #sukoon hello 
[22:06] <(monit0r> AP: Succesfully added hello to #sukoon adwords list. 
[22:11] <F|irT> .ap:add adexempts global hello 
[22:11] <(monit0r> AP: Succesfully added hello to global adexempts list. 
i check all this has been added.

Code: Select all

[22:07] <F|irT> .ap:list adwords #sukoon 
[22:07] <(monit0r> AP: #sukoon adwords list: hello 
[22:08] <F|irT> .ap:list bwords #sukoon 
[22:08] <(monit0r> AP: #sukoon bwords list: hello 
[22:08] <F|irT> .ap:list adexempts #sukoon 
[22:08] <(monit0r> AP: #sukoon adexempts list: hello,hi 
in repeatl kick format why they are kicking user for such words i add hello
is there any thing i missing ? or it will not protect the word ?

Code: Select all

[22:11] <kamran`> hello 
[22:11] <kamran`> hello 
[22:11] <kamran`> hello 
[22:11] * kamran` was kicked by monit0r (Text Repeat Usage. Banned (KiCk No:66)) 
but bot does not protect user from repeating kick if the user repeat the same word like hello . as the option says it will never kick .

Code: Select all

set adexempts(global) { %chan } 
it mean every one is allow to write bot will never read as spam.

Any help any thing wich i am doing wrong any suggestion any help on this format will be gr8full thanks.

User avatar
Posts: 127
Joined: Mon Aug 29, 2016 9:40 am

Few bugs in All Protection (REMOTE)

Post by Fahad »

Hello ! I recently put ALL PROTECTION (Remote) on my Simple mIRC
I face 2 problems...

1: I cannot change the kick message.

2: Why the Remote Sets my nick -R every-time as i always sets my nickname to this mode /mode Fahad +CR

overall I like the All Protection remote... Please help me to fix these two problems.
Posts: 1
Joined: Thu Nov 08, 2018 8:14 am

bad channel

Post by skidrow52 »

The new 4.9b script is working very good, I want to hide the bad channel name from the kick message
User avatar
Mint Rubber
Posts: 3776
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

In 4.9b4 there's this:

Code: Select all

# Bad chans kick message:
set bchan(kmsg) "Bad chan detected. $kckcount(form)"
and you can also change this:

Code: Select all

set kckcount(form) "(%rate) :: \[%date\] - Banned %btime minutes ·%kcount·"
Once the game is over, the king and the pawn go back in the same box.
Posts: 30
Joined: Thu Apr 30, 2015 11:23 pm
Location: Pakistan

does all protection support ipv6 ?

Post by F|irT »

I am Using AllProtection v4.9b4 by Opposing On Dalnet Network

I am having some issue .

1, my bot get excess flood without any reason or any movement. mean there is nothing flood around not on any channels not even in pvt

2, my bot does not ping reply .

3 my bot lags .

4, i have try many shell company having same issue with ipv6 shell .

here are some logs .

[02:39] * Quits: @monit0r ( (Excess Flood)
[02:39] * Joins: monit0r (
[02:39] * ChanServ sets mode: +o monit0r

[04:24] -> [monit0r] PING
[04:25] [monit0r PING reply]: 1min 8secs

this shoes ping time . almost bot does not give ping reply.

aNd problem on protection is .

ap:revdoor: {3 120 kb 2}

this option remain on after bot restart by defult . we can turn it off like ap:revdoor - 0:0 kb 2

but after restart this option on others won't
[04:32] -> [monit0r] PING
but went to sleep not ping reply yet.
[04:38] -> [monit0r] PING

[04:32] <(monit0r> [23:32:01] CTCP PING: 1548804722 from F|irT (
[04:38] <(monit0r> [23:38:24] CTCP PING: 1548805105 from F|irT (

let me know what is the extualll issue thanks.
User avatar
Posts: 12
Joined: Mon Jul 09, 2018 8:11 am
Location: Lebanon

Re: AllProtection.tcl (Stable: v4.8 / Beta: v4.9b4)

Post by mondino »

Dear Fayez,

I hope this email finds you well.

I am writing you regarding your nice All Protection 4.7 version that I use with my channel eggdrop bot.

I face a problem with using the ban type 4. As your script says, the ban mask is: # 4 : *!*@*.host.tld while when the bot bans, it bans: Example: +b *!*@91.141.145.*

I really need it to ban: +b *!*@x.y.*

May you help me get this done, or just lead me to what I should do to get my eggdrop bot ban this ban mask type?

I appreciate your help and keep it up going with your nice TCL.

By the way, I am "mondino", owner of #CafeChat on DALnet.

Best regards,
User avatar
Posts: 399
Joined: Sat Feb 22, 2020 10:29 am

Post by ComputerTech »

A Suggestion.

To allow the file aplists to be set by user, and Not hardcoded.

No a big issue at all, just a suggestion.

Another one is, adding punishment's, Gline,Gzline and shun,
Since Kline and kill, arn't exactly the most effective punishments.


Kline/Gline uses more bandwidth in general, due to ip lookup or idemt lookup,
While GZline simply bans the IP, much more effective, and uses less resources.

o:line bots using AllProtection, are probably there to fight/defend against Flood bots,
So GZline, is a Great punishment towards these :)

Kline in general is kind of useless, unless you use chary, which i *think* uses Kline only, and kind of unites Gline and Kline into one, but most other IRCd's, (e.g) Unrealircd, Inspircd, all use kline,gline,gzline, but i recommend gline over kline, as Kline is ONE Server, and majority of IRC Networks, will most lightly have more than one server.

Hope this helps, towards AllProtection :)
Post Reply