Youness Alaoui wrote: > Humm.. how about NEVER counting ... > What I mean is, instead of an event to keep the count, and isntead of > caling a updatecounts before the > cmsn_draw_online, we could instead directly do a : >>> groups::GetCount $group > which will calculate it on the fly... > I hate the idea of keeping the count in a variable and update that > count on events..
I don't know if I got it right If you stay with events, no GetCount would be needed; I mean, every time a user is added/removed to/from the CL (because he connected/disconnected) you just fire the userconnect (whatever, I don't remember), you trigger that and do a +/-1 ? I would go with it clean and nice :) As a prototype GroupCount $group {add|remove|get} (defaults to get) every time this is called it updates a var (an arr, I'd say ?) in the same namespace which contains the "cached" counter what about this? (I know I didn't care about switching mode; up to you to clean it up :P) bye ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Amsn-devel mailing list Amsn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amsn-devel