return NULL;
}
+ public static function getAllUsers() {
+ return self::$static_users;
+ }
+
private $numeric;
+ private $server;
private $nick;
private $ident;
private $host;
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) {
$this->nick = $nick;
return $this->numeric;
}
+ public function getServer() {
+ return $this->server;
+ }
+
public function setNick($nick) {
$this->nick = $nick;
}
return $this->realname;
}
+ public function setAway($away) {
+ $this->away = $away;
+ }
+
+ public function getAway() {
+ return $this->away;
+ }
+
+ public function isAway() {
+ return ($this->away != null);
+ }
+
public function quit($reason) {
$this->server->delUser($this);
+ unset(self::$static_users[$this->numeric]);
foreach($this->channels as $channel) {
$channel->quitUser($this);
}
trigger_error("Tried to remove a Channel, that does NOT exist.", E_USER_WARNING);
}
}
+
+ public function getChannels() {
+ return $this->channels;
+ }
+
+ public function getChannelCount() {
+ return count($this->channels);
+ }
+
+ public function isOnChannel($channel) {
+ return array_key_exists(strtolower($channel->getName()),$this->channels);
+ }
}
?>
\ No newline at end of file