awyeah wrote:Scanning each user on join will obviously lagg the bot and wouldn't even make it effective against mass join flood protections.
Well usually those bots have random nicks. I have made a script using string match and regexp to match against certain nicks with certain combinations of alphabets present in them and a few characters and words. You can define the combinations to trigger and exempt on.![]()
It is not fool proof but it is good enough to remove random drone nicks which join channels to flood. Also some bots might have same IP's check for similar *!*@host on join like some clone scripts, and ban if say 2 or 3 similar ips join in your channel in less than 1-3 seconds or so. Or you can enable flood-join which is good to.![]()
There are other precautions to be taken as well.
awyeah wrote:You might want to try out sentinel.tcl by slennox on egghelp.org for mass join flood, or join/part protections.
I am currently doing a script similarly to, it will lock the channel to some desired modes so the bots don't text/notice flood. It will prevent mass joins of alot of hosts in a less amount of time, mass joins of 2-3 similar hosts in less than desired secs and mass join/parts of similar hosts in the desired time. Still it is under test and development to some extent.
As for your drone nick problem. I use the script on a channel with 300+ users, regular users i.e. no bots or xdcc bots and it works fine for me. It has never gone mad and starting kicking everyone joining, out of 100 users kicked 2-3 might be innocent. However, likely alot of random nicks might not be kicked as there are alot of variations. It is based on the same pattern of matching which ozscript (mIRC script) uses for nonsense.ini (nosense nicks).
I have daily recorded logs for this estimate. The script won't go mad, although it might kick 1% innocent users sometimes out of the 99% as it is not always perfect. The more matches and exempts you define for it the better it can get, obviously. It is a random/drone nick kicker. I can't give it to you at the moment though, it will be released on egghelp.org when I fully test it as well.
I recommend you to use sentinel.tcl as it is currently one of the best flood protection scripts around. Especially I like the avalanche/tsunami protection, that is really effective.I knew there's this script caled sentine.tcl but quite a time back when i installed it on my botty, perhaps due to my wrong configuration, most of the time the bot will kick numbers of users out during netsplit (when they returned) and this i really withness it.. lolx!
Code: Select all
# Set here the time (in seconds) to wait for someone to return from a netsplit
# (i.e. wasop will expire afterwards). Set this to 1500 on IRCnet since its
# nick delay stops after 30 minutes.
set wait-split 600
I will release the script publicly on www.egghelp.org's tcl archive when I am done and through with it. Currently it is under test and will take sometime, approx. 2-3times. Unfortunately I haven't been getting so much time to do scripts these days!Hmmm, awyeah, would like u to do me a favour... When u have posted the script that u have mention in this topic, please send me a msg to my forum's inbox or leave a msg here yea?Thanks...
Basically my drone nick kicker will exempt all nicks with VOWELS, like nicks which have a, e, i, o, u and y also (if specified). It will match against certain combinations such as if "gv" or "zx" "wc" "rw" etc some of these kinds of combinations are present with a specific nick length and a specific user ident length also checking if the ident is dynamic (with an ~ at the front). All these conditions make it work perfectly fine, especially the dynamic ident (~) makes it easier to detect proxied bots as their idents do not resolve behind a proxy.Mmm...Cause i have no idea what's the drones or flood bots's nicks...As it was loaded manually by the user 1 by 1 so he can decide on what's the nicks and the username and wadever... Anyway, do anyone have a tcl that will make a bot whois a on-join user and check for their realname and den if it was blacklisted, it will kick + ban him/her out of the #? Will thsi tcl lag the bot too?
WeiJie wrote:Could anyone help with this? I just downloaded badrealname.tcl by Papillon and loaded it into my eggdrop, but will it's only allow to scan 1 channel i think... how could i let it scan few #s?
Code: Select all
# The realname check should be done only in what channel?
set badr(chan) "#*"
Code: Select all
And "#*" won't work.
awyeah wrote:Hehe, I have modified it to work on more than 1 channels. Simply by changing it to a list and then lsearching finding and comparing the channel with the list if it is found.
Code: Select all
And "#*" won't work.
Code: Select all
### Setting options and variables ###
# What bad realnames should be banned?
set badrlist {
"sex"
"xxx"
"horny"
"bitch"
"asshole"
"pussy"
"penis"
"naked"
"blowjob"
}
# Set the channels to kick on
set badrcheck "#funchat #gossip #giggles #usa #elite"
# Set the kick message
set badrkick "bad channel found!"
# For how many minutes would you like to ban?
set badrtime "60"
### SCRIPT ###
bind join - * brealname:join
bind raw - 311 brealname:check
proc brealname:join {nick uhost hand chan} {
global botnick badrcheck
if {([lsearch -exact [split [string tolower $badrcheck]] [string tolower $chan]] != -1) && (![string equal -nocase $botnick $nick]) && (![matchattr $hand of|fo $chan])} {
putserv "WHOIS $nick"; return 0
}
}
proc brealname:check {from keyword arg} {
global botnick badrcheck badrlist badrkick badrtime
set realname [string tolower [ctrl:filter [lindex [lrange [split $arg ":"] 1 end] 0]]]
set nick [lindex $arg 1]; set uhost [getchanhost $nick]
foreach realnamechan [string tolower $badrcheck] {
if {([botisop $realnamechan]) && (![isop $nick $realnamechan]) && (![isvoice $nick $realnamechan]) && ([onchan $nick $realnamechan])} {
foreach name [string tolower $badrlist] {
if {([string match -nocase *$name* $realname])} {
putserv "MODE $realnamechan +b *!*@[lindex [split $uhost "@"] 1]"
putserv "KICK $chan $realnamechan :$badrkick"
timer $badrtime "pushmode $chan -b *!*@[lindex [split $uhost "@"] 1]"
return 1
}
}
}
}
}
proc ctrl:filter {str} {
regsub -all -- {\003([0-9]{1,2}(,[0-9]{1,2})?)?|\017|\037|\002|\026|\006|\007} $str "" str
return $str
}