X-Git-Url: http://git.pk910.de/?p=PHP-P10.git;a=blobdiff_plain;f=Uplink%2FP10_User.class.php;h=7a6bd0eb8bb4f2c98f0340b87e6c6c6edfaca4ad;hp=8d4e5a35ffa2381679cecb64d0a8f8f8e87f4060;hb=0f30e96ae37491aee19e72b89cc54a6798d1f254;hpb=5c6c3365d28144516f0ade183189b256d8de03bc diff --git a/Uplink/P10_User.class.php b/Uplink/P10_User.class.php index 8d4e5a3..7a6bd0e 100644 --- a/Uplink/P10_User.class.php +++ b/Uplink/P10_User.class.php @@ -1,22 +1,19 @@ . * * * ************************************************************************ * @@ -24,15 +21,6 @@ * * This class represents a IRC User * - ************************************************************************ - * accessable methods: - * - * static P10_User getUserByNum(String $numeric) - * searches and returns the User with the provided Numeric - * - * __construct(String $nick, String $numeric, P10_Server $server, int $connect_time, String $ident, String $realname, P10_ModeSet $modes) - * *** nothing to say here *** - * */ class P10_User { @@ -69,7 +57,7 @@ class P10_User { private $connect_time; private $modes; private $realname; - private $channels; + private $channels = array(); private $away = null; public function __construct($nick, $numeric, $server, $connect_time, $ident, $host, $ip, $realname, $modes) { @@ -144,6 +132,7 @@ class P10_User { public function quit($reason) { $this->server->delUser($this); + unset(self::$static_users[$this->numeric]); foreach($this->channels as $channel) { $channel->quitUser($this); } @@ -165,6 +154,10 @@ class P10_User { return $this->channels; } + public function getChannelCount() { + return count($this->channels); + } + public function isOnChannel($channel) { return array_key_exists(strtolower($channel->getName()),$this->channels); }