I just want a flood protection in this script here that when somebody typed $help on the chan then the flood protection must block this command for 30 seconds so the nick who typed it couldn't flood the bot. it would be nice if you can add it in this script :>
bind pub m {$help} help
proc help { nick host hand chan arg } {
puthelp "notice $nick :------------Help for Protection Bot!-------------"
puthelp "notice $nick :?protection on/off - Enables/Disables the protection script!"
puthelp "notice $nick :?kick nick <reason> - Kicks a user (could be without a reason)!"
puthelp "notice $nick :?ban nick/hostmask <duration> <reason> - Bans a user (could be without duration and reason)!"
puthelp "notice $nick :?op (nick)/* - Ops you/the nick/all in channel!"
puthelp "notice $nick :?voice (nick)/* - Same like op just giving +!"
puthelp "notice $nick :?devoice (nick)/* - Devoice you/the nick/all in channel!"
puthelp "notice $nick :?deop (nick)/* - Deop you/the nick/all in channel!"
puthelp "notice $nick :?chanflags help - To see the help for channel flags!"
puthelp "notice $nick :?userlist - To see the current userlist for the channel!"
puthelp "notice $nick :?mode +/- - To set or delete a chan mode!"
puthelp "notice $nick :?topic <topic> - Too set the topic for the channel!"
puthelp "notice $nick :-------------End of the Command list!------------"
}
bind pub m {$help} help
proc help {nick host hand chan arg} {
global lasthelp
if {[info exists lasthelp($host)] && [expr [clock seconds] - $lasthelp($host)] < 30} {
return
}
puthelp "NOTICE $nick :------------Help for Protection Bot!-------------"
puthelp "NOTICE $nick :?protection on/off - Enables/Disables the protection script!"
puthelp "NOTICE $nick :?kick nick <reason> - Kicks a user (could be without a reason)!"
puthelp "NOTICE $nick :?ban nick/hostmask <duration> <reason> - Bans a user (could be without duration and reason)!"
puthelp "NOTICE $nick :?op (nick)/* - Ops you/the nick/all in channel!"
puthelp "NOTICE $nick :?voice (nick)/* - Same like op just giving +!"
puthelp "NOTICE $nick :?devoice (nick)/* - Devoice you/the nick/all in channel!"
puthelp "NOTICE $nick :?deop (nick)/* - Deop you/the nick/all in channel!"
puthelp "NOTICE $nick :?chanflags help - To see the help for channel flags!"
puthelp "NOTICE $nick :?userlist - To see the current userlist for the channel!"
puthelp "NOTICE $nick :?mode +/- - To set or delete a chan mode!"
puthelp "NOTICE $nick :?topic <topic> - Too set the topic for the channel!"
puthelp "NOTICE $nick :-------------End of the Command list!------------"
set lasthelp($host) [clock seconds]
}
btw... the command is restricted to global masters. Why should a global master flood your bot?