This tcl is easy of use just edit the channel name "#CHANGE_ME_NOW" and you could set the
mode to give to +o but i don't Suggest it, Leave it to +v :p
now copy paste this code in a .tcl file ( i suggest you to call the file Dm.tcl,
and load it in your eggdrop
in this directory /eggdrop/scripts
then DON'T FORGET to add the name of the file in your eggdrop.conf
add this line
source scripts/Dm.tcl
( if you named the file Dm.tcl )
#Its Made To Work With The Channel Modes +Dm
#Its To Prevent Join/Part Flood From Botnets and Lame Script Kiddow
#My info: xplorer@live.ca - irc.undernet.org - #mircscripting
#This Tcl *ONLY* Work on ONE (1) Channel
#Enter the name below
set modeD(channel) "#CHANGE_ME_NOW"
#Set The mode to give, I SUGGEST you to keep it to "v"
set modeD(mode) "v"
# Binds
bind time - "* * * *" modeD:time
bind raw - 355 modeD:raw353
bind raw - 315 modeD:raw353
bind raw - 352 modeD:raw352
proc modeD:raw352 {from raw arg} {
global modeD
set host [lindex [split $arg] 3]
set host "*!*@$host"
set nick [lindex [split $arg] 5]
if { [isban $host $modeD(channel)] || [isban [maskhost $host] $modeD(channel)] || [isban $host]|| [isban [maskhost $host]] } {
#If Reached here The user is in blacklist host!
return
}
putquick "MODE $modeD(channel) +v $nick"
putcmdlog "MODE $modeD(channel) +v $nick"
}
proc modeD:time {min hour day month year} {
global modeD
if {[validchan $modeD(channel)]} {
if {[regexp {D|d} [lindex [getchanmode $modeD(channel)] 0]]} {
putquick "NAMES -d $modeD(channel)" -next
putcmdlog "Doing -d "
}
}
}
proc modeD:raw353 {from raw arg} {
global modeD
putcmdlog "I am in modeD:raw353"
set channel [lindex [split $arg] 2]
putcmdlog "$arg"
if {[set mode $modeD(mode)] == ""} {
set mode "v"
}
if {![string equal -nocase $channel $modeD(channel)]} { return }
putcmdlog "$arg"
set list2 [lindex [split $arg :] 1]
putcmdlog "$list2"
foreach user [lindex [split $arg :] 1] {
if {$user != "" && (![onchan $user $channel] || (![isop $user $channel] && ![isvoice $user $channel]))} {
putquick "WHO $user"
}
}
}
#########
putlog "Delay Voice +Dm XploreR@Live.Ca"
Made a little update to it. Here's something for ya folks:
# Its Made To Work With The Channel Modes +Dm
# Its To Prevent Join/Part Flood From Botnets and Lame Script Kiddow
# Inital coder: xplorer@live.ca - irc.undernet.org - #mircscripting
# Updated 2009/01/19 by: OUTsider <outsider@scarynet.org>
# Made it multichannel operating. Just be carefull not
# to excess flood on unet depending on the amount and
# sizes of your total usercount.
# Say hello to user defined channel flags.
# Simply turn on/off per chan using .chanset <chan> [+|-]modeD
# change the mode to use (o|v) using .chanset <chan> modeD_mode <mode>
setudef flag modeD
setudef str modeD_mode
# Make sure all channels have a default mode set on startup.
foreach chan [channels] {
if {[channel get $chan modeD_mode] == ""} {
channel set $chan modeD_mode "v"
}
}
# Binds
bind time - "* * * * *" modeD:time
bind raw - 353 modeD:raw353
bind raw - 352 modeD:raw352
proc modeD:raw352 {from raw arg} {
set arg [split $arg]
set user [lindex $arg 2]
set host [lindex $arg 3]
set nick [lindex $arg 5]
foreach chan [channels] {
if {[channel get $chan modeD]} {
# Now you probably ask why I split all this and not combine it
# into one major if statement. Very simple, this *IS* faster.
# because you first check if it's needed to even check this chan.
# THEN you check if the user is either voiced or opped
# THEN you check if you still got a reason for the user not to
# get voiced...
if {[isop $nick $chan] || [isvoice $nick $chan]} {
return
}
if {[isban "$nick!$user@$host" $chan] || [isban [maskhost "$nick!$user@$host"] $chan] ||
[isban "$nick!$user@$host"]|| [isban [maskhost "$nick!$user@$host"]]} {
return
}
# and here you could for example think of other reasons why you
# would not like a certain user to get voiced...
# otherwise, give the nick a voice. (I prefer pushmode since it ends up in
# the modequeue that way. The function is there, so I use it :P
pushmode $chan +[channel get $chan modeD_mode] $nick
}
}
}
proc modeD:time {min hour day month year} {
foreach chan [channels] {
if {[validchan $chan] && [channel get $chan modeD] && [regexp {D|d} [lindex [getchanmode $chan] 0]]} {
putserv "NAMES $chan"
}
}
}
proc modeD:raw353 {from raw arg} {
set channel [lindex [split $arg] 2]
if {[channel get $channel modeD] } {
foreach user [lindex [split $arg :] 1] {
if {$user != "" && ![regexp {\@|\+} $user]} {
putserv "WHO $user"
}
}
}
}
#########
putlog "Delay Voice +Dm XploreR@Live.Ca - Updated 2009/01/19 OUTsider"