BeBot - An Anarchy Online and Age Of Conan chat automaton
Development => Module Requests => Topic started by: ilon on January 06, 2007, 01:57:43 pm
-
So, the thing i really miss to be able to maintain the org (kick inactive members, remove shops for players who left etc is a command (!members?) that shows all the members that are in the org.
A really nice additional function would be a sort function (per default) for it to group alts togheter, like:
amain
amains-alt1
amains-alt2
cmain
cmain-alt1
etc, sort them alphabetical and just throw in the alts under the main-char.
would help alot for me, and i bet other ppl could use it too. :)
would be really happy if someone who know more about coding than me could help me out here and maybe do suck a module. i dont know much about php, but i assume it wouldnt be much code, like fetch memberslist, fetch alt list, sort method, sort the list, show it, or something >_>
-
I am still not good at coding php, but the info you are looking for is in the database already. Would prolly be possible to make a SELECT statement that gives you just what you need. Stil haven't had my morning coffee, so the following is all I could come up with in 2 minutes, sounds useful, will see if I can come up with something better. Lists all members with their alts (only those in org), ordered by name of the main, then name of the alt. Note that this may be the wrong way to do it in mysql, I usually use postgresql and oracle. And even in those databases, it would be considered ugly. ^^
SELECT mains.main, alt
FROM (SELECT nickname main
FROM members
WHERE nickname NOT IN (SELECT alt FROM alts)) mains
LEFT JOIN (SELECT alts.main, alts.alt
FROM alts, members
WHERE alts.alt = members.nickname) altsinorg
ON (mains.main = altsinorg.main)
ORDER BY main, alt;
-
anyone feels like making this into a working module? i simply dosnt have the knowledge in SQL / PHP for it :<
-
http://www.jjones.co.uk/files/memberlist2.php
that was something wolfbiter wrote and i changed slightly for our org. should fit roughly what you need.
-jj-
-
ok, tyvm :))
will try it out tomorrow when i wake up, need some sleep badly now :P
gnite