added EventHandler idea (not implemented, yet)
[PHP-P10.git] / Uplink / Uplink.class.php
index 5c86c95b6afb0d6e183892e85b9d190b63a9e9e9..b49c3f6ef763fb90437d02138ef9c87eb7393513 100644 (file)
@@ -46,6 +46,9 @@
  *
  * void setValidateServer(String $name, String $password)
  *     sets additional security relevant information about the remote server.
+ *
+ * void setEventHandler(EventHandler $event_handler)
+ *     sets the EventHandlder
  */
 require_once("Client.class.php");
 require_once("Numerics.class.php");
@@ -340,11 +343,10 @@ class Uplink {
        }
        
        private function recv_burst($from, $args) {
-               //AK B #aide 1292621006 +tn ALAMH:o
                $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 +360,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;
                        }