View Single Post
Old 01-29-2014, 12:20 AM  
Yil
Too much time...
 
Join Date: May 2005
Posts: 1,194
Default

The site stats command is actually pretty flexible, BUT it's purpose is to give out stats about other users so if you don't want them to see that then set the permissions on 'site stats' so they can't use it If you just want them to view THEIR stats (but no ranking) then check out 'site myinfo' which gives the same data as 'site uinfo' but only for their account which is hopefully all that you're looking for.

I don't see a trivial way to get the ranking (say, 5th largest uploader this month) without having the server also list other users by name. Even using the super-message cookie %[STATS()], see doc/Cookies.txt, which can be used to generate output just like the 'site stats' command won't really solve your problem.

The easiest way is to just write a small TCL script. Grab the list of all known uids, open each user and grab the stat you want out of it and save the name/stat in a list, sort the list, and spit out just the data for the caller. All the iTCL (ioFTPD specific TCL calls) are defined in doc/iTCL.txt. Check out the UGrep script I wrote (should be pinned to the top here) which does most of what you'll need.
Yil is offline   Reply With Quote