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.

limit usage of commands for users/specific user

Old posts that have not been replied to for several years.
Locked
d
difoo
Voice
Posts: 33
Joined: Sat Jul 03, 2004 9:56 am

limit usage of commands for users/specific user

Post by difoo »

hi, im wondering if it's possible to limit the command usage for users and a specific user like this:

users should be able to !newsadd <topic> 20 times a week.
and user1 i'd like to limit the usage for !newsadd 10 times a week.

i can't get how to let the bot store the info on how often the user already issue'd the command, any help would be greatly appreciated. =)
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

you can either use a list (refer lappend, lsearch, lindex and lreplace in the TCL manual) or you use an array like $newssetting($hand:usage) (exact this would handle all non registriert users as 1 user, but just checking against the nick will be useless ^^).
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
d
difoo
Voice
Posts: 33
Joined: Sat Jul 03, 2004 9:56 am

Post by difoo »

hi, thanks for the reply

i cant get this to work anyhow, could you give me an example how you would do it?
Locked