BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Anarchy Online Archive => AO 0.6 support => Topic started by: Lucalus on May 10, 2010, 05:10:48 pm

Title: Memberlist with Mainchars only?
Post by: Lucalus on May 10, 2010, 05:10:48 pm
Hey,

is there a way to get a List from BeBot where only Mainchars are being listed? Alt“s excluded?

This would make it much easier to manage a Member List.

Greez
Title: Re: Memberlist with Mainchars only?
Post by: Yite on May 10, 2010, 08:19:38 pm
I grabbed the memberlist code from modules/Roster.php and add the following:
Code: [Select]
        function memberslistmain()
        {
                $blob = "";
                $count = 0;
                $result = $this -> bot -> db -> select("SELECT nickname, last_seen FROM #___users LEFT JOIN alts ON #___users.nickname = alts.alt WHERE user_level = " . MEMBER . " AND alts.alt IS NULL ORDER BY nickname ASC");
                if (!empty($result))
                {
                        $inside = "##blob_title##:::: <botname>'s Mains List ::::##end##\n\n";
                        foreach ($result as $val)
                        {
                                $count++;
                                $inside .= "##blob_text##• " . $val[0];
                                if ($val[1] > 0)
                                {
                                        $inside .= ", last seen at " . gmdate($this -> bot -> core("settings") -> get("Time", "FormatString"), $val[1]);
                                }
                                else
                                {
                                        $inside .= ", never seen online";
                                }
                                $inside .= "##end## ".$this -> bot -> core("tools") -> chatcmd("whois " . $val[0], "[Whois]")."\n";
                        }
                        $blob = " :: " . $this -> bot -> core("tools") -> make_blob("click to view", $inside);
                }
                return $count . " mains in <botname>" . $blob;
        }
Title: Re: Memberlist with Mainchars only?
Post by: draveyn on June 17, 2010, 02:40:09 pm
is there code sorta like this for amins list, not to show all alts and main, but just show the user online if its alt or main, etc
like in the memberlist
Title: Re: Memberlist with Mainchars only?
Post by: Kyr on June 17, 2010, 08:51:55 pm
This will show the admins online:
Code: [Select]
!adminsThis will show all the admin along with their online status:
Code: [Select]
!admins all
Enjoy!

~Kyr
Title: Re: Memberlist with Mainchars only?
Post by: draveyn on June 26, 2010, 04:38:06 pm
not what im asking for
i know the tag, but when it shows up, it lists all admins and alts under it
i want it like memberlist
where it shows 'details'  instead of list of alts under main
Title: Re: Memberlist with Mainchars only?
Post by: Kyr on June 27, 2010, 06:29:18 am
the answer to your question is "No"
Title: Re: Memberlist with Mainchars only?
Post by: draveyn on July 01, 2010, 11:23:14 pm
lol ok ty
SimplePortal 2.3.7 © 2008-2025, SimplePortal