+ unset(self::$static_users[$this->numeric]);
+ foreach($this->channels as $channel) {
+ $channel->quitUser($this);
+ }
+ }
+
+ public function addChannel($channel) {
+ $this->channels[strtolower($channel->getName())] = $channel;
+ }
+
+ public function delChannel($channel) {
+ if(array_key_exists(strtolower($channel->getName()), $this->channels)) {
+ unset($this->channels[strtolower($channel->getName())]);
+ } else {
+ 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);