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: Whois.php update problem  (Read 3885 times)

0 Members and 1 Guest are viewing this topic.

Offline Faelwen

  • BeBot User
  • **
  • Posts: 35
  • Karma: +0/-0
Whois.php update problem
« on: April 30, 2009, 04:40:32 pm »
Fatal error: Cannot access private propert Bot::$buddy_status in C:\Users\Steven\and so on\Bebot-hyborian\core\Whois.php on line 124.

Quote
/*
   This gets called if a buddy logs on/off
   */
   function buddy($name, $online, $level, $location, $class)
   {
      $user = $this -> bot -> core("chat") -> get_uid($name);

      $who = array();
      $who["id"] = $user;
      $who["nickname"] = $name;
      if(!array_key_exists($name, $this -> bot -> buddy_status))
         $who["online"] = 0;
      else
      {
         if(4 == ($this -> bot -> buddy_status[$name] & 4))
            $who["online"] = 3;
         else if(2 == ($this -> bot -> buddy_status[$name] & 2))
            $who["online"] = 2;
         else if(1 == ($this -> bot -> buddy_status[$name] & 1))
            $who["online"] = 1;
         else
            $who["online"] = 0;
      }

      $who["level"] = $level;
      $who["location"] = $location;
      $class_name = $this -> class_name[$class];
      if ($class_name == "")
      {
         $class_name = "Commoner";
      }
      $who["class"] = $class_name;
      $lookup = $this -> bot -> db -> select("SELECT * FROM #___craftingclass WHERE name = '" . $name . "'", MYSQL_ASSOC);
      if (!empty($lookup))
      {
         $who["craft1"] = $lookup[0]['class1'];
         $who["craft2"] = $lookup[0]['class2'];
      }
      $this -> update($who);
   }

I simply can't fix this :S, anyone else can spot the problem here?
« Last Edit: April 30, 2009, 05:07:40 pm by Faelwen »

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Whois.php update problem
« Reply #1 on: May 01, 2009, 10:36:32 am »
I just checked the current Bot.php versions, and $buddy_status is ALWAYS public.

To check this for yourself look into Bot.php, and search for the first occurence of buddy_status.

The line should be
Code: [Select]
public $buddy_status = array();
If it is something with private change that to public.

Offline Faelwen

  • BeBot User
  • **
  • Posts: 35
  • Karma: +0/-0
Re: Whois.php update problem
« Reply #2 on: May 02, 2009, 02:37:28 am »
fixed from private to public,

But another problem came up

Quote
Tfwbot [CORE]   [ERROR] Module 'access_control' does not exist or is not loaded.

Tfwbot [ERROR]  [access_control]        Undefined function create(all, maintenan
ce, OWNER)!

Quote
/*
  The Class itself...
*/
class AccessControl_Core extends BasePassiveModule
{
   private $access_cache;
   private $access_levels;
   private $deny_levels;
   private $security_levels;
   private $channels;
   private $startup;

Quote
$this -> bot -> core("settings") -> create("AccessControl", "DefaultLevel", "MEMBER", "Which is the minimal access level that should get access to new commands on default? Or should the default for new commands be to disabled access to them at all?", "ANONYMOUS;GUEST;MEMBER;LEADER;ADMIN;SUPERADMIN;OWNER;ENABLED");
      $this -> bot -> core("settings") -> create("AccessControl", "LockGc", FALSE, "Are all commands in the guild chat locked from use?", "On;Off", TRUE);
      $this -> bot -> core("settings") -> create("AccessControl", "LockPgroup", FALSE, "Are all commands in the private chatgroup locked from use?", "On;Off", TRUE);

What is the problem exactly in here?

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Whois.php update problem
« Reply #3 on: May 02, 2009, 12:40:16 pm »
Is that with bebot 0.6.2? Because it's the first time I've heard of that problem.

Offline Faelwen

  • BeBot User
  • **
  • Posts: 35
  • Karma: +0/-0
Re: Whois.php update problem
« Reply #4 on: May 02, 2009, 01:03:06 pm »
Yes it's with the newest version.

Offline Faelwen

  • BeBot User
  • **
  • Posts: 35
  • Karma: +0/-0
Re: Whois.php update problem
« Reply #5 on: May 03, 2009, 11:03:53 pm »
Someone working on this?

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Whois.php update problem
« Reply #6 on: May 05, 2009, 10:11:27 am »
Which PHP version are you using? And could you try using a clean install of BeBot from https://launchpad.net/bebot/+download just to be sure?
BeBot Founder and Fixer Kingpin

Offline Faelwen

  • BeBot User
  • **
  • Posts: 35
  • Karma: +0/-0
Re: Whois.php update problem
« Reply #7 on: May 05, 2009, 01:15:59 pm »
Will try once again then.

Using all the latest updates from MySQL + PHP 5.2.9.

Everything else works except the Access_controll (Will post the errors when i'm home).

Thanks for your work, stay tuned for more errors from

// Failwen! :)

Offline Faelwen

  • BeBot User
  • **
  • Posts: 35
  • Karma: +0/-0
Re: Whois.php update problem
« Reply #8 on: May 05, 2009, 04:39:48 pm »
Fixed all the problems, i did exactly what the Readme.txt said and a little more since i had to fill in bot.conf and mysql.conf once again in the cmd.


Thanks for all the help. Will porbably post more in this forum later on.

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Whois.php update problem
« Reply #9 on: May 06, 2009, 03:00:46 pm »
Happy to hear you got it working :)
BeBot Founder and Fixer Kingpin

 

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