L* R*
HOME FORUM DOWNLOADS
Content
  Links
     Browse SVN
     SVN Commit log
     Documentation (Wiki)
  Developers
     Taskmanager
User
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 22, 2008, 01:26:07 PM

Login with username, password and session length
Search



Advanced search
Support GoPHP5.org
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Modules > Modules for older versions > 0.2.x Custom/Unofficial Modules > Topic: modified alts
Pages: 1 2 [3] 4 5 6   Go Down
« previous next »
Print
Author Topic: modified alts  (Read 6730 times)
0 Members and 1 Guest are viewing this topic.
Dabaron
Apprentice
***
Offline Offline

Gender: Male
Posts: 145


Re: modified alts
« Reply #30 on: August 22, 2006, 12:40:26 AM »

Code:
      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 .= "&#8226; <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:
if ($whoalt[0][2] == 0) $date = "Never";
Logged
Khalem
BeBot Founder
Administrator
Grandmaster
********
Offline Offline

Gender: Male
Posts: 670



WWW
Re: modified alts
« Reply #31 on: August 22, 2006, 04:20:21 AM »

Hrm.
Try this, find:
Code:
          $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:
          $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];
            }
          }
Logged

BeBot Founder and Fixer Kingpin
Madman coder and destroyer of good code
Dabaron
Apprentice
***
Offline Offline

Gender: Male
Posts: 145


Re: modified alts
« Reply #32 on: August 30, 2006, 02:03:18 AM »

Just realized I never posted an update.  With both changes that Khalem suggested this works perfectly.  Thank you very much!!
Logged
Xenixa
BeBot Contributor
Expert
*******
Offline Offline

Posts: 307



Re: modified alts
« Reply #33 on: September 02, 2006, 06:56:44 PM »

Quote from: Dabaron on August 17, 2006, 08:24:56 PM
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. Smiley

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.
Logged

<<< Hack's in Zend Studio

All my Custom Bebot files may be Found Here <-clicky
neongen
Rookie
**
Offline Offline

Posts: 64


Re: modified alts
« Reply #34 on: September 20, 2006, 09:56:28 AM »

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  Roll Eyes

http://bebot.dyndns.dk
« Last Edit: September 20, 2006, 12:45:16 PM by neongen » Logged
neongen
Rookie
**
Offline Offline

Posts: 64


Re: modified alts
« Reply #35 on: September 21, 2006, 10:51:05 AM »

oki can someone help me out a little plz

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


Code:
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 .= "&#8226; <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, 12:19:43 PM by neongen » Logged
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1077


Re: modified alts
« Reply #36 on: September 21, 2006, 01:49:14 PM »

change
Code:
if ($this -> bot -> aoc -> buddy_online($alt))
$online2 .= " is <font color=#00ff00>online</font>";
else
$online2 .= " is <font color=#ff0000>offline</font>";
to
Code:
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.
Logged
Dabaron
Apprentice
***
Offline Offline

Gender: Male
Posts: 145


Re: modified alts
« Reply #37 on: September 21, 2006, 02:11:45 PM »

Quote from: neongen on September 21, 2006, 10:51:05 AM
oki can someone help me out a little plz

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


Code:
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 .= "&#8226; <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   Wink
Logged
neongen
Rookie
**
Offline Offline

Posts: 64


Re: modified alts
« Reply #38 on: September 21, 2006, 04:46:11 PM »

oki just put in the modifications. thx Alreadythere it works now  Grin

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)
Logged
neongen
Rookie
**
Offline Offline

Posts: 64


Re: modified alts
« Reply #39 on: September 26, 2006, 07:43:01 AM »

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, 07:54:48 AM by neongen » Logged
Dabaron
Apprentice
***
Offline Offline

Gender: Male
Posts: 145


Re: modified alts
« Reply #40 on: September 26, 2006, 12:25:49 PM »

Not bad, I do like it.  Not using the whois cache though huh
Logged
neongen
Rookie
**
Offline Offline

Posts: 64


Re: modified alts
« Reply #41 on: September 27, 2006, 04:40:13 AM »

uups  Grin

you don't need the whois for it to work. i only use it because it have alts and postit on the whois
Logged
jjones666
BeBot Contributor
Champion
*******
Offline Offline

Posts: 353


Re: modified alts
« Reply #42 on: September 27, 2006, 01: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.shadow-realm.org/index.php/topic,223.0.html)
- required: Blacklist module (original or http://bebot.shadow-realm.org/index.php/topic,496.0.html)
- required: Xenixa's Rooster_Guild module with integrated last seen (http://bebot.shadow-realm.org/index.php/topic,288.0.html)

- notes: !whois built on version here (http://bebot.shadow-realm.org/index.php/topic,314.0.html) includes fixes for blacklist and Glara's !postit features.
« Last Edit: September 28, 2006, 07:35:56 AM by jjones666 » Logged
Dabaron
Apprentice
***
Offline Offline

Gender: Male
Posts: 145


Re: modified alts
« Reply #43 on: September 28, 2006, 01:52:36 AM »

Love the updates.  Very very nice additions!!
Logged
jjones666
BeBot Contributor
Champion
*******
Offline Offline

Posts: 353


Re: modified alts
« Reply #44 on: September 28, 2006, 02:02:43 AM »

- small cosmetic fix to alts.php (added main to the clicky).

(above link applies).

-jj-
Logged
Pages: 1 2 [3] 4 5 6   Go Up
Print
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Modules > Modules for older versions > 0.2.x Custom/Unofficial Modules > Topic: modified alts
« previous next »
 
Jump to:  

Recent
Change text in remember "...
by gerborg
[November 21, 2008, 05:14:57 PM]

Log playtime from buddys ...
by Temar
[November 20, 2008, 10:33:57 AM]

Vote Core module and Simp...
by Temar
[November 19, 2008, 09:26:52 AM]

Restrict access for one m...
by Organizer
[November 19, 2008, 03:21:19 AM]

Custom / Revised Modules ...
by Elesar1
[November 17, 2008, 03:51:46 PM]

TWC
by Temar
[November 16, 2008, 11:39:12 AM]

Are there any FUN modules...
by Elesar1
[November 15, 2008, 07:39:15 PM]

Call to a member function...
by exxie
[November 15, 2008, 09:29:31 AM]

Ported Modules
by Alreadythere
[November 14, 2008, 06:10:07 PM]

cURL and other non-defaul...
by Temar
[November 14, 2008, 04:11:44 PM]
Stats
Members
Total Members: 1235
Latest: DDDepressionnn
Stats
Total Posts: 11037
Total Topics: 1496
Online Today: 18
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 0
Guests: 20
Total: 20

Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
TinyPortal v0.9.8 © Bloc | NewDef design by Bloc
Page created in 0.486 seconds with 29 queries. (Pretty URLs adds 0.04s, 4q)
Loading...