BeBot - An Anarchy Online and Age Of Conan chat automaton
Development => Module Requests => Topic started by: lulifuz on December 02, 2006, 08:21:33 pm
-
Hi there,
one of our org mates asked if it would be possible to improve the !is command in such a way, that if you do !is Buddy you do not get Buddy is offline. but Buddy is offline, but his Alt Buddyalt is online.
I said: Shure, but not by me, I have to ask the pros ;)
So, what do you think?
Regards,
lulifuz
-
I was considering adding that idea to the !alts list.
But I suppose it would be worth while to add to !is if they are on the bot too.
-
The alts got a facelift recently incorporating online status for all alts listed, including extra information for alts. The end of this topic has the modified files for that:
http://bebot.link/index.php/topic,204.45.html
It would be good to incorporate an alts check on !is as well though I guess.
-
Here you go, !is with alts/main checking and multiple names.
-
Hi Malosar,
great thing works fine so far. Thanks a lot.
But there is one case where there is no output.
If there is a buddy who has alts an he and also none of his alts are online there is no response.
I think this is because of the 'or not empty main and alts' which leaves $msg empty if there is a main or alts but none of them online.
I changed this part (dont know how to mark a line in code):
elseif ( (!empty($main)) || (!empty($alts)) )
{
if ($this -> bot -> aoc -> buddy_online($main))
$msg .= $name . " isn't <font color=#00ff00>online</font> but
his/her main ".$main." is!\n";
foreach ($alts as $alt)
{
if ($this -> bot -> aoc -> buddy_online($alt))
$msg .= $name." isn't but his/her alt ".$alt." is <font
color=#00ff00>online</font>\n";
}
if ($msg == "") $msg = $name . " and his/her alts are <font color=#ff0000>offline</font>";
}
else
$msg = $name . " is <font color=#ff0000>offline</font>";
I inserted this line:
if ($msg == "") $msg = $name . " and his/her alts are <font color=#ff0000>offline</font>";
May not be elegant but works.
Regards,
lulifuz
-
Ah yes didn't account for that, thanks for picking that up. Modified file in my post with update.