This is a quick snippet I made. It flood protects your channel.
It only works if the channel has it enabled.
Commands:
!flood on -- Turns flood protection on for that channel.
!flood off -- Turns flood protection off for that channel.
Thanks, enjoy!
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;; Made By Jackster35 ;;;;;;;
;;;;;;;;; http://jackster35.co.uk/ ;;;;;;;
;;;;;;;;; DO NOT COPY! ;;;;;;;
;;;;;;;;; Hawkee user: Jackster35-1 ;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
on *:TEXT:*:#:{
if (%flood. [ $+ [ $chan ] ] == on) {
inc -u5 %flood. [ $+ [ $nick ] ] 1
if (%flood. [ $+ [ $nick ] ] >= 5) {
/mode $chan +b $address($nick,0)
/kick $chan $nick Flood Protection activated! This ban will expire in 10 minutes.
.timer 1 600 /mode $chan -b $address($nick,0)
}
}
}
on *:TEXT:!flood *:#:{
if ($nick isop $chan) {
if ($2 == on) {
set %flood. [ $+ [ $chan ] ] on
msg $chan Flood protection now on. People will now be kick with 5 lines or more.
}
if ($2 == off) {
unset %flood. [ $+ [ $chan ] ]
msg $chan Flood protection now off.
}
}
else {
msg $chan Error: Only ops can use this command.
}
}
tttwebsite wrote:> can you put in warnings please so that it will send a notice to stop doing it like give three warnings thin kick then ban please
on @*:text:*:#: warn $1-
on @*:action:*:#: warn $1-
on @*:notice:*:#: warn $1-
alias -l warn {
if (%flood. [ $+ [ # ] ] == on) {
inc -u5 %flood. [ $+ [ $wildsite ] ]
if (%flood. [ $+ [ $wildsite ] ] >= 5) {
hinc -m w $wildsite
if ($hget(w,$wildsite) > 3) {
ban -ku600 # $nick 2 Flood Protection activated! $&
This ban will expire in 10 minutes. | hdel w $wildsite | return
}
goto $v1
:3 | notice $nick Please get your act together. This is your last warning! | halt
:2 | notice $nick Please stop flooding. This is your 2nd warning! | halt
:1 | notice $nick No flooding please!
}
}
}
Jethro_, contrary to what you may think, my comment was quite self-explanatory. The code snippet would just be holding someone's hand through the coding process that obviously already knows a little bit about what they're doing. As for a constructive comment- it's better to explain one's thoughts/ideas out thoroughly, instead of using terms that don't appeal to the masses.
If you find the need to continue this senseless game of comment-tag, just send me a private message. Thanks
Why is that not constructive? You use a generic term to introduce it to those who don't know. Every one of us surely wasn't born to know something until we learn something, correct? God forbid, it's a different story to melodramatically sensitive folks who can't take good comments for bad ones...
Moreover, it's always a good idea to include a code demonstration to show what you mean by what you've said. Many times we say a bunch of things trying to decipher a topic, but only to result misunderstanding or confusion to those who read our posts. As they say, a picture is worth a thousand words.