it's correct?
and with this code the channel is set +i every time for every bad user in flood? or only once?
and if I want to overwrite eggdrop default behavior, can I uncomment ban and kick line, and set return 1? right?
geek wrote:
...
what is the normal punishment?
...
I think it is kick only.
As to whether even that is on or off - and if on, the config - do:
.chaninfo #channel
in the partyline and see the flood settings at the bottom of the info returned.
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
set joinlockmodes "i"
# eggdrop will unlock the channel after the specified time in seconds you will set below
set unlocktime "60"
# set the reason you want
set jreason "test test"
bind flud - join joinflood:mytest
proc joinflood:mytest {nick uhost hand type chan {islock 0}} {
global joinlockmodes unlocktime jreason botnick
if {![botisop $chan] || [matchattr $hand "of|of" $chan]} { return 0 }
if { $islock < 1 } {
putquick "MODE $chan +$joinlockmodes"
set islock 1
}
set banmask "*!*@[lindex [split $uhost @] 1]"
# set banmask "*!*@[lindex [split [maskhost $uhost] "@"] 1]"
putquick "MODE $chan +b $banmask"
# putquick "KICK $chan $nick $jreason"
utimer $unlocktime {
unset islock
if {[string match *i* [lindex [split [getchanmode $chan]] 0]]} {
[list putquick "MODE $chan -$joinlockmodes"]
}
}
return 1
}
lock works fine but I got two errors when it try to execute utimer:
1) Tcl error in script for 'timer': can't unset "islock": no such variable
2) Tcl error in script for 'timer': can't read "chan": no such variable
set joinlockmodes "i"
# eggdrop will unlock the channel after the specified time in seconds you will set below
set unlocktime "60"
# set the reason you want
set jreason "test test"
set islock 0
bind flud - join joinflood:mytest
proc joinflood:mytest {nick uhost hand type chan} {
global joinlockmodes unlocktime jreason botnick islock
if {![botisop $chan] || [matchattr $hand "of|of" $chan]} { return 0 }
if { $islock < 1 } {
putquick "MODE $chan +$joinlockmodes"
set islock 1
}
set banmask "*!*@[lindex [split $uhost @] 1]"
# set banmask "*!*@[lindex [split [maskhost $uhost] "@"] 1]"
putquick "MODE $chan +b $banmask"
# putquick "KICK $chan $nick $jreason"
utimer $unlocktime {
set islock 0
if {[string match *i* [lindex [split [getchanmode $chan]] 0]]} {
[list putquick "MODE $chan -$joinlockmodes"]
}
}
return 1
}