Whois.php

From Bebot Wiki 2
Jump to navigationJump to search
= Working with the Whois Core module =[edit]
Introduction[edit]

The Whois module aims to provide a common interface and structure for dealing with character information from FunCom. To do this, it provides functions for looking up whois data as well as providing a cache of data to reduce load on FunCom's servers as well as fail gracefully when FunCom's servers are unresponsive.

Settings Functions[edit]

Calling[edit]

$this -> bot -> whois -> function();

lookup()[edit]

array lookup(string $name, bool $noupdate=false) This function is used to lookup whois data.

lookup function parameters:

 * $name: Player to lookup.
 * $noupdate: Do not update the whois cache. 

Return value: Array containing the following elements:

   [error] => 
   [errordesc] => 
   [id] => Player ID Number
   [nickname] => Character Name
   [firstname] => Character First Name
   [lastname] => Character Last Name
   [level] => Level
   [gender] => gender
   [breed] => Breed
   [profession] => Profession
   [faction] => Omni|Clan|Neutral
   [rank] => Org Rank Name
   [rank_id] => Org Rank ID
   [org] => Org Name
   [org_id] => Org ID
   [at] => Alien Rank Name
   [at_id] => Alien Level
   [pictureurl] => URL to mugshot (example: 40650.jpg)

update()[edit]

bool function update(array $who) This functions is used to update whois information. $who should be a whois array. This function is used by the roster modules and whois module to update player information in the database cache. It generally should not be used in other modules.