collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18365
  • stats Total Topics: 2500
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: Memberlist with Mainchars only?  (Read 4833 times)

0 Members and 1 Guest are viewing this topic.

Offline Lucalus

  • BeBot Rookie
  • *
  • Posts: 5
  • Karma: +0/-0
Memberlist with Mainchars only?
« 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

Offline Yite

  • BeBot Apprentice
  • ***
  • Posts: 152
  • Karma: +0/-0
    • Niflheim - Crom
Re: Memberlist with Mainchars only?
« Reply #1 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;
        }
-Yite [Crom]

Offline draveyn

  • BeBot Rookie
  • *
  • Posts: 16
  • Karma: +0/-0
Re: Memberlist with Mainchars only?
« Reply #2 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

Offline Kyr

  • BeBot Apprentice
  • ***
  • Posts: 177
  • Karma: +0/-0
Re: Memberlist with Mainchars only?
« Reply #3 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

Offline draveyn

  • BeBot Rookie
  • *
  • Posts: 16
  • Karma: +0/-0
Re: Memberlist with Mainchars only?
« Reply #4 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

Offline Kyr

  • BeBot Apprentice
  • ***
  • Posts: 177
  • Karma: +0/-0
Re: Memberlist with Mainchars only?
« Reply #5 on: June 27, 2010, 06:29:18 am »
the answer to your question is "No"

Offline draveyn

  • BeBot Rookie
  • *
  • Posts: 16
  • Karma: +0/-0
Re: Memberlist with Mainchars only?
« Reply #6 on: July 01, 2010, 11:23:14 pm »
lol ok ty

 

* Recent Posts
0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]


Bebot and Rasberry by bitnykk
[November 29, 2023, 11:04:14 pm ]

* Who's Online
  • Dot Guests: 392
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal