|
Dabaron
|
 |
« Reply #30 on: August 22, 2006, 12:40:26 AM » |
|
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: if ($whoalt[0][2] == 0) $date = "Never";
|
|
|
|
|
Logged
|
|
|
|
|
Khalem
|
 |
« Reply #31 on: August 22, 2006, 04:20:21 AM » |
|
Hrm. Try this, find: $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: $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
|
 |
« 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
|
 |
« Reply #33 on: September 02, 2006, 06:56:44 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.  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 StudioAll my Custom Bebot files may be Found Here <-clicky
|
|
|
|
neongen
|
 |
« 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 http://bebot.dyndns.dk
|
|
|
|
« Last Edit: September 20, 2006, 12:45:16 PM by neongen »
|
Logged
|
|
|
|
|
neongen
|
 |
« 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 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, 12:19:43 PM by neongen »
|
Logged
|
|
|
|
|
Alreadythere
|
 |
« Reply #36 on: September 21, 2006, 01:49:14 PM » |
|
change if ($this -> bot -> aoc -> buddy_online($alt)) $online2 .= " is <font color=#00ff00>online</font>"; else $online2 .= " is <font color=#ff0000>offline</font>"; to 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
|
 |
« Reply #37 on: September 21, 2006, 02:11:45 PM » |
|
oki can someone help me out a little plz i'm trying to put in a online in my alts 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 
|
|
|
|
|
Logged
|
|
|
|
|
neongen
|
 |
« Reply #38 on: September 21, 2006, 04:46:11 PM » |
|
oki just put in the modifications. thx Alreadythere it works now  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
|
 |
« 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 hereyou need 3 files for it to work alts, whois and lastvisitor you can download them as a zip herebut 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
|
 |
« 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
|
 |
« Reply #41 on: September 27, 2006, 04:40:13 AM » |
|
uups  you don't need the whois for it to work. i only use it because it have alts and postit on the whois
|
|
|
|
|
Logged
|
|
|
|
|
|
|
Dabaron
|
 |
« Reply #43 on: September 28, 2006, 01:52:36 AM » |
|
Love the updates. Very very nice additions!!
|
|
|
|
|
Logged
|
|
|
|
|
jjones666
|
 |
« 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
|
|
|
|
|