#PBC Official Forum  #PBC Official Forum
Noi Iti Protejam Chanu De LAMERI
#PBC Official Forum
FAQFAQ  CautareCautare  InregistrareInregistrare  ProfilProfil  MembriMembri  GrupuriGrupuri  Mesaje privateMesaje private  AutentificareAutentificare 

roguard.tcl

 
Raspunde la subiect    Pagina de start a forumului #PBC Official Forum -> TCL Scripts
Subiectul anterior :: Subiectul urmator  
Autor Mesaj
Suparatu
Administrator
Administrator
Suparatu

Data inscrierii: 12/Mai/2008
Mesaje: 24

MesajTrimis: 17/05/2008 06:56    Titlul subiectului: roguard.tcl Raspunde cu citat (quote)

##########################[ ALL FLOOD PROTECTION ]###########################
# #
# Author : Opposing (Fz@nexushells.net) - #nexushells @ DALnet #
## #
# Descriere: Toate protectiile de canal tradus setat de HangMan #
# #
##############################
# Configuratia incepe aici : #
# __________________________ #


########################
# SETTINGS & iNFO #
########################

### READ THIS FIRST:
# * AllFloodProtection exempts channel ops, friends (+f) and masters (+mo) from protection by default.
# That means users with the +f or +mo flags will not be affected by any protection except for mass
# kick/deop/ban protections. (You can add hosts to the +f handle if you don't want the bot to ban them).
#
# * AllFloodProtection does not use the internal banlist of the bot so you will not have to worry
# about other ops not being able to remove the bans, they can! (feature or bug, I dont care :P)
#
# * AllFloodProtection will not trigger protection on a channel where the bot is not oped, so your
# bot will not send redundant commands to the server. (good for the lag)
#
# * Read all the information provided below so you won't miss any important info for configuring.
### Enjoy configuring...

# Seteaza aici cine va fi exceptat de la protectii:
# 0: Nici aia cu voce s au op
# 1: Cei cu voce
# 2: Halfops
# 3: Cei halfops s au cu voce
set exmptype 3

# Seteaza aici pe cine vrei sa anunte in caz de botnet flood
# for mass (botnet) flood.
# example: set notifyusers "IuClik"
set notifyusers "IuClik"

# Seteaza aici ce mesaj sa dea notice botu in cazu in care trebuie sa inchida canalul
# Botnet flood. leave "" if you don't wish the notice to be sent.
set btclocked(lnotc) "Ne pare rau trebuie sa moderam canalul din cauza floodului"

# Aici setezi kick counteru de fapt lasal asha
# After setting this variable, you can use $kcform to add a kick counter to the bot's
# kick msg.
# NOTE: %kcount = number of kicks.
set kckcount(form) "·%kcount·"

# aici setezi in ce fisier va fi salvat kickcounter lasal asha
set kckcount(file) "scripts/kcount.txt"

# Daca vrei ca botul sa caute clone cand intra prima oara pe canal
# and gains op ? (0: no , 1: yes)
# NOTE: This may be CPU intensive if your bot is on big channels or on alot of channels.
set cbcd(check) 1

# If cbcd(check) is set to 1, change this if you want the bot to only check for certain types
# of protection in the nicklist.
# nosense:kick: check for random drones
# clones:kick : check for excess clones and kick them
# bnick:kick : kick bad nicks
# bident:kick : Kick users with bad idents.
set cbcd(procs) {nosense:kick clones:kick bnick:kick bident:kick}

# If cbcd(check) is set to 1, on what channels do you want it to be applied ? (use "*" to make it work on all chans)
# example: set cbcd(chans) "#chan1 #chan2"
set cbcd(chans) "*"

# Your service's chanserv nick.
# example: set serv(nick) "CHANSERV" or "PRIVMSG chanserv@services.dal.net"
set serv(nick) "PRIVMSG X@channels.undernet.org"

# Chanserv deop command.
# use %nick for the nick you want to deop and %chan for the channel name.
# example: set serv(deop) "deop %chan %nick"
set serv(command) "deop %chan %nick"

# Set the time in seconds to wait before reseting the punishment monitor:
# Note: this setting means the bot will apply the punishment steps on each nick
# within this period of time, otherwise it'll trigger steps from the beginning.
# Most recommended value is between: 60-90
set pwait 60

# Avertizarea sa se faca in canal?
# 0 means no, 1 means yes.
set warnrelay 1

# aici editezi numai daca botul tau e ircop
# Set here the kline command used on your server.
# for example some ircds user:
# kline %mask %time %reason
# others use:
# kline %time %mask %reason
## NOTE:
# %mask = the klined mask.
# %time = the kline time.
# %reason = the kline reason.
##
set kline(cmd) "kline %time %mask :%reason"

# set the default kline time. (seconds or minutes depends on your ircd)
set kline(time) 30

## metode de pedeapsa:
# 1: avertizare - kick - kickban
# 2: avertizare - kick
# 3: avertizare - kickban
# 4: kick - kickban
# 5: kickban
## aici editezi daca botul e ircop shi poate da kline:
# 6: warn - kick - kline
# 7: warn - kline
# 8: kick - kill - kline
# 9: kill - kline
# 10: kline
#
## For example if you set this to 1 for text flood:
#
# ** nick triggers text flood
# ** bot warns nick
# ** nick triggers text flood again
# ** bot kicks nick
# ** nick triggers text flood yet again
# ** bot bankicks nick
## these steps will be triggered if the offences happend during <pwait> seconds.
# NOTE: These methods are not applicable on all flood types. I only applied this
# feature on the flood types I think they're needed.

## Tipuri valabile de ban:
# 0: *!user@full.host.tld
# 1: *!*user@full.host.tld
# 2: *!*@full.host.tld
# 3: *!*user@*.host.tld
# 4: *!*@*.host.tld
# 5: nick!user@full.host.tld
# 6: nick!*user@full.host.tld
# 7: nick!*@full.host.tld
# 8: nick!*user@*.host.tld
# 9: nick!*@*.host.tld

## tipuri de kline:
# 0: user@full.host.tld
# 1: *user@full.host.tld
# 2: *@full.host.tld
# 3: *user@*.host.tld
# 4: *@*.host.tld
# 5: user@full.host.tld
# 6: *user@full.host.tld
# 7: *@full.host.tld
# 8: *user@*.host.tld
# 9: *@*.host.tld

##########################
# TEXT FLOOD #
##########################

#
## 1 ## Text flood (linii)
#

# pe ce canale sa fie activa protectia de text flood linii
# example: set textl(chans) "#chan1 #chan2"
set textl(chans) "*"

# Text flood (lines) <cate linii>:<in numar de secunde>
set textl(punish) 5:2

## aici setezi metoda de pedepsire
set textl(pmeth) 3

# aici setezi tipul banului (-1 to disable ban)
set textl(btype) 2

# aici setezi cat timp sa dureze banul (0 for no ban time)
set textl(btime) 15

# aici setezi ce mesaj sa apara cand botul da kick
set textl(kmsg) "Nu face flood aici. $kckcount(form)"

# aici setezi mesaj de avertizare
set textl(wmsg) "Atentie scrie mai incet nu face FLOOD aici."

## aici setezi daca e ircop 5 (oper commands):

# Text flood (lines) kline mask type.
set textl(ktype) 2

# Text flood (lines) kline/kill reason.
set textl(klmsg) "Text flooding is not permissable on this network."

# Text flood (lines) kline time (seconds or minutes depends on your ircd).
set textl(ktime) 0

#acuma cred ca tz ai dat seama cum se seteaza no sa mi mai traduc fiecare in parte

#
## 2 ## Text flood (charactere)
#

# Text flood (chars) monitor channels. (use "*" to make it work on all chans)
# example: set textc(chans) "#chan1 #chan2"
set textc(chans) "*"

# Text flood (chars) <chars>:<in how many seconds>.
set textc(punish) 350:3

# Text flood (chars) punishment method:
set textc(pmeth) 5

# Text flood (chars) bantype. (-1 to disable ban)
set textc(btype) 2

# Text flood (chars) ban time in minutes. (0 for no ban time)
set textc(btime) 30

# Text flood (chars) kick msg.
set textc(kmsg) "Excess chars detected. $kckcount(form)"

# Text flood (chars) warning msg.
set textc(wmsg) "Warning: You've triggered text flood (chars) protection, decrease your text legnth."

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

# Text flood (chars) kline mask type.
set textc(ktype) 2

# Text flood (chars) kline/kill reason.
set textc(klmsg) "Text flooding (chars) is not permissable on this network."

# Text flood (chars) kline time (seconds or minutes depends on your ircd).
set textc(ktime) 0

#
## 3 ## Notice flood (lines)
#

# Notice flood (lines) monitor channels. (use "*" to make it work on all chans)
# example: set noticel(chans) "#chan1 #chan2"
set noticel(chans) "*"

# Notice flood (lines) lines:seconds.
set noticel(punish) 1:3

# Notice flood (lines) punishment method:
set noticel(pmeth) 5

# Notice flood (lines) ban tpye. (-1 to disable ban)
set noticel(btype) 2

# Notice flood (lines) ban time in minutes. (0 for no ban time)
set noticel(btime) 30

# Notice flood (lines) kick msg.
set noticel(kmsg) "Unallowed Channel Notice. $kckcount(form)"

# Notice flood (lines) warn msg.
set noticel(wmsg) "Warning: you've triggered notice flood (lines) protection, slow down your notices."

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

# Notice flood (lines) kline mask type.
set noticel(ktype) 2

# Notice flood (lines) kline/kline reason.
set noticel(klmsg) "Notice flooding is not permissable on this network."

# Notice flood (lines) kline time in reason.
set noticel(ktime) 0

#
## 4 ## Notice flood (chars)
#

# Notice flood (chars) monitor channels. (use "*" to make it work on all chans)
# example: set noticec(chans) "#chan1 #chan2"
set noticec(chans) "*"

# Notice flood (chars) <chars>:<in how many seconds>.
set noticec(punish) 200:3

# Notice flood (chars) punishment method:
set noticec(pmeth) 5

# Notice flood (chars) ban type. (-1 to disable ban)
set noticec(btype) 2

# Notice flood (chars) ban time in minutes. (0 for no ban time)
set noticec(btime) 30

# Notice flood (chars) kick msg.
set noticec(kmsg) "Excess chars (notice) detected. $kckcount(form)"

# Notice flood (chars) warn msg.
set noticec(wmsg) "Warning: you've triggered notice flood (chars) protection, decrease your text length."

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

# Notice flood (chars) kline mask type.
set noticec(ktype) 2

# Notice flood (chars) kline/kill reason.
set noticec(klmsg) "Notice flooding (chars) is not permissable on this network."

# Notice flood (chars) kline time (seconds or minutes depends on your ircd).
set noticec(ktime) 0

###################
# TEXT #
###################

#
## 5 ## Caps flood.
#

# Caps flood monitor channels. (use "*" to make it work on all chans)
# example: set capsp(chans) "#chan1 #chan2"
set capsp(chans) "*"

# Caps flood minimum percentage:charlength.
set capsp(punish) 20:30

# Caps flood punishment method:
set capsp(pmeth) 3

# Caps flood ban type. (-1 to disable ban)
set capsp(btype) 2

# Caps flood ban time in minutes. (0 for no ban time)
set capsp(btime) 15

# Caps flood kick msg.
set capsp(kmsg) "Nu mai scrie cu MAJUSCULE. $kckcount(form)"

# Caps flood warn msg.
set capsp(wmsg) " Scrie te rog cu litere mici nu cu MAJUSCULE , Multumesc ."

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

# Caps flood kline mask type.
set capsp(ktype) 2

# Caps flood kline/kill reason.
set capsp(klmsg) "Caps flooding is not permissable on this network."

# Caps flood kline time (seconds or minutes depends on your ircd).
set capsp(ktime) 0

#
## 6 ## Text repeating.
#

# Text repeating monitor channels. (use "*" to make it work on all chans)
# example: set repeatf(chans) "#chan1 #chan2"
set repeatf(chans) "*"

# Text repeating repeats:seconds.
set repeatf(punish) 3:10

# Text repeating punishment method:
set repeatf(pmeth) 3

# Text repeating ban type. (-1 to disable ban)
set repeatf(btype) 2

# Text repeating ban time in minutes. (0 for no ban time)
set repeatf(btime) 15

# Text repeating kick msg.
set repeatf(kmsg) "Am detectat repetare. $kckcount(form)"

# Text repeating warn msg.
set repeatf(wmsg) "Nu te mai repeta atata , Vei fi pedepsit daca continui."

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

# Text repeating kline mask type.
set repeatf(ktype) 2

# Text repeating kline/kill reason.
set repeatf(klmsg) "Constant repeating is not permissable on this network."

# Text repeating kline time (seconds or minutes depends on your ircd).
set repeatf(ktime) 0

#
## 7 ## Control codes.
#

# Control codes monitor channels. (use "*" to make it work on all chans)
# example: set codesf(chans) "#chan1 #chan2"
set codesf(chans) "*"

# Control codes minimum number of codes allowed.
set codesf(lim) 35

# Control codes punishment method:
set codesf(pmeth) 5

# Control codes ban type. (-1 to disable ban)
set codesf(btype) 2

# control codes ban time in minutes. (0 for no ban time)
set codesf(btime) 30

# Control codes kick msg.
set codesf(kmsg) "Excess codes detected. $kckcount(form)"

# Control codes warn msg.
set codesf(wmsg) " You've triggered control codes protection, release your msgs from codes."

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

# Control codes kline mask type.
set codesf(ktype) 2

# Control codes kline/kill reason.
set codesf(klmsg) "Excess use of control codes is not permissable on this network."

# Control codes kline time (seconds or minutes depends on your ircd).
set codesf(ktime) 0

#
## 8 ## Advertising.
#

# NOTE: This protection also works for private advertising.

# Advertising channels monitored. (use "*" to make it work on all chans)
# example: set adv(chans) "#chan1 #chan2"
set adv(chans) "*"

# Advertising triggers.
set adv(words) {
"intra pe #*"
"haideti pe #*"
"*#*#*#*"
"*/server*"
"http://*"
"join #*"
" #* "
"*vand*bnc*"
"*vand*shell*"
}

# Advertising punishment method:
set adv(pmeth) 3

# Advertising ban type. (-1 to disable ban)
set adv(btype) 2

# Advertising ban time in minutes. (0 for no ban time)
set adv(btime) 15

# Advertising kick msg.
set adv(kmsg) "Am detectat reclama pe canal. $kckcount(form)"

# Advertising warn msg.
set adv(wmsg) "Te rog nu face reclama , daca continui vei fi pedepsit"

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

# Advertising kline mask type.
set adv(ktype) 2

# Advertising kline/kill reason.
set adv(klmsg) "Constant advertising is not permissable on this network."

# Advertising kline time (seconds or minutes depends on your ircd).
set adv(ktime) 0

#
## 9 ## Swearing.
#

# Swearing monitored channels. (use "*" to make it work on all chans)
# example set swear(chans) "#chan1 #chan2"
set swear(chans) "*"

# Swearing triggers.
set swear(words) {
"*pula*"
"*pizda"
"muie*"
"hui*"
"fut*"
"belit*"
"ass"
"pidor*"
"*gandon*"
"beles*"
"cur"
"pula"
"racam"
"rakam"
"penis*"
"sug*"
"chizd*"
"mata*"
"lox*"
"pidar*"
"sosco*"
"sosca"
"curv*"
"suje*"
"pula"
"mue"
"mu?e"
"p?la"
"pidar*"
"pwla"
"hui"
"*hui"
"concen*"
"su?a"
"kizd*"
"őóé"
"őóč"
"ďčäîđ"
"ńóęŕ"
"ďčçä*"
"ęčçä*"
"ęóđ"
"suji"
"suge"
"sug*"
"suje*"
"gandon"

}

# Swearing punishment method:
set swear(pmeth) 3

# Swearing ban type. (-1 to disable ban)
set swear(btype) 2

# Swearing ban time in minutes. (0 for no ban time)
set swear(btime) 15

# Swearing kick msg.
set swear(kmsg) "Am detectat injuraturi $kckcount(form)"

# Swearing warn msg.
set swear(wmsg) "Nu este permis sa injuri daca continui vei fi pedepsit."

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

# Swearing kline mask type.
set swear(ktype) 2

# Swearing kline/kill reason.
set swear(klmsg) "Swearing is not permissable on this network."

# Swearing kline time (seconds or minutes depends on your ircd).
set swear(ktime) 0

###################
# CTCP #
###################

#
## 10 ## CTCP flood
#

# CTCP flood monitored channels. (use "*" to make it work on all chans)
# example: set ctcpf(chans) "#chan1 #chan2"
set ctcpf(chans) "*"

# CTCP flood <number of ctcps>:<in number of secs>
set ctcpf(punish) 2:30

# CTCP flood punishment method:
set ctcpf(pmeth) 5

# CTCP flood ban type. (-1 to disable ban)
set ctcpf(btype) 2

# CTCP ban time in minutes. (0 for no ban time)
set ctcpf(btime) 30

# CTCP flood kick msg.
set ctcpf(kmsg) "CTCP flood detected. $kckcount(form)"

# CTCP flood warn msg.
set ctcpf(wmsg) "Warning: You've triggered CTCP flood protection, decrease your ctcps."

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

# CTCP flood kline mask type.
set ctcpf(ktype) 2

# CTCP flood kline/kill reason.
set ctcpf(klmsg) "CTCP floods are not permissable on this network."

# CTCP flood kline time (seconds or minutes depends on your ircd).
set ctcpf(ktime) 0

###################
# TAKEOVER #
###################

#
## 11 ## Mass deop.
#

# Mass deop monitored channels. (use "*" to make it work on all chans)
# example: set massdeop(chans) "#chan1 #chan2"
set massdeop(chans) "*"

# Mass deop <deops>:<in how many seconds>.
set massdeop(punish) 4:1

# Mass deop: deop abuser ? (0: no , 1: yes)
set massdeop(deop) 1

# Mass deop ban type. (-1 to disable ban)
set massdeop(btype) -1

# Mass deop punishment method:
set massdeop(pmeth) 5

# Mass deop ban time in minutes. (0 for no ban time)
set massdeop(btime) 10

# Mass deop kick msg.
set massdeop(kmsg) "Mass deop detected. $kckcount(form)"

# Mass deop warn msg.
set massdeop(wmsg) "Warning: You've triggered the mass deop protection, do not repeat this action."

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

# Mass deop kline type (same as bantype).
set massdeop(ktype) 2

# Mass deop kline/kill reason.
set massdeop(klmsg) "Mass deops are not allowed on this network."

# Mass deop kline time (seconds or minutes depends on your ircd).
set massdeop(ktime) 0

#
## 12 ## Mass kick.
#

# Mass kick monitored channels. (use "*" to make it work on all chans)
# example: set masskick(chans) "#chan1 #chan2"
set masskick(chans) "*"

# Mass kick <kicks>:<in how many seconds>
set masskick(punish) 8:2

# Mass kick: deop abuser ? (0: no , 1: yes)
set masskick(deop) 0

# Mass kick ban type. (-1 to disable ban)
set masskick(btype) -1

# Mass kick punishment method:
set masskick(pmeth) 5

# Mass kick ban time in minutes. (0 for no ban time)
set masskick(btime) 10

# Mass kick kick msg.
set masskick(kmsg) "Mass kick detected. $kckcount(form)"

# Mass kick warn msg.
set masskick(wmsg) "Warning: You've triggered mass kick protection, do not repeat this action."

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

# Mass kick kline mask type.
set masskick(ktype) 2

# Mass kick kline/kill reason.
set masskick(klmsg) "Mass kicks are prohibited on this network."

# Mass kick kline time (seconds or minutes depends on your ircd).
set masskick(ktime) 0

#
## 13 ## Mass ban (bans).
#

# Mass ban (bans) monitored channels. (use "*" to make it work on all chans)
# example: set massb(chans) "#chan1 #chan2"
set massb(chans) "*"

# Mass ban (bans) <bans>:<seconds>
set massb(punish) 18:2

# Mass ban (bans) deop abuser ? (1: yes , 0: no)
set massb(deop) 0

# Mass ban (bans) ban type. (-1 to disable ban)
set massb(btype) -1

# Mass ban (bans) punishment method:
set massb(pmeth) 5

# Mass ban (bans) ban time in minutes. (0 for no ban time)
set massb(btime) 30

# Mass ban (bans) kick msg.
set massb(kmsg) "Mass ban is not allowed. $kckcount(form)"

# Mass ban (bans) warning msg.
set massb(wmsg) "Warning: You've triggered mass ban protection, do not repeat this action."

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

# Mass ban (bans) kline mask type.
set massb(ktype) 2

# Mass ban (bans) kline/kill reason.
set massb(klmsg) "Mass banning (bans) is prohibited on this network."

# Mass ban (bans) kline time (seconds or minutes depends on your ircd).
set massb(ktime) 0

#
## 14 ## Channel limit.
#

# Channel limit monitored channels. (use "*" to make it work on all chans)
# example clim(chans) "#chan1 #chan2"
set clim(chans) "#cj"

# Channel limit: Set this to 0 if you want to use seconds for checking limit.
set clim(ctype) 1

# Channel limit: Check limit every x minutes/seconds.
# NOTE: if clim(ctype) is set to 1 it means this timer is in MINUTES.
set clim(ctime) 1

# Channel limit: limit to add over the channel's current user count.
set clim(alim) 6

# channel limit: The maximum joins allowed before setting a new limit.
# example: Suppose this is set to 1. If the channel has 10 users and the bot sets
# limit 16 then a user joins the channel, the bot will not increase the limit
# unless another user joins (i.e. the number of users became 12 so the bot sets a new limit).
## 0 to disable) ##
set clim(ulim) 1

###################
# MISCELLANEOUS #
###################

#
## 15 ## Join flood.
#

# Use '.chanset #channel flood-join <joins>:<seconds>' in partyline to enable. (0:0 to disable)
# NOTE: This triggers on clone join flood, not mass join.

# Join flood ban type. (-1 to disable ban)
set joinflood(btype) 2

# Join flood ban time in minutes. (0 for no ban time)
set joinflood(btime) 30

# Join flood punishment method.
set joinflood(pmeth) 5

# 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

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

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

# Join flood warn msg.
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):

# Join flood kline mask type.
set joinflood(ktype) 2

# Join flood kline/kill reason.
set joinflood(klmsg) "Join floods are not permissable on this network."

# Join flood kline time (seconds or minutes depends on your ircd).
set joinflood(ktime) 0

#
## 16 ## Part msg flood.
#

# Part msg flood monitored channels. (use "*" to make it work on all chans)
# example: set pmsgf(chans) "#chan1 #chan2" (in lowecase)
set pmsgf(chans) "*"

# Part msg flood minimum reason length to ban on.
set pmsgf(lim) 100

# Part msg flood ban type. (-1 to disable ban)
set pmsgf(btype) 2

# Part msg flood punishment method:
set pmsgf(pmeth) 5

# Part msg flood ban time in minutes. (0 for no bantime)
set pmsgf(btime) 30

# Part msg flood kick msg. (incase the offender managed to rejoin before being banned)
set pmsgf(kmsg) "Part msg flood detected. $kckcount(form)"

# Part msg flood warn msg.
set pmsgf(wmsg) "Warning: You've triggered part msg flood protection, decrease text in your part reason."

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

# Part msg flood kline mask type.
set pmsgf(ktype) 2

# Part msg flood kline/kill reason.
set pmsgf(klmsg) "Part msg floods are not permissable on this network."

# Part msg flood kline time (seconds or minutes depends on your ircd).
set pmsgf(ktime) 0

#
## 17 ## Revolving door.
#

# Revolving door monitored channels. (use "*" to make it work on all chans)
# example: set revdoor(chans) "#chan1 #chan2"
set revdoor(chans) "#pizdamasi"

# Revolving door: trigger on part after how many seconds (or less) from join ?
set revdoor(punish) 2

# Revolving door ban type. (-1 to disable ban)
set revdoor(btype) -1

# Revolving door kick msg.
set revdoor(kmsg) "Stai dracului in loc . $kckcount(form)"

# Revolving door ban time in minutes. (0 for no ban time)
set revdoor(btime) 30

#
## 18 ## Nick flood.
#

# Nick flood monitored channels. (use "*" to make it work on all chans)
# example: set nickflood(chans) "#chan1 #chan2)
set nickflood(chans) "*"

# Nick flood <nick changes>:<in how many seconds>
set nickflood(punish) 4:20

# Nick flood punishment method:
set nickflood(pmeth) 3

# Nick flood ban type. (-1 to disable ban)
set nickflood(btype) 2

# Nick flood ban time in minutes. (0 for no ban time)
set nickflood(btime) 30

# Nick flood kick msg.
set nickflood(kmsg) "Am detectat Nickname Flood. $kckcount(form)"

# Nick flood warn msg.
set nickflood(wmsg) "Warning: You've triggered nick flood protection, slow down your nick changes."

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

# Nick flood kline mask type.
set nickflood(ktype) 2

# Nick flood kline/kill reason.
set nickflood(klmsg) "Nick floods are not permissable on this network."

# Nick flood kline time (seconds or minutes depends on your ircd).
set nickflood(ktime) 0

#
## 19 ## Clones.
#

# Clones monitored chans. (use "*" to make it work on all chans)
# example: set eclones(chans) "#chan1 #chan2" (in lower case)
set eclones(chans) "*"

# Clones max allowed.
set eclones(lim) 3

# Clones ban type. (-1 to disable ban)
set eclones(btype) 2

# Clones punishment method:
set eclones(pmeth) 5

# Clones ban time in minutes. (0 for no ban time)
set eclones(btime) 30

# Clones kick msg.
set eclones(kmsg) "Am detectat clone. $kckcount(form)"

# Clones warning msg.
set eclones(wmsg) "Warning: You've exceeded the maximum number of clones, remove your clones now."

# Do you want to check if the clones are still excess after warn?
# if yes then set this to the number of seconds to wait before checking again. (0 to disable)
# NOTE: This is preffered to be less than <pwait> (at the beginning of the configuration).
set eclones(cagain) 40

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

# Clones kline mask type.
set eclones(ktype) 2

# Clones kline/kill reason.
set eclones(klmsg) "Excess clones are not allowed on this network."

# Clones kline time (seconds or minutes depends on your ircd).
set eclones(ktime) 0

#
## 20 ## Bad nick.
#

# Bad nick monitored chans. (use "*" to make it work on all chans)
# example: set bnick(chans) "#chan1 #chan2"
set bnick(chans) "*"

# Bad nick triggers.
set bnick(nicks) {
"*pula*"
"*pizda*"
"cur*"
"*poola*"
"*muie*"
"*fut*"
"*pula*"
"*pizda"
"muie*"
"hui*"
"fut*"
"belit*"
"ass"
"pidor*"
"*gandon*"
"beles*"
"cur"
"pula"
"racam"
"rakam"
"penis*"
"sug*"
"chizd*"
"mata*"
"lox*"
"pidar*"
"sosco*"
"sosca"
"curv*"
"suje*"
"pula"
"mue"
"mu?e"
"p?la"
"pidar*"
"pwla"
"hui"
"*hui"
"concen*"
"su?a"
"kizd*"
"őóé"
"őóč"
"ďčäîđ"
"ńóęŕ"
"ďčçä*"
"ęčçä*"
"ęóđ"
"suji"
"suge"
"sug*"
"suje*"
"gandon"

}

# Bad nick ban type. (-1 to disable ban)
set bnick(btype) 2

# Bad nick kick msg
set bnick(kmsg) "Nickul tau nu e acceptat aici , sau folosesti un nick de drona daca crezi ca am greshit raporteaza eroarea la un operator Smile $kckcount(form)"

# Bad nick ban time in minutes. (0 for no ban time)
set bnick(btime) 15

#
## 21 ## Random drones.
#

# Random drones monitored channels. (use "*" to make it work on all chans)
# example: set nosense(chans) "#chan1 #chan2"
set nosense(chans) "#pizdet"

# Random drones: Do you want the bot to check for drones on op ? (1: yes , 0: no)
set nosense(conop) 0

# Random drones exempted masks. (These masks will not be effected)
set nosense(exempt) { "*hunt*!*@*" "*kork*!*@*" "*flash*!*@*" "*!*nika@*" "*ight*!*@*" "*!*ask*@*" "*gurl*!*@*" "*girl*!*@*"
"*!*Ging*@*" "*control*!*@*" "*!*street*@*" "*freind*!*@*" "*!*phone*@*" "*farah*!*@*" "*!*April@*" "*Erik*!*@*"
"all*!*@*" "*!all*@*" "*!~all*@*" "*!*berry*@*" "*!*talking*@*" "template*!*@*" }

# Random drones ban type. (-1 to disable ban)
set nosense(btype) 2

# Random drones punishment method:
set nosense(pmeth) 5

# Random drones ban time in minutes. (0 for no bantime)
set nosense(btime) 30

# Random drones kick msg.
set nosense(kmsg) "Am detectat o posibila drona . $kckcount(form)"

# Random drones warning msg.
set nosense(wmsg) "Warning: You've triggered random drones protection, change your nick now."

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

# Random drones kline mask type.
set nosense(ktype) 2

# Random drones kline/kill reason.
set nosense(klmsg) "Random drones are not allowed on this network."

# Random drones kline time (seconds or minutes depends on your ircd).
set nosense(ktime) 0

#
## 22 ## Bad ident.
#

# Bad ident monitored chans. (use "*" to make it work on all chans)
# example: set bident(chans) "#chan1 #chan2"
set bident(chans) "*"

# Bad ident triggers.
set bident(idents) {
"*pula*"
"*pizda*"
"*muie*"
"*fuck*"
"*sugi*"
}

# Bad ident ban type. (-1 to disable ban)
set bident(btype) 2

# Bad ident kick msg.
set bident(kmsg) "Scimba mah identu daca vrei sa stai aici. $kckcount(form)"

# Bad ident ban time. (0 for no ban time)
set bident(btime) 15

#########################################
# BOTNET FLOOD PROTECTION (MASS FLOODS) #
#########################################

#
## 1 ## Botnet Text flood (lines).
#

# Botnet Text flood (lines) monitored channels. (use "*" to make it work on all chans)
# example btextl(chans) "#chan1 #chan2"
set btextl(chans) "*"

# Botnet Text flood (lines) <lines>:<seconds>.
set btextl(punish) 15:7

# Botnet Text flood (lines) lock modes.
set btextl(lockmode) mR

# Botnet Text flood (lines) lock time in seconds. (0 for no lock time)
set btextl(locktime) 60

#
## 2 ## Botnet Text flood (chars).
#

# Botnet Text flood (chars) monitored channels. (use "*" to make it work on all chans)
# example btextc(chans) "#chan1 #chan2"
set btextc(chans) "*"

# Botnet Text flood (chars) <chars>:<seconds>.
set btextc(punish) 550:3

# Botnet Text flood (chars) lock modes.
set btextc(lockmode) mR

# Botnet Text flood (chars) lock time in seconds. (0 for no lock time)
set btextc(locktime) 60

#
## 3 ## Botnet Notice flood (lines).
#

# Botnet Notice flood (lines) monitored channels. (use "*" to make it work on all chans)
# example bnotil(chans) "#chan1 #chan2"
set bnotil(chans) "*"

# Botnet Notice flood (lines) <lines>:<seconds>.
set bnotil(punish) 3:1

# Botnet Notice flood (lines) lock modes.
set bnotil(lockmode) mR

# Botnet Notice flood (lines) lock time in seconds. (0 for no lock time)
set bnotil(locktime) 60

#
## 4 ## Botnet Notice flood (chars).
#

# Botnet Notice flood (chars) monitored channels. (use "*" to make it work on all chans)
# example bnotic(chans) "#chan1 #chan2"
set bnotic(chans) "*"

# Botnet Notice flood (chars) <chars>:<seconds>.
set bnotic(punish) 500:3

# Botnet Notice flood (chars) lock modes.
set bnotic(lockmode) mR

# Botnet Notice flood (chars) lock time in seconds. (0 for no lock time)
set bnotic(locktime) 60

#
## 5 ## Botnet CTCP flood.
#

# Botnet CTCP flood monitored chans. (use "*" to make it work on all chans)
# example: set bctcpf(chans) "#chan1 #chan2"
set bctcpf(chans) "*"

# Botnet CTCP flood <ctcps>:<seconds>.
set bctcpf(punish) 3:60

# BOTNET CTCP flood lock modes.
set bctcpf(lockmode) mR

# BOTNET CTCP flood lock time in seconds. (0 for no lock time)
set bctcpf(locktime) 60

#
## 6 ## Botnet join flood.
#

# Botnet join flood monitored channels. (use "*" to make it work on all chans)
# example: set bjoinf(chans) "#chan1 #chan2"
set bjoinf(chans) "*"

# Botnet join flood <join>:<seconds>.
set bjoinf(punish) 8:3

# Botnet join flood lock modes.
set bjoinf(lockmode) mR

# Botnet join flood lock time in seconds. (0 for no lock time)
set bjoinf(locktime) 30

#
## 7 ## Botnet revolving door flood.
#

# Botnet revolving door flood monitored channels. (use "*" to make it work on all chans)
# example: set brevdoor(chans) "#chan1 #chan2"
set brevdoor(chans) "*"

# Botnet revolving door flood <revolutions>:<seconds>
set brevdoor(punish) 3:1

# Botnet revolving door flood lock modes.
set brevdoor(lockmode) mR

# Botnet revolving door flood lock time in seconds. (0 for no lock time)
set brevdoor(locktime) 30

#
## 8 ## Botnet part msg flood.
#

# Botnet part msg flood monitored channels. (use "*" to make it work on all chans)
# example: set bpmsgf(chans) "#chan1 #chan2"
set bpmsgf(chans) "*"

# Botnet Part msg flood <part msg floods>:<in how many seconds>.
set bpmsgf(punish) 3:1

# Botnet Part msg flood lock modes.
set bpmsgf(lockmode) mR

# Botnet Part msg flood lock time in seconds. (0 for no lock time)
set bpmsgf(locktime) 60

#
## 9 ## Botnet Nick flood.
#

# Botnet Nick flood monitored channels. (use "*" to make it work on all chans)
# example: set bnickf(chans) "#chan1 #chan2"
set bnickf(chans) "*"

# Botnet Nick flood <nick-changes>:<seconds>.
set bnickf(punish) 3:30

# Botnet Nick flood lock modes.
set bnickf(lockmode) mR

# Botnet Nick flood lock time in seconds. (0 for no lock time)
set bnickf(locktime) 60

###########################
# PRIVATE PROTECTIONS #
###########################

# Set here if you want the bot to set a restriction mode on itself when flooded.
# example: +R is used on DALnet so only registered users can send to the bot.
# set this to "" if you don't wish to change your bot's modes during a flood.
# NOTE: Maximum 1 mode, less or more means it's disabled.
set afpfp(rmode) d

# Set here the time you want to keep the restriction mode in seconds.
set afpfp(rtime) 30

# How many minutes do you want to ignore the flooders ?
set afpfp(itime) 30

#
## 1 ## Private text floods.
#

# Private text (lines) flood <lines>:<seconds>. (0:0 to disable)
set ptextl(punish) 15:6

# Private text (chars) flood <chars>:<seconds>. (0:0 to disable)
set ptextc(punish) 1000:6

#
## 2 ## Private notice floods.
#

# Private notice (lines) flood <lines>:<seconds>. (0:0 to disable)
set pnotil(punish) 3:1

# Private notice (chars) flood <chars>:<seconds>. (0:0 to disable)
set pnotic(punish) 700:4

#
## 3 ## Private CTCP flood.
#

# Private CTCP flood <ctcps>:<seconds>. (0:0 to disable)
set pctcpf(punish) 3:20

# Configurations end here. #
############################
#
######################################################################
# Code starts here, please do not edit anything unless you know TCL: #
# __________________________________________________________________ #

if {$clim(ctype)} {
if {[timerexists config:lim] == ""} {
timer $clim(ctime) [list config:lim]
}
} {
if {[utimerexists config:lim] == ""} {
utimer $clim(ctime) [list config:lim]
}
}

if {([lindex [split $version {., }] 2] >= 17) || ([lindex [split $version {., }] 0] > 1) || ([lindex [split $version {., }] 1] > 6)} {
set eggver17 1
} {
set eggver17 0
}

if {![info exists NumKicks]} {
if {![file exists $kckcount(file)]} {
set NumKicks 0
} {
set kcfopened [open $kckcount(file) r]
set NumKicks [read -nonewline $kcfopened]
close $kcfopened
}
}

if {$cbcd(check)} {
if {[set cbcd(timer) [timerexists checkbcd:join]]!=""} { killtimer $cbcd(timer) }
timer 3 checkbcd:join
}

if {![string match -nocase "* Opposing *" ${ctcp-version}]} {
set ctcp-version "${ctcp-version} - Using \002A\002ll\002F\002lood\002P\002rotection v4.3 by Opposing (aka Sir_Fz) http://hub.nexushells.net/~Fz/"
}

set bred 0

bind flud - join join:flud
bind pubm - * text:line
bind ctcp - ACTION text:action
bind pubm - * text:char
bind ctcp - ACTION char:action
bind notc - * notc:lines
bind notc - * notc:chars
bind pubm - * caps:kick
bind ctcp - ACTION caps:action
bind pubm - * repeat:kick
bind ctcp - ACTION repeat:action
bind pubm - * codes:kick
bind ctcp - ACTION codes:action
bind pubm - * adv:kick
bind ctcp - ACTION adv:action
bind msgm - * adv:private
bind pubm - * swear:kick
bind ctcp - ACTION swear:action
bind part - * rev:door
bind sign - * rev:door
bind join - * clones:kick
bind join - * bnick:kick
bind nick - * bnick:kick
bind join - * bident:kick
bind mode - "* +b" mass:ban
bind pubm - * btext:line
bind ctcp - ACTION btext:action
bind pubm - * btext:chars
bind ctcp - ACTION bchars:action
bind notc - * bnotc:line
bind notc - * bnotc:chars
bind ctcp - * ctcp:kick
bind ctcp - * bctcp:lock
bind join - * bjoinf:lock
bind nick - * bnickf:lock
bind join - * nosense:kick
bind part - * pmsgf:ban
bind mode - "* -o" massd:kick
bind kick - * massk:kick
bind nick - * nickf:kick
bind msgm - * priv:texti
bind ctcp - ACTION priv:acti
bind notc - * priv:notci
bind ctcp - * priv:ctcpi
bind mode - "* +o" cdrone:onop
bind mode - "* -b" rem:btimer
bind time - "?0 *" store:kcount

proc join:flud {nick uhost hand type chan} {
global joinflood btclocked
if {[matchattr $hand f|f $chan] || [matchattr $hand mo|mo $chan]} { return 1 }
if {![info exists btclocked([set chan [string tolower $chan]])]} { set btclocked($chan) 0 }
if {$joinflood(lockchan)} {
if {!($btclocked($chan))} {
putquick "MODE $chan +$joinflood(lockmode)" -next
if {!($joinflood(locktime) <= 0)} {
utimer $joinflood(locktime) [list btcunlock $chan $joinflood(lockmode) btclocked($chan)]
} {
utimer 90 [list reset:btc bla bla bla $chan bla bla]
}
set btclocked($chan) 1
if {[string length $btclocked(lnotc)] > 0} {
puthelp "NOTICE $chan :$btclocked(lnotc)"
}
putlog "AFP: Locked $chan due to join flood from [lindex [split $uhost @] 1]."
}
}
punish:method2 $joinflood(pmeth) $nick $uhost $chan $joinflood(kmsg) $joinflood(wmsg) $joinflood(btype) $joinflood(btime) $joinflood(klmsg) $joinflood(ktime) $joinflood(ktype) [string tolower [scan $uhost %*\[^@\]@%s]]:joinflood
return 1
}

set textl(lim) [scan $textl(punish) %\[^:\]]
set textl(secs) [scan $textl(punish) %*\[^:\]:%s]

proc text:line {nick uhost hand chan arg} {
global textl txtf
if {![all:checks:valid $nick $hand $chan] || [nafp:chan $chan $textl(chans)]} {return 0}
if {![info exists txtf([set nickchan [string tolower $uhost:$chan]])]} { set txtf($nickchan) 0 }
if {[follow $textl(secs) txtf($nickchan)] >= $textl(lim)} {
punish:method $textl(pmeth) $nick $uhost $chan $textl(kmsg) $textl(wmsg) $textl(btype) $textl(btime) $textl(klmsg) $textl(ktime) $textl(ktype) [string tolower $nick]:textl
}
}

proc text:action {nick uhost hand chan keyword arg} {
if {[isbotnick [lindex [split $chan "@"] 0]] || [lindex [split $chan "@"] 1] != ""} {return 0}
text:line $nick $uhost $hand $chan $arg
}

set textc(lim) [scan $textc(punish) %\[^:\]]
set textc(secs) [scan $textc(punish) %*\[^:\]:%s]

proc text:char {nick uhost hand chan arg} {
global textc txtc
if {![all:checks:valid $nick $hand $chan] || [nafp:chan $chan $textc(chans)]} { return 0 }
if {![info exists txtc([set nickchan [string tolower $uhost:$chan]])]} { set txtc($nickchan) 0 }
if {[follow $textc(secs) txtc($nickchan) [string length $arg]] >= $textc(lim)} {
punish:method $textc(pmeth) $nick $uhost $chan $textc(kmsg) $textc(wmsg) $textc(btype) $textc(btime) $textc(klmsg) $textc(ktime) $textc(ktype) [string tolower $nick]:textc
}
}

proc char:action {nick uhost hand chan keyword arg} {
if {[isbotnick [lindex [split $chan "@"] 0]] || [lindex [split $chan "@"] 1] != ""} {return 0}
text:char $nick $uhost $hand $chan $arg
}

set noticel(lines) [scan $noticel(punish) %\[^:\]]
set noticel(secs) [scan $noticel(punish) %*\[^:\]:%s]

proc notc:lines {nick uhost hand arg chan} {
global noticel notclf
if {[isbotnick [lindex [split $chan "@"] 0]] || [string index $chan 0] == "@"} {return 0}
if {![all:checks:valid $nick $hand $chan] || [nafp:chan $chan $noticel(chans)]} {return 0}
if {![info exists notclf([set nickchan [string tolower $uhost:$chan]])]} { set notclf($nickchan) 0 }
if {[follow $noticel(secs) notclf($nickchan)] >= $noticel(lines)} {
punish:method $noticel(pmeth) $nick $uhost $chan $noticel(kmsg) $noticel(wmsg) $noticel(btype) $noticel(btime) $noticel(klmsg) $noticel(ktime) $noticel(ktype) [string tolower $nick]:noticel
}
}

set noticec(lim) [scan $noticec(punish) %\[^:\]]
set noticec(secs) [scan $noticec(punish) %*\[^:\]:%s]

proc notc:chars {nick uhost hand arg chan} {
global noticec notccf
if {[isbotnick [lindex [split $chan "@"] 0]] || [string index $chan 0] == "@"} {return 0}
if {![all:checks:valid $nick $hand $chan] || [nafp:chan $chan $noticec(chans)]} {return 0}
if {![info exists notccf([set nickchan [string tolower $uhost:$chan]])]} { set notccf($nickchan) 0 }
if {[follow $noticec(secs) notccf($nickchan) [string length $arg]] >= $noticec(lim)} {
punish:method $noticec(pmeth) $nick $uhost $chan $noticec(kmsg) $noticec(wmsg) $noticec(btype) $noticec(btime) $noticec(klmsg) $noticec(ktime) $noticec(ktype) [string tolower $nick]:noticec
}
}

set capsp(min) [scan $capsp(punish) %\[^:\]]
set capsp(len) [scan $capsp(punish) %*\[^:\]:%s]

proc caps:kick {nick uhost hand chan arg} {
global capsp
set linelen [string length $arg]
if {![all:checks:valid $nick $hand $chan] || [nafp:chan $chan $capsp(chans)] || ($linelen < $capsp(len))} {return 0}
if {[set caps [regexp -all -- {[A-Z]} $arg]] > 0} {
if {[expr {($caps * 100) / $linelen}] >= $capsp(min)} {
punish:method $capsp(pmeth) $nick $uhost $chan $capsp(kmsg) $capsp(wmsg) $capsp(btype) $capsp(btime) $capsp(klmsg) $capsp(ktime) $capsp(ktype) [string tolower $nick]:capsp
}
}
}

proc caps:action {nick uhost hand chan keyword arg} {
if {[isbotnick [lindex [split $chan "@"] 0]] || [lindex [split $chan "@"] 1] != ""} {return 0}
caps:kick $nick $uhost $hand $chan $arg
}

set repeatf(lines) [scan $repeatf(punish) %\[^:\]]
set repeatf(secs) [scan $repeatf(punish) %*\[^:\]:%s]

proc repeat:kick {nick uhost hand chan arg} {
global repeatf rptvar
if {![all:checks:valid $nick $hand $chan] || [nafp:chan $chan $repeatf(chans)]} {return 0}
if {[string length [set arg [fzctrl:filter $arg]]] > 32} { set arg [md5 $arg] }
if {![info exists rptvar([set nickargchan [string tolower $uhost:$arg:$chan]])]} { set rptvar($nickargchan) 0 }
if {[follow $repeatf(secs) rptvar($nickargchan)] >= $repeatf(lines)} {
punish:method $repeatf(pmeth) $nick $uhost $chan $repeatf(kmsg) $repeatf(wmsg) $repeatf(btype) $repeatf(btime) $repeatf(klmsg) $repeatf(ktime) $repeatf(ktype) [string tolower $nick]:repeatf
}
}

proc repeat:action {nick uhost hand chan keyword arg} {
if {[isbotnick [lindex [split $chan "@"] 0]] || [lindex [split $chan "@"] 1] != ""} {return 0}
repeat:kick $nick $uhost $hand $chan $arg
}

proc codes:kick {nick uhost hand chan arg} {
global codesf
if {![all:checks:valid $nick $hand $chan] || [nafp:chan $chan $codesf(chans)]} {return 0}
if {[regexp -all -- {[\003\037\002\026\006\007]} $arg] >= $codesf(lim)} {
punish:method $codesf(pmeth) $nick $uhost $chan $codesf(kmsg) $codesf(wmsg) $codesf(btype) $codesf(btime) $codesf(klmsg) $codesf(ktime) $codesf(ktype) [string tolower $nick]:codesf
}
}

proc codes:action {nick uhost hand chan keyword arg} {
if {[isbotnick [lindex [split $chan "@"] 0]] || [lindex [split $chan "@"] 1] != ""} {return 0}
codes:kick $nick $uhost $hand $chan $arg
}

proc adv:kick {nick uhost hand chan arg} {
global adv
if {![all:checks:valid $nick $hand $chan] || [nafp:chan $chan $adv(chans)]} {return 0}
set rest [fzctrl:filter $arg]
foreach advword $adv(words) {
if {[string match -nocase $advword $rest]} {
punish:method $adv(pmeth) $nick $uhost $chan $adv(kmsg) $adv(wmsg) $adv(btype) $adv(btime) $adv(klmsg) $adv(ktime) $adv(ktype) [string tolower $nick]:adv
break
}
}
}

proc adv:action {nick uhost hand chan keyword arg} {
if {[isbotnick [lindex [split $chan "@"] 0]] || [lindex [split $chan "@"] 1] != ""} {return 0}
adv:kick $nick $uhost $hand $chan $arg
}

proc adv:private {nick uhost hand arg} {
foreach chan [channels] {
if {[onchan $nick $chan]} {
adv:kick $nick $uhost $hand $chan $arg
}
}
}

proc swear:kick {nick uhost hand chan arg} {
global swear
if {![all:checks:valid $nick $hand $chan] || [nafp:chan $chan $swear(chans)]} {return 0}
set rest [fzctrl:filter $arg]
foreach badword $swear(words) {
if {[string match -nocase $badword $rest]} {
punish:method $swear(pmeth) $nick $uhost $chan $swear(kmsg) $swear(wmsg) $swear(btype) $swear(btime) $swear(klmsg) $swear(ktime) $swear(ktype) [string tolower $nick]:swear
break
}
}
}

proc swear:action {nick uhost hand chan keyword arg} {
if {[isbotnick [lindex [split $chan "@"] 0]] || [lindex [split $chan "@"] 1] != ""} {return 0}
swear:kick $nick $uhost $hand $chan $arg
}

set brevdoor(lim) [scan $brevdoor(punish) %\[^:\]]
set brevdoor(secs) [scan $brevdoor(punish) %*\[^:\]:%s]

proc rev:door {nick uhost hand chan rsn} {
global revdoor brevdoor brevdc btclocked notifyusers
if {![all:checks:valid $nick $hand [set chan [string tolower $chan]]]} {return 0}
if {[getchanjoin $nick $chan] >= [clock seconds]-$revdoor(punish)} {
if {![info exists brevdc($chan)]} { set brevdc($chan) 0 }
if {![info exists btclocked($chan)]} { set btclocked($chan) 0 }
if {![nafp:chan $chan $brevdoor(chans)]} {
if {[follow $brevdoor(secs) brevdc($chan)] >= $brevdoor(lim)} {
if {!($btclocked($chan))} {
putquick "MODE $chan +$brevdoor(lockmode)" -next
if {!($brevdoor(locktime) <= 0)} {
utimer $brevdoor(locktime) [list btcunlock $chan $brevdoor(lockmode) btclocked($chan)]
} {
utimer 90 [list reset:btc bla bla bla $chan bla bla]
}
set btclocked($chan) 1
if {[string length $btclocked(lnotc)] > 0} {
puthelp "NOTICE $chan :$btclocked(lnotc)"
}
putlog "AFP: Locked $chan due to botnet revolving door flood."
if {[llength $notifyusers]} {
foreach notfuser $notifyusers {
sendnote AFP $notfuser "Mass revolving door flood detected on $chan."
}
}
}
}
}
if {[nafp:chan $chan $revdoor(chans)]} {return 0}
if {!($revdoor(btype) < 0)} {
putquick "MODE $chan +b [set bmask [masktype $nick!$uhost $revdoor(btype)]]"
if {!($revdoor(btime) <= 0)} {
timer $revdoor(btime) [list pushmode $chan -b $bmask]
}
}
if {[onchan $nick $chan]} {
putquick "KICK $chan $nick :[string map [list %kcount [getkcount]] $revdoor(kmsg)]"
}
}
}

proc clones:kick {nick uhost hand chan} {
global eclones
if {![botisop $chan] || [matchattr $hand f|f $chan] || [matchattr $hand mo|mo $chan] || [nafp:chan $chan $eclones(chans)]} {return 0}
set clones 0
foreach ccheck [chanlist $chan] {
if {[string equal -nocase [scan $uhost %*\[^@\]@%s] [scan [getchanhost $ccheck $chan] %*\[^@\]@%s]]} {
incr clones
}
}
if {$clones > $eclones(lim)} {
if {!($eclones(cagain) <= 0)} {
set eclones([string tolower $chan]) 1
utimer 10 [list followrem eclones([string tolower $chan])]
}
punish:method2 $eclones(pmeth) $nick $uhost $chan $eclones(kmsg) $eclones(wmsg) $eclones(btype) $eclones(btime) $eclones(klmsg) $eclones(ktime) $eclones(ktype) [string tolower [scan $uhost %*\[^@\]@%s]]:eclones
}
}

proc bnick:kick {nick uhost hand chan {nn ""}} {
global bnick
if {$nn == ""} { set nn $nick }
if {[string first # $chan] != 0} {return 0}
if {![all:checks:valid $nn $hand $chan] || [nafp:chan $chan $bnick(chans)]} {return 0}
foreach badnick $bnick(nicks) {
if {[string match -nocase $badnick $nn]} {
putquick "KICK $chan $nn :[string map [list %kcount [getkcount]] $bnick(kmsg)]"
if {!($bnick(btype) < 0)} {
putquick "MODE $chan +b [set bmask [masktype $nn!$uhost $bnick(btype)]]"
if {!($bnick(btime) <= 0)} {
timer $bnick(btime) [list pushmode $chan -b $bmask]
}
}
break
}
}
}

proc bident:kick {nick uhost hand chan} {
global bident
if {![all:checks:valid $nick $hand $chan] || [nafp:chan $chan $bident(chans)]} {return 0}
scan $uhost %\[^@\] ident
foreach bid $bident(idents) {
if {[string match -nocase $bid $ident]} {
putquick "KICK $chan $nick :[string map [list %kcount [getkcount]] $bident(kmsg)]"
if {!($bident(btype) < 0)} {
putquick "MODE $chan +b [set bmask [masktype $nick!$uhost $bident(btype)]]"
if {!($bident(btime) <= 0)} {
timer $bident(btime) [list pushmode $chan -b $bmask]
}
}
break
}
}
}

set massb(lim) [scan $massb(punish) %\[^:\]]
set massb(secs) [scan $massb(punish) %*\[^:\]:%s]

proc mass:ban {nick uhost hand chan mc ban} {
global massb massbc serv
if {($nick == "") || [nafp:chan $chan $massb(chans)]} { return 0 }
if ![info exists massbc([set nickchan [string tolower $uhost:$chan]])] { set massbc($nickchan) 0 }
if {[follow $massb(secs) massbc($nickchan)] >= $massb(lim)} {
if {$massb(deop)} {
pushmode $chan -o $nick
putquick "$serv(nick) :[string map [list %nick $nick %chan $chan] $serv(command)]"
}
punish:method $massb(pmeth) $nick $uhost $chan $massb(kmsg) $massb(wmsg) $massb(btype) $massb(btime) $massb(klmsg) $massb(ktime) $massb(ktype) [string tolower $nick]:massb
}
}

set btextl(lim) [scan $btextl(punish) %\[^:\]]
set btextl(secs) [scan $btextl(punish) %*\[^:\]:%s]

proc btext:line {nick uhost hand chan arg} {
global btextl btxtl btclocked notifyusers
if {![all:checks:valid $nick $hand [set chan [string tolower $chan]]] || [nafp:chan $chan $btextl(chans)]} {return 0}
if {![info exists btxtl($chan)]} { set btxtl($chan) 0 }
if {![info exists btclocked($chan)]} { set btclocked($chan) 0 }
if {[follow $btextl(secs) btxtl($chan)] >= $btextl(lim)} {
if {!($btclocked($chan))} {
putquick "MODE $chan +$btextl(lockmode)" -next
if {!($btextl(locktime) <= 0)} {
utimer $btextl(locktime) [list btcunlock $chan $btextl(lockmode) btclocked($chan)]
} {
utimer 90 [list reset:btc bla bla bla $chan bla bla]
}
set btclocked($chan) 1
if {[string length $btclocked(lnotc)] > 0} {
puthelp "NOTICE $chan :$btclocked(lnotc)"
}
putlog "AFP: Locked $chan due to botnet text (lines) flood."
if {[llength $notifyusers]} {
foreach notfuser $notifyusers {
sendnote AFP $notfuser "Mass text flood (lines) detected on $chan."
}
}
}
}
}

proc btext:action {nick uhost hand chan keyword arg} {
if {[isbotnick [lindex [split $chan "@"] 0]] || [lindex [split $chan "@"] 1] != ""} {return 0}
btext:line $nick $uhost $chan $chan $arg
}

set btextc(lim) [scan $btextc(punish) %\[^:\]]
set btextc(secs) [scan $btextc(punish) %*\[^:\]:%s]

proc btext:chars {nick uhost hand chan arg} {
global btextc btxtc btclocked notifyusers
if {![all:checks:valid $nick $hand [set chan [string tolower $chan]]] || [nafp:chan $chan $btextc(chans)]} {return 0}
if ![info exists btxtc($chan)] { set btxtc($chan) 0 }
if ![info exists btclocked($chan)] { set btclocked($chan) 0 }
if {[follow $btextc(secs) btxtc($chan) [string length $arg]] >= $btextc(lim)} {
if {!($btclocked($chan))} {
putquick "MODE $chan +$btextc(lockmode)" -next
if {!($btextc(locktime) <= 0)} {
utimer $btextc(locktime) [list btcunlock $chan $btextc(lockmode) btclocked($chan)]
} {
utimer 90 [list reset:btc bla bla bla $chan bla bla]
}
set btclocked($chan) 1
if {[string length $btclocked(lnotc)] > 0} {
puthelp "NOTICE $chan :$btclocked(lnotc)"
}
putlog "AFP: Locked $chan due to botnet text (chars) flood."
if {[llength $notifyusers]} {
foreach notfuser $notifyusers {
sendnote AFP $notfuser "Mass text flood (chars) detected on $chan."
}
}
}
}
}

proc bchars:action {nick uhost hand chan keyword arg} {
if {[isbotnick [lindex [split $chan "@"] 0]] || [lindex [split $chan "@"] 1] != ""} {return 0}
btext:chars $nick $uhost $chan $chan $arg
}

set bnotil(lim) [scan $bnotil(punish) %\[^:\]]
set bnotil(secs) [scan $bnotil(punish) %*\[^:\]:%s]

proc bnotc:line {nick uhost hand arg chan} {
global bnotil bnotcl btclocked notifyusers
if {[isbotnick [lindex [split $chan "@"] 0]] || [string index $chan 0] == "@"} {return 0}
if {![all:checks:valid $nick $hand [set chan [string tolower $chan]]] || [nafp:chan $chan $bnotil(chans)]} {return 0}
if {![info exists bnotcl($chan)]} { set bnotcl($chan) 0 }
if {![info exists btclocked($chan)]} { set btclocked($chan) 0 }
if {[follow $bnotil(secs) bnotcl($chan)] >= $bnotil(lim)} {
if {!($btclocked($chan))} {
putquick "MODE $chan +$bnotil(lockmode)" -next
if {!($bnotil(locktime) <= 0)} {
utimer $bnotil(locktime) [list btcunlock $chan $bnotil(lockmode) btclocked($chan)]
} {
utimer 90 [list reset:btc bla bla bla $chan bla bla]
}
set btclocked($chan) 1
if {[string length $btclocked(lnotc)] > 0} {
puthelp "NOTICE $chan :$btclocked(lnotc)"
}
putlog "AFP: Locked $chan due to botnet notice (lines) flood."
if {[llength $notifyusers]} {
foreach notfuser $notifyusers {
sendnote AFP $notfuser "Mass notice flood (lines) detected on $chan."
}
}
}
}
}

set bnotic(lim) [scan $bnotic(punish) %\[^:\]]
set bnotic(secs) [scan $bnotic(punish) %*\[^:\]:%s]

proc bnotc:chars {nick uhost hand arg chan} {
global bnotic bnotcc btclocked notifyusers
if {[isbotnick [lindex [split $chan "@"] 0]] || [string index $chan 0] == "@"} {return 0}
if {![all:checks:valid $nick $hand [set chan [string tolower $chan]]] || [nafp:chan $chan $bnotic(chans)]} {return 0}
if ![info exists bnotcc($chan)] { set bnotcc($chan) 0 }
if ![info exists btclocked($chan)] { set btclocked($chan) 0 }
if {[follow $bnotic(secs) bnotcc($chan) [string length $arg]] >= $bnotic(lim)} {
if {!($btclocked($chan))} {
putquick "MODE $chan +$bnotic(lockmode)" -next
if {!($bnotic(locktime) <= 0)} {
utimer $bnotic(locktime) [list btcunlock $chan $bnotic(lockmode) btclocked($chan)]
} {
utimer 90 [list reset:btc bla bla bla $chan bla bla]
}
set btclocked($chan) 1
if {[string length $btclocked(lnotc)] > 0} {
puthelp "NOTICE $chan :$btclocked(lnotc)"
}
putlog "AFP: Locked $chan due to botnet notice (chars) flood."
if {[llength $notifyusers]} {
foreach notfuser $notifyusers {
sendnote AFP $notfuser "Mass notice flood (chars) detected on $chan."
}
}
}
}
}

set bctcpf(lim) [scan $bctcpf(punish) %\[^:\]]
set bctcpf(secs) [scan $bctcpf(punish) %*\[^:\]:%s]

proc bctcp:lock {nick uhost hand chan kw arg} {
global bctcpf bctcpc btclocked notifyusers
if {[isbotnick [lindex [split $chan "@"] 0]] || ([lindex [split $chan "@"] 1] != "") || [string equal -nocase "action" $kw] || [string equal -nocase "chat" $kw]} {return 0}
if {![all:checks:valid $nick $hand [set chan [string tolower $chan]]] || [nafp:chan $chan $bctcpf(chans)]} {return 0}
if {![info exists bctcpc($chan)]} { set bctcpc($chan) 0 }
if {![info exists btclocked($chan)]} { set btclocked($chan) 0 }
if {[follow $bctcpf(secs) bctcpc($chan)] >= $bctcpf(lim)} {
if {!($btclocked($chan))} {
putquick "MODE $chan +$bctcpf(lockmode)" -next
if {!($bctcpf(locktime) <= 0)} {
utimer $bctcpf(locktime) [list btcunlock $chan $bctcpf(lockmode) btclocked($chan)]
} {
utimer 90 [list reset:btc bla bla bla $chan bla bla]
}
set btclocked($chan) 1
if {[string length $btclocked(lnotc)] > 0} {
puthelp "NOTICE $chan :$btclocked(lnotc)"
}
putlog "AFP: Locked $chan due to botnet ctcp flood."
if {[llength $notifyusers]} {
foreach notfuser $notifyusers {
sendnote AFP $notfuser "Mass CTCP flood detected on $chan."
}
}
}
}
}

set ctcpf(lim) [scan $ctcpf(punish) %\[^:\]]
set ctcpf(secs) [scan $ctcpf(punish) %*\[^:\]:%s]

proc ctcp:kick {nick uhost hand chan kw arg} {
global ctcpf ctcpc
if {[isbotnick [lindex [split $chan "@"] 0]] || ([lindex [split $chan "@"] 1] != "") || [string equal -nocase "action" $kw] || [string equal -nocase "chat" $kw]} {return 0}
if {![all:checks:valid $nick $hand $chan] || [nafp:chan $chan $ctcpf(chans)]} {return 0}
if {![info exists ctcpc([set nickchan [string tolower $uhost:$chan]])]} { set ctcpc($nickchan) 0 }
if {[follow $ctcpf(secs) ctcpc($nickchan)] >= $ctcpf(lim)} {
punish:method $ctcpf(pmeth) $nick $uhost $chan $ctcpf(kmsg) $ctcpf(wmsg) $ctcpf(btype) $ctcpf(btime) $ctcpf(klmsg) $ctcpf(ktime) $ctcpf(ktype) [string tolower $nick]:ctcpf
}
}


set bjoinf(lim) [scan $bjoinf(punish) %\[^:\]]
set bjoinf(secs) [scan $bjoinf(punish) %*\[^:\]:%s]

proc bjoinf:lock {nick uhost hand chan} {
global bjoinf cjoinf btclocked notifyusers
if {![botisop $chan] || [matchattr $hand f|f $chan] || [matchattr $hand m|m $chan] || [isbotnick $nick] || [nafp:chan $chan $bjoinf(chans)]} {return 0}
if {![info exists cjoinf([set chan [string tolower $chan]])]} { set cjoinf($chan) 0 }
if {![info exists btclocked($chan)]} { set btclocked($chan) 0 }
if {[follow $bjoinf(secs) cjoinf($chan)] >= $bjoinf(lim)} {
if {!($btclocked($chan))} {
putquick "MODE $chan +$bjoinf(lockmode)" -next
if {!($bjoinf(locktime) <= 0)} {
utimer $bjoinf(locktime) [list btcunlock $chan $bjoinf(lockmode) btclocked($chan)]
} {
utimer 90 [list reset:btc bla bla bla $chan bla bla]
}
set btclocked($chan) 1
if {[string length $btclocked(lnotc)] > 0} {
puthelp "NOTICE $chan :$btclocked(lnotc)"
}
putlog "AFP: Locked $chan due to botnet join flood."
if {[llength $notifyusers]} {
foreach notfuser $notifyusers {
sendnote AFP $notfuser "Mass join flood detected on $chan."
}
}
}
}
}

set bnickf(lim) [scan $bnickf(punish) %\[^:\]]
set bnickf(secs) [scan $bnickf(punish) %*\[^:\]:%s]

proc bnickf:lock {nick uhost hand chan nn} {
global bnickf bnickc btclocked notifyusers
if {[string first # $chan] != 0} {return 0}
if {![all:checks:valid $nick $hand [set chan [string tolower $chan]]] || [nafp:chan $chan $bnickf(chans)]} {return 0}
if {![info exists bnickc($chan)]} { set bnickc($chan) 0 }
if {![info exists btclocked($chan)]} { set btclocked($chan) 0 }
if {[follow $bnickf(secs) bnickc($chan)] >= $bnickf(lim)} {
if {!($btclocked($chan))} {
putquick "MODE $chan +$bnickf(lockmode)" -next
if {!($bnickf(locktime) <= 0)} {
utimer $bnickf(locktime) [list btcunlock $chan $bnickf(lockmode) btclocked($chan)]
} {
utimer 90 [list reset:btc bla bla bla $chan bla bla]
}
set btclocked($chan) 1
if {[string length $btclocked(lnotc)] > 0} {
puthelp "NOTICE $chan :$btclocked(lnotc)"
}
putlog "AFP: Locked $chan due to botnet nick flood."
if {[llength $notifyusers]} {
foreach notfuser $notifyusers {
sendnote AFP $notfuser "Mass nick flood detected on $chan."
}
}
}
}
}

proc config:lim {} {
global clim
foreach chan [channels] {
if {![botisop $chan] || [nafp:chan $chan $clim(chans)]} { continue }
if {[string match *l* [getchanmode $chan]]} {
if {[expr {[lindex [split [getchanmode $chan]] end] - [set thislim [llength [chanlist $chan]]]}] != [expr {$clim(alim) - $clim(ulim)}]} {
if {[set mylim [expr {$thislim + $clim(alim)}]] != [lindex [split [getchanmode $chan]] end]} {
putserv "MODE $chan +l $mylim"
}
}
} {
putserv "MODE $chan +l [expr {[llength [chanlist $chan]] + $clim(alim)}]"
}
}
if {$clim(ctype)} {
timer $clim(ctime) [list config:lim]
} {
utimer $clim(ctime) [list config:lim]
}
}

proc nosense:kick {nick uhost hand chan} {
global nosense
set stopnc 0
foreach exempt $nosense(exempt) {
if {[string match -nocase $exempt $nick!$uhost]} {
set stopnc 1
break
}
}
if {$stopnc} { return 0 }
scan $uhost %\[^@\] ident
if {![info exists nosense(pause)]} { set nosense(pause) 0 }
if {[nafp:chan $chan $nosense(chans)] || ($nosense(pause) > 3) || ([string match -nocase *[set sident [string trimleft $ident ~]]* $nick]) || [matchattr $hand f|f $chan] || [matchattr $hand mo|mo $chan]} {return 0}
if {([botisop $chan]) && ([string length $nick] > 3) && ([string is alpha $nick]) && ([string is lower $nick]) && ([string is alpha $sident]) && ([string is lower $sident])} {
if {![string match *\[aeiou\]* $nick]} { nosense:ban $nick $uhost $chan ; return 0 }
if {[regexp {qb|qc|qd|qf|qg|qh|qk|qn|qp|qq|qr|qs|qt|jwm} $nick]} { nosense:ban $nick $uhost $chan ; return 0 }
if {[regexp {xd|xf|xg|xh|xk|xm|xn|xq|xr|xt|xv|xz|qw|qz|gz} $nick]} { nosense:ban $nick $uhost $chan ; return 0 }
if {[regexp {zb|zc|zd|zf|zh|zm|zq|zr|zt|zv|zx|qx|qv|kz} $nick]} { nosense:ban $nick $uhost $chan ; return 0 }
if {[regexp {vb|vf|vg|vh|vk|vm|vn|vq|vx|vw|bgb|gv|wj|lx} $nick]} { nosense:ban $nick $uhost $chan ; return 0 }
if {[re
Sus
Vezi profilul utilizatorului Trimite mesaj privat
Autor Mesaj
uahanamiti
Junior
Junior


Data inscrierii: 29/Iun/2012
Mesaje: 6
Localitate: Ukraine

MesajTrimis: 14/07/2012 09:03    Titlul subiectului: Raspunde cu citat (quote)

Thanks for the inihsgt. It brings light into the dark!
Sus
Vezi profilul utilizatorului Trimite mesaj privat
Autor Mesaj
animalplanet2
Junior
Junior


Data inscrierii: 11/Iul/2012
Mesaje: 5
Localitate: Poland

MesajTrimis: 24/07/2012 21:00    Titlul subiectului: Raspunde cu citat (quote)

Thank you for sharing this great information!
Sus
Vezi profilul utilizatorului Trimite mesaj privat
Autor Mesaj
animalplanet2
Junior
Junior


Data inscrierii: 11/Iul/2012
Mesaje: 5
Localitate: Poland

MesajTrimis: 26/07/2012 14:10    Titlul subiectului: Raspunde cu citat (quote)

I had no idea how to approach this before-now I'm locked and laoedd.
Sus
Vezi profilul utilizatorului Trimite mesaj privat
Afiseaza mesajele pentru a le previzualiza:   
Raspunde la subiect    Pagina de start a forumului #PBC Official Forum -> TCL Scripts Ora este GMT + 2 ore
Pagina 1 din 1

 
Mergi direct la:  
Nu puteti crea un subiect nou in acest forum
Nu puteti raspunde in subiectele acestui forum
Nu puteti modifica mesajele proprii din acest forum
Nu puteti sterge mesajele proprii din acest forum
Nu puteti vota in chestionarele din acest forum
Fa-ti si tu propriul forum GRATUIT, pe www.myforum.ro