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: New Modules  (Read 12537 times)

0 Members and 1 Guest are viewing this topic.

Offline Naturalistic

  • Contributor
  • *******
  • Posts: 221
  • Karma: +0/-0
New Modules
« on: September 26, 2005, 09:35:14 am »
Decided to work on a few modules myself. Kill some time.

A bit early, just posting what I'm working on.

Currently on:
- Add users to a raid currently in progress even when it's locked.
- Adding a !memberslist to display current members of the bot
- Adding minor fix to !online, to display bot admins.

Will post links to the code once I fully have them done and 100% bug free =)

Stay tuned for now.
220/25 Eternalist Doctor
-----------------------------
Campalot Coding Co-ordinator and Super Admin
http://www.campalot.info/index.php

Offline Zacix

  • Contributor
  • *******
  • Posts: 73
  • Karma: +0/-0
Re: New Modules
« Reply #1 on: September 26, 2005, 03:06:12 pm »
Quote from: "Naturalistic"

- Add users to a raid currently in progress even when it's locked.


Wouldn't that kinda beat the purpose of the lock command?

Quote from: "Naturalistic"

- Adding a !memberslist to display current members of the bot


Be aware that if you have a open bot, this memberslist will grow huge over time.

Quote from: "Naturalistic"

- Adding minor fix to !online, to display bot admins.


If you just want to display the admins, try /tell <yourbot> !admin group. Should be easy to just alter the file admin.php if you want to display who's online, offline and online and in bot.

Welcome to the bebot coding community :)
Zacix
Current projects:
RINGBot, BeBot branch
Neutnet, RK2 Neutral massmessage network

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: New Modules
« Reply #2 on: September 27, 2005, 09:03:41 am »
Quote from: "Zacix"
Quote from: "Naturalistic"

- Add users to a raid currently in progress even when it's locked.


Wouldn't that kinda beat the purpose of the lock command?


This is a good change actually.

It will allow raid admins to readd a person to the raid without having to unlock the raid, have the person join, relock the raid, and then deal with the morons who joined in addition.
BeBot Founder and Fixer Kingpin

Offline Naturalistic

  • Contributor
  • *******
  • Posts: 221
  • Karma: +0/-0
New Modules
« Reply #3 on: September 28, 2005, 08:17:00 am »
Never said they were uber-awesome updates. Just some extra options.

And the adding users to a raid... Khalem said exactly why I'm adding it :)

!memberlist will only be done by admins/raid leaders for the purpose of cutting down lag.

But I appreciate your ideas, Zacix. :)

Anything else that could require more attention, I'd be happy to look at first. ;)
220/25 Eternalist Doctor
-----------------------------
Campalot Coding Co-ordinator and Super Admin
http://www.campalot.info/index.php

Offline ZubZero

  • BeBot Rookie
  • *
  • Posts: 10
  • Karma: +0/-0
Re: New Modules
« Reply #4 on: January 18, 2006, 12:32:07 am »
When will the memberslist module be done?

I also hope that you can filter the !memberslist like you do with !online (ex. !online doc)

Looking forward to this module :)

Offline Naturalistic

  • Contributor
  • *******
  • Posts: 221
  • Karma: +0/-0
Re: New Modules
« Reply #5 on: January 19, 2006, 12:19:44 am »
Ah, that's done actually, just totally forgot to post.

Didn't even remember I made this thread... :-X
220/25 Eternalist Doctor
-----------------------------
Campalot Coding Co-ordinator and Super Admin
http://www.campalot.info/index.php

Offline ZubZero

  • BeBot Rookie
  • *
  • Posts: 10
  • Karma: +0/-0
Re: New Modules
« Reply #6 on: January 19, 2006, 01:16:58 am »
cool, does it have a function to show if they are online or not?

Offline Wolfbiter

  • Contributor
  • *******
  • Posts: 149
  • Karma: +0/-0
    • KAZE
Re: New Modules
« Reply #7 on: January 19, 2006, 12:06:14 pm »
I have a memberlist done, but no filters and not really formated (left such borign crap to natu). It's also raidbot-oriented... but should be easy to modify to suit your needs (I have no futher plan of developing it).

Code: [Select]
<?
  /*
   * Something written by Wolfbiter
   */
   
  $ml = new memberList($bot);

  $commands["tell"]["memberlist"] = &$ml;

  class memberList {
    var $bot;
    var $online;
    function memberList (&$bot) {$this->bot = &$bot;}
    function tell($name, $msg) {
        $admin = $this->bot->admin->in_group($name, "admin");
        $leader = $this->bot->admin->in_group($name, "raidleader");
        if ($admin || $leader) {$this -> bot -> send_tell($name, $this -> list_members($name,$msg));}
    }
    function list_members($name,$msg) {
        unset($admins,$leaders,$members);
        $text = explode(" ",$msg);
        if ($text[1] == "org" || $text[1] == "guild") {$sql="select nickname,profession,level,guild from members order by 'guild','nickname','profession','level' asc";}
        elseif ($text[1] == "prof" || $text[1] == "profession") { $sql="select nickname,profession,level,guild from members order by 'profession','nickname','level','guild' asc";}
        elseif ($text[1] == "level") {$sql="select nickname,profession,level,guild from members order by 'level','profession','nickname','guild' ASC";}
        else {$sql="select nickname,profession,level,guild from members order by 'nickname','profession','level','guild' asc";}
        $rawlist = $this->bot->db->select($sql);
        $memberstot = count($rawlist);
        foreach ($rawlist as $member) {
            $name = $member[0];
            $namelist[$name]['level'] = $member[2];
            $namelist[$name]['org'] = $member[3];
            $namelist[$name]['prof'] = $member[1];
            $admin = $this->bot->admin->in_group($name, "admin");
            $leader = $this->bot->admin->in_group($name, "raidleader");
            if ($admin) {$admins[] = $name;}
            elseif ($leader) {$leaders[] = $name;}
            else {$members[] = $name;}
        }
$output= "<font color=#FFFF66>Order by [ <a href='chatcmd:///tell <botname> !memberlist'>Name</a> ] [ <a href='chatcmd:///tell <botname> !memberlist level'>Level</a> ] [ <a href='chatcmd:///tell <botname> !memberlist prof'>Profession</a> ] [ <a href='chatcmd:///tell <botname> !memberlist org'>Org</a> ]<br><br>";
    if (count($admins) > 0) {
        $output.='<font color=#99CCCC>[<u>Admins</u>]';
    foreach($admins as $cur) {$output.='<br><font color=#FFFFFF> '.$cur." - <font color=#009900>".$namelist[$cur]['level']." <font color=#CC0000>".$namelist[$cur]['prof']."<font color=#66CCCC> (".$namelist[$cur]['org'].")";}
}
if (count($leaders) > 0) {
        $output.='<br><br><font color=#99CCCC>[<u>Leaders</u>]';
    foreach($leaders as $cur) {$output.='<br><font color=#FFFFFF> '.$cur." - <font color=#009900>".$namelist[$cur]['level']." <font color=#CC0000>".$namelist[$cur]['prof']."<font color=#66CCCC> (".$namelist[$cur]['org'].")";}
}
if (count($members) > 0) {
        $output.='<br><br><font color=#99CCCC>[<u>Members</u>]';
    foreach($members as $cur) {$output.='<br><font color=#FFFFFF> '.$cur." - <font color=#009900>".$namelist[$cur]['level']." <font color=#CC0000>".$namelist[$cur]['prof']."<font color=#66CCCC> (".$namelist[$cur]['org'].")";}
}
$return = $this->bot->make_blob($memberstot." Members",$output);
return $return;
    }
  }
?>
Too many toons.

Offline stonybg

  • BeBot User
  • **
  • Posts: 23
  • Karma: +0/-0
Re: New Modules
« Reply #8 on: February 19, 2006, 12:02:18 am »
have 2 coments on code

1. blobs not work
2 Bot go in circle
Quote
[ bot]: 250 Members (page 2 of 2) (page 2 of 3) (page 2 of 3) (page 2 of 3) (page 2 of 3) (page 2 of 3) (page 2 of 3) (page 1 of 3)
[bot]: 250 Members (page 2 of 2) (page 2 of 3) (page 2 of 3) (page 2 of 3) (page 2 of 3) (page 2 of 3) (page 2 of 3) (page 2 of 3) (page 1 of 3)
[bot]: 250 Members (page 2 of 2) (page 2 of 3) (page 2 of 3) (page 2 of 3) (page 2 of 3) (page 2 of 3) (page 2 of 3) (page 2 of 3) (page 2 of 3) (page 1 of 3)
[bot]: 250 Members (page 2 of 2) (page 2 of 3) (page 2 of 3) (page 2 of 3) (page 2 of 3) (page 2 of 3) (page 2 of 3) (page 2 of 3) (page 2 of 3) (page 2 of 3) (page 1 of 3)

MatHack

  • Guest
Re: New Modules
« Reply #9 on: February 19, 2006, 12:31:30 am »

Offline stonybg

  • BeBot User
  • **
  • Posts: 23
  • Karma: +0/-0
Re: New Modules
« Reply #10 on: February 19, 2006, 01:07:45 am »
stil have same replay

Offline Wolfbiter

  • Contributor
  • *******
  • Posts: 149
  • Karma: +0/-0
    • KAZE
Re: New Modules
« Reply #11 on: February 19, 2006, 07:12:54 am »
Use this fix instead.
Too many toons.

Offline stonybg

  • BeBot User
  • **
  • Posts: 23
  • Karma: +0/-0
Re: New Modules
« Reply #12 on: February 19, 2006, 12:37:56 pm »
ty for the help :D now work korekt
humm will be perfect if can add funltion for online status

Offline Heffalomp

  • BeBot Apprentice
  • ***
  • Posts: 80
  • Karma: +0/-0
Re: New Modules
« Reply #13 on: July 15, 2007, 02:01:07 pm »
anny quick fixes to get this to work on v0.2.11?
"Ubuntu" is an ancient African word, meaning "I can't configure Slackware"

 

* 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: 347
  • 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