BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Anarchy Online Archive => AO 0.6 support => Topic started by: Faelwen on April 30, 2009, 04:40:32 pm

Title: Whois.php update problem
Post by: Faelwen 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?
Title: Re: Whois.php update problem
Post by: Alreadythere 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.
Title: Re: Whois.php update problem
Post by: Faelwen 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?
Title: Re: Whois.php update problem
Post by: Alreadythere 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.
Title: Re: Whois.php update problem
Post by: Faelwen on May 02, 2009, 01:03:06 pm
Yes it's with the newest version.
Title: Re: Whois.php update problem
Post by: Faelwen on May 03, 2009, 11:03:53 pm
Someone working on this?
Title: Re: Whois.php update problem
Post by: Khalem 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?
Title: Re: Whois.php update problem
Post by: Faelwen 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! :)
Title: Re: Whois.php update problem
Post by: Faelwen 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.
Title: Re: Whois.php update problem
Post by: Khalem on May 06, 2009, 03:00:46 pm
Happy to hear you got it working :)
SimplePortal 2.3.7 © 2008-2025, SimplePortal