fixed small bugs in the mode and burst parsing code
authorpk910 <philipp@zoelle1.de>
Thu, 25 Aug 2011 12:19:00 +0000 (14:19 +0200)
committerpk910 <philipp@zoelle1.de>
Thu, 25 Aug 2011 12:19:00 +0000 (14:19 +0200)
Uplink/Uplink.class.php

index 5f2cdf1658237ca75adbdb6af51c04515cc9dc82..703a98a7f1a1556cbaf24cdd86e905b1053b4af6 100644 (file)
@@ -454,7 +454,9 @@ class Uplink {
                        if($this->eventHandler)
                                $this->eventHandler->event_join($user, $channel, true);
                }
-               $modes->parseModes(implode(" ", array_slice($args, 2)));
+               $modestr = array_slice($args, 2);
+               if($modestr[0] == "+")
+                       $modes->parseModes(implode(" ", $modestr));
        }
        
        private function recv_join($from, $args) {
@@ -690,7 +692,7 @@ class Uplink {
        
        private function recv_mode($from, $args) {
                $user = P10_User::getUserByNum($from);
-               if($user == null) {
+               if($user == null && strlen($from) != 2) {
                        trigger_error("Server tries to send a modechange from an user that does not exist or was not found on recv_mode.", E_USER_ERROR);
                        return;
                }