fixed some warnings
[PHP-P10.git] / Uplink / P10_User.class.php
index 8d4e5a35ffa2381679cecb64d0a8f8f8e87f4060..f18080a576a9fa5e5f58980acb6b1f178eeb4768 100644 (file)
@@ -69,7 +69,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) {
@@ -165,6 +165,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);
        }