From: pk910 Date: Thu, 25 Aug 2011 12:19:00 +0000 (+0200) Subject: fixed small bugs in the mode and burst parsing code X-Git-Url: http://git.pk910.de/?p=PHP-P10.git;a=commitdiff_plain;h=e09078c14e97702b57784db19089acce7789b21f;hp=bcb9933a3e3c463a412e00daeeee8b317e166d50 fixed small bugs in the mode and burst parsing code --- diff --git a/Uplink/Uplink.class.php b/Uplink/Uplink.class.php index 5f2cdf1..703a98a 100644 --- a/Uplink/Uplink.class.php +++ b/Uplink/Uplink.class.php @@ -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; }