ID:148837
 
i have a build game and to find spamers. i want to save verb use in some kind of log but i don't know how :(
NM i got one
Nunugi wrote:
i have a build game and to find spamers. i want to save verb use in some kind of log but i don't know how :(

Here's a quickie thing that might work.

mob
var/list/nextSpam = list()

proc/IsSpamming(action, delay)
if(nextSpam[action] < world.time) return 1
nextSpam[action] = world.time + delay


//...and here's a sample of how to use it
verb/DoSomething()
//Ignore verb if less than 10 ticks have passed since
//last use.
if(IsSpamming("DoSomething", 10)) return

//Put the normal verb code here.