fixed some bugs
authorpk910 <philipp@zoelle1.de>
Tue, 26 Jul 2011 10:06:09 +0000 (12:06 +0200)
committerpk910 <philipp@zoelle1.de>
Tue, 26 Jul 2011 10:06:09 +0000 (12:06 +0200)
Uplink/P10_User.class.php
Uplink/Uplink.class.php

index 83169bfe4ada43fa419ec21df9d51a8cdc92e0dc..af22f9d2a334f08e0f71e4ef512280272db05926 100644 (file)
@@ -39,8 +39,8 @@ class P10_User {
        private static $static_users = array();
        
        public static function getUserByNum($numeric) {
-               if(array_key_exists($numeric, self::$static_servers)) {
-                       return self::$static_servers[$numeric];
+               if(array_key_exists($numeric, self::$static_users)) {
+                       return self::$static_users[$numeric];
                }
                return NULL;
        }
index 5c86c95b6afb0d6e183892e85b9d190b63a9e9e9..cd6e49bf492e52d52914fdd98b2dd133ed7f7671 100644 (file)
@@ -344,7 +344,7 @@ class Uplink {
                $name = $args[0];
                $create_time = $args[1];
                $channel = P10_Channel::getChannelByName($name);
-               if($name == null)
+               if($channel == null)
                        $channel = new P10_Channel($name);
                $modes = $channel->getModes();
                $userstr = $args[count($args)-1];
@@ -358,11 +358,11 @@ class Uplink {
                        $userstr = $args[count($args)-2];
                        $modeparamcount--;
                }
-               $users = explode(":",$userstr);
+               $users = explode(",",$userstr);
                $isop = false; $isvoice = false;
                foreach($users as $user) {
                        $uexp = explode(":", $user);
-                       if(strlen($uexp[0]) != 6) {
+                       if(strlen($uexp[0]) != 5) {
                                trigger_error("burst parse error: '".$uexp[0]."' is not an user numeric.", E_USER_ERROR);
                                return;
                        }