This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Flood Protection

Old posts that have not been replied to for several years.
Locked
W
Winters
Voice
Posts: 29
Joined: Sat Jul 09, 2005 12:24 pm

Flood Protection

Post by Winters »

Hi @ all me again ^^.

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 :>

Code: Select all

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!------------"
}
User avatar
avilon
Halfop
Posts: 64
Joined: Tue Jul 13, 2004 6:58 am
Location: Germany

Re: Flood Protection

Post by avilon »

Code: Select all

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?
W
Winters
Voice
Posts: 29
Joined: Sat Jul 09, 2005 12:24 pm

Post by Winters »

forgot to change m too -|-
Locked