utf8 decode console outputs
[PHP-P10.git] / Uplink / Uplink.class.php
index a23f4cee487c3543c8958a67b94668fcbd8a0967..232d976619a9abba4b373fd16c960786ff463302 100644 (file)
@@ -75,7 +75,7 @@ class Uplink {
        private $settings = array();
        private $server;
        private $eventHandler = null;
-       private $last_local_numeric = 1;
+       private $last_local_numeric = 0;
        
        const FLAG_P10SESSION      = 0x0001; //connection is in P10 mode (server is connected)
        const FLAG_SECURITY_QUIT   = 0x0002; //local connection abort because of security issues
@@ -691,7 +691,7 @@ class Uplink {
                        if($this->eventHandler)
                                $this->eventHandler->event_chanmode($user, $channel, $modes);
                } else {
-                       $targetUser = P10_User::getUserByNum($args[0]);
+                       $targetUser = P10_User::getUserByNick($args[0]);
                        if($targetUser == null) {
                                trigger_error("Server tries to send a mode to an user that does not exist or was not found on recv_mode.", E_USER_ERROR);
                                return;
@@ -713,7 +713,7 @@ class Uplink {
                        $ident = $user->getIdent();
                        $host = $user->getHost();
                        $modes = $user->getModes()->getModeString();
-                       $ip = Numerics::numericFromIP($user->getIP());
+                       $ip = $user->getIP()->getNumeric();
                        $numeric = $user->getNumeric();
                        $realname = $user->getRealname();
                        $this->send("N", $nick, $connect_time, $ident, $host, $modes, $ip, $numeric, $realname);