From 2ccc33c2d482035ba66316fd7dc9592bc2e2db7d Mon Sep 17 00:00:00 2001 From: pk910 Date: Tue, 26 Jul 2011 12:06:09 +0200 Subject: [PATCH] fixed some bugs --- Uplink/P10_User.class.php | 4 ++-- Uplink/Uplink.class.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Uplink/P10_User.class.php b/Uplink/P10_User.class.php index 83169bf..af22f9d 100644 --- a/Uplink/P10_User.class.php +++ b/Uplink/P10_User.class.php @@ -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; } diff --git a/Uplink/Uplink.class.php b/Uplink/Uplink.class.php index 5c86c95..cd6e49b 100644 --- a/Uplink/Uplink.class.php +++ b/Uplink/Uplink.class.php @@ -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; } -- 2.20.1