On Wed, 1 Apr 1998, Ryan Guthrie wrote: > I have been bugged enough into creating a working wizlist. The way i see > fit to do it right now is to do a loop reading all players, then when a > level equals some immortal, it does a fprintf()(maybe put it in a buf and > center it, then fprintf). How does that sound? Anyways would someone > else mind sending me either their ideas or actual autowiz.c file so i can > look at different, maybe more efficent ways of doing it. Assuming Circle's ASCII Pfiles work roughly like what MERC/derivatives' do (which I run), consider instead of opening all pfiles, saving a file to a "Gods" directory whenever someone that is Godly saves. That file should be named whatever the admin is named, and contain information like level and.. well, whatever else you want to save; I save things like homepage address, trust level, extra granted commands, spheres of responsibility (http://www.abandoned.org:4448/wizlist) Then at bootup (or whenever someone godly changes level by Advance), go through the contents of that directory, read all the files and keep that in memory. Whenever someone requests a wizlist, loop through the list and print the contents out. This has obvious speed advantages with a large pfile base; I wouldn't want to read in 22mb of pfiles to make a wizlist frequently.. :) ============================================================================= Erwin Andreasen Herlev, Denmark <erwin@pip.dknet.dk> UNIX System Programmer <URL:http://www.abandoned.org/drylock/> <*> (not speaking for) DDE ============================================================================= +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST