BeBot - An Anarchy Online and Age Of Conan chat automaton
Archive => Anarchy Online Archive => 0.2.x Custom/Unofficial Modules => Topic started by: Naturalistic 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.
-
- Add users to a raid currently in progress even when it's locked.
Wouldn't that kinda beat the purpose of the lock command?
- 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.
- 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 :)
-
- 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.
-
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. ;)
-
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 :)
-
Ah, that's done actually, just totally forgot to post.
Didn't even remember I made this thread... :-X
-
cool, does it have a function to show if they are online or not?
-
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).
<?
/*
* 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;
}
}
?>
-
have 2 coments on code
1. blobs not work
2 Bot go in circle [ 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)
-
the page-spam: http://bebot.link/index.php/topic,38.0.html
-
stil have same replay
-
Use this (http://bebot.link/index.php/topic,234.0.html) fix instead.
-
ty for the help :D now work korekt
humm will be perfect if can add funltion for online status
-
anny quick fixes to get this to work on v0.2.11?