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.

Simpel way to only allow a command one time in 20 mins

Old posts that have not been replied to for several years.
Locked
b
benzon

Simpel way to only allow a command one time in 20 mins

Post by benzon »

i got a problem, i made a litle script that generate stats if you type !dkstats but right know you can type it all the times you want is it posible i can get a snippet that show´s how i make it so you only can type that command every 20 min !

Plz Help :)
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Somthing like

Code: Select all

global MyTstamp
if {![info exists MyTstamp]} { set MyTstamp 0 }
if {([clock seconds] - $MyTstamp) > (20 * 60)} {
  return
}
set MKyTstamp [clock seconds]
Locked