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: modified alts  (Read 33865 times)

0 Members and 5 Guests are viewing this topic.

Offline Dabaron

  • BeBot Apprentice
  • ***
  • Posts: 163
  • Karma: +0/-0
Re: modified alts
« Reply #30 on: August 22, 2006, 07:40:26 am »
Code: [Select]
      if (!empty($alts))
        foreach ($alts as $alt)
        {
          $whoalt = $this -> bot -> db -> select("SELECT nickname, rank_name, lastseen FROM members WHERE nickname = '$alt'");
          if ($whoalt[0][2] == 0) $date = "Never";
          else $date = gmdate($this -> date_format, $whoalt[0][2]);
          if (empty($whoalt[0][0])) $rank = "None";
          else $rank = $whoalt[0][1];
          $result .= "• <font color=CCCCTextColor><a href='chatcmd:///tell <botname> <pre>whois $alt'>$alt</a></font>";
          $result .= " (".$rank.") <font color=#0099FF>Last Seen: $date</font>\n";
        }
      else
        return "No alts found.";
      return $this -> bot -> make_blob("View Alts", $result);

This one is line 239:
Code: [Select]
if ($whoalt[0][2] == 0) $date = "Never";

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: modified alts
« Reply #31 on: August 22, 2006, 11:20:21 am »
Hrm.
Try this, find:
Code: [Select]
          $whoalt = $this -> bot -> db -> select("SELECT nickname, rank_name, lastseen FROM members WHERE nickname = '$alt'");
          if ($whoalt[0][2] == 0) $date = "Never";
          else $date = gmdate($this -> date_format, $whoalt[0][2]);
          if (empty($whoalt[0][0])) $rank = "None";
          else $rank = $whoalt[0][1];

Replace with:
Code: [Select]
          $date = "Never";
          $rank = "None";
          $whoalt = $this -> bot -> db -> select("SELECT nickname, rank_name, lastseen FROM members WHERE nickname = '$alt'");
          if (!empty($whoalt))
          {
            if (!empty($whoalt[0][2]))
            {
              $date = gmdate($this -> date_format, $whoalt[0][2]);
            }
            if (!empty($whoalt[0][0]))
            {
               $rank = $whoalt[0][1];
            }
          }
BeBot Founder and Fixer Kingpin

Offline Dabaron

  • BeBot Apprentice
  • ***
  • Posts: 163
  • Karma: +0/-0
Re: modified alts
« Reply #32 on: August 30, 2006, 09:03:18 am »
Just realized I never posted an update.  With both changes that Khalem suggested this works perfectly.  Thank you very much!!

Offline Xenixa

  • Contributor
  • *******
  • Posts: 307
  • Karma: +0/-0
Re: modified alts
« Reply #33 on: September 03, 2006, 01:56:44 am »
I am now having a strange issue.  It works great on the first call of it, if I try and check someone else it crashes with this error:

Fatal error: Cannot use string offset as an array in C:\BeBot\Beerraid\core\Alts.php on line 233

Any ideas?

Edit: I'm using Xenixa's

I see Khalem helped you out already with this. BTW I had fixed this problem back in May. I forgot to update the copy on my ftp server that was placed there in March, sorry. I took a slightly different route than what Khalem did for fixing it however. But it works. :)

You can find my most current(fixed) version on my server BTW using the same link I have posted here earlier. If you care to compare that is.
<<< Hack's in Zend Studio

All my Custom Bebot files may be Found Here <-clicky

Offline neongen

  • BeBot User
  • **
  • Posts: 64
  • Karma: +0/-0
Re: modified alts
« Reply #34 on: September 20, 2006, 04:56:28 pm »
Xenixa isent there any way your alts list can be used on a raid bot?

oki i just played a little with it think i got close but it's not nice codeing  ::)

http://bebot.dyndns.dk
« Last Edit: September 20, 2006, 07:45:16 pm by neongen »

Offline neongen

  • BeBot User
  • **
  • Posts: 64
  • Karma: +0/-0
Re: modified alts
« Reply #35 on: September 21, 2006, 05:51:05 pm »
oki can someone help me out a little plz

i'm trying to put in a online in my alts


Code: [Select]
if (!empty($alts))
foreach ($alts as $alt)
{
if ($this -> bot -> aoc -> buddy_online($alt))
$online2 .= " is <font color=#00ff00>online</font>";
else
$online2 .= " is <font color=#ff0000>offline</font>";

$result .= "• <font color=CCCCTextColor><a href='chatcmd:///tell <botname> <pre>whois $alt'>$alt</a></font>";
$result .= "".$online2."\n";

}
else
return "No alts found.";

but with this code i get

toon is offline
toon is offline is online

how do i do so it don't post the is offline the hole way down the alt list?
« Last Edit: September 21, 2006, 07:19:43 pm by neongen »

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: modified alts
« Reply #36 on: September 21, 2006, 08:49:14 pm »
change
Code: [Select]
if ($this -> bot -> aoc -> buddy_online($alt))
$online2 .= " is <font color=#00ff00>online</font>";
else
$online2 .= " is <font color=#ff0000>offline</font>";
to
Code: [Select]
if ($this -> bot -> aoc -> buddy_online($alt))
$online2 = " is <font color=#00ff00>online</font>";
else
$online2 = " is <font color=#ff0000>offline</font>";

Only change is the switch from .= to =, as you aren't reinitializing $online2 you would produce endless strings otherwise.

Offline Dabaron

  • BeBot Apprentice
  • ***
  • Posts: 163
  • Karma: +0/-0
Re: modified alts
« Reply #37 on: September 21, 2006, 09:11:45 pm »
oki can someone help me out a little plz

i'm trying to put in a online in my alts


Code: [Select]
if (!empty($alts))
foreach ($alts as $alt)
{
if ($this -> bot -> aoc -> buddy_online($alt))
$online2 .= " is <font color=#00ff00>online</font>";
else
$online2 .= " is <font color=#ff0000>offline</font>";

$result .= "• <font color=CCCCTextColor><a href='chatcmd:///tell <botname> <pre>whois $alt'>$alt</a></font>";
$result .= "".$online2."\n";

}
else
return "No alts found.";

but with this code i get

toon is offline
toon is offline is online

how do i do so it don't post the is offline the hole way down the alt list?

Once you have this working can you post a copy of it here.  I wouldn't mind looking at your full code   ;)

Offline neongen

  • BeBot User
  • **
  • Posts: 64
  • Karma: +0/-0
Re: modified alts
« Reply #38 on: September 21, 2006, 11:46:11 pm »
oki just put in the modifications. thx Alreadythere it works now  ;D

they are on http://bebot.dyndns.dk here you can download the alts and whois with the modifications. but the pic is not the rigth on.

the is online is placed:

::: Zero "Neongen" Angel ::: is (offline|online)

and

• Neonenfo is (offline|online)

Offline neongen

  • BeBot User
  • **
  • Posts: 64
  • Karma: +0/-0
Re: modified alts
« Reply #39 on: September 26, 2006, 02:43:01 pm »
Just made a little update on my alts and whois.
here is a pic of it here

you need 3 files for it to work alts, whois and lastvisit

or you can download them as a zip here

but for it to work people have to join the bot for it to get the last visit!
« Last Edit: September 26, 2006, 02:54:48 pm by neongen »

Offline Dabaron

  • BeBot Apprentice
  • ***
  • Posts: 163
  • Karma: +0/-0
Re: modified alts
« Reply #40 on: September 26, 2006, 07:25:49 pm »
Not bad, I do like it.  Not using the whois cache though huh

Offline neongen

  • BeBot User
  • **
  • Posts: 64
  • Karma: +0/-0
Re: modified alts
« Reply #41 on: September 27, 2006, 11:40:13 am »
uups  ;D

you don't need the whois for it to work. i only use it because it have alts and postit on the whois

Offline jjones666

  • Contributor
  • *******
  • Posts: 353
  • Karma: +0/-0
Re: modified alts
« Reply #42 on: September 27, 2006, 08:37:05 pm »
- updates (guildbot specific):

http://www.jjones.co.uk/files/whois2.php (rename to whois.php)
http://www.jjones.co.uk/files/logon_guild.php
http://www.jjones.co.uk/files/alts.php

- added Xenixa style !alts to guild logon display and !whois
- updated alts info to be more specific to guild bot (obviously alts outside org won't have last seen time)
- added online/offline status to alts info
- alts.php includes Khalem's fixes in the last few pages

- required: Alreadythere's Whoiscache (http://bebot.link/index.php/topic,223.0.html)
- required: Blacklist module (original or http://bebot.link/index.php/topic,496.0.html)
- required: Xenixa's Rooster_Guild module with integrated last seen (http://bebot.link/index.php/topic,288.0.html)

- notes: !whois built on version here (http://bebot.link/index.php/topic,314.0.html) includes fixes for blacklist and Glara's !postit features.
« Last Edit: September 28, 2006, 02:35:56 pm by jjones666 »

Offline Dabaron

  • BeBot Apprentice
  • ***
  • Posts: 163
  • Karma: +0/-0
Re: modified alts
« Reply #43 on: September 28, 2006, 08:52:36 am »
Love the updates.  Very very nice additions!!

Offline jjones666

  • Contributor
  • *******
  • Posts: 353
  • Karma: +0/-0
Re: modified alts
« Reply #44 on: September 28, 2006, 09:02:43 am »
- small cosmetic fix to alts.php (added main to the clicky).

(above link applies).

-jj-

 

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