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

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

Author Topic: !is with alts  (Read 5399 times)

0 Members and 1 Guest are viewing this topic.

Offline lulifuz

  • BeBot User
  • **
  • Posts: 40
  • Karma: +0/-0
!is with alts
« 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

Offline Naturalistic

  • Contributor
  • *******
  • Posts: 221
  • Karma: +0/-0
Re: !is with alts
« Reply #1 on: December 02, 2006, 10:52:10 pm »
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.
220/25 Eternalist Doctor
-----------------------------
Campalot Coding Co-ordinator and Super Admin
http://www.campalot.info/index.php

Offline Malosar

  • BeBot Expert
  • ****
  • Posts: 259
  • Karma: +0/-0
    • http://www.lowerdimension.com
Re: !is with alts
« Reply #2 on: December 04, 2006, 06:46:56 pm »
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.
Eternalist
General of The Syndicate

Offline Malosar

  • BeBot Expert
  • ****
  • Posts: 259
  • Karma: +0/-0
    • http://www.lowerdimension.com
Re: !is with alts
« Reply #3 on: December 05, 2006, 04:10:41 pm »
Here you go, !is with alts/main checking and multiple names.
« Last Edit: December 05, 2006, 09:20:00 pm by Malosar »
Eternalist
General of The Syndicate

Offline lulifuz

  • BeBot User
  • **
  • Posts: 40
  • Karma: +0/-0
Re: !is with alts
« Reply #4 on: December 05, 2006, 08:44:40 pm »
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):
Code: [Select]
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

Offline Malosar

  • BeBot Expert
  • ****
  • Posts: 259
  • Karma: +0/-0
    • http://www.lowerdimension.com
Re: !is with alts
« Reply #5 on: December 05, 2006, 09:21:05 pm »
Ah yes didn't account for that, thanks for picking that up. Modified file in my post with update.
Eternalist
General of The Syndicate

 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


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 ]

* Who's Online
  • Dot Guests: 270
  • 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