some more bug fixes (linkable version now)
authorpk910 <philipp@zoelle1.de>
Tue, 26 Jul 2011 08:55:25 +0000 (10:55 +0200)
committerpk910 <philipp@zoelle1.de>
Tue, 26 Jul 2011 08:55:25 +0000 (10:55 +0200)
Uplink/Client.class.php
Uplink/Uplink.class.php
main.php

index c7ecc4cf40440bf942ccac22cd9d0003288a8510..8a38610dba6870d5fa961f8c9acb6073b5df6da0 100644 (file)
@@ -107,7 +107,7 @@ class Client {
                        while(($line = @fgets($this->socket)) != null) {
                                $line=trim($line);
                                if(!empty($line)) {
-                                       if(DEBUG_RAW) echo"[recv] ".$line."\n";
+                                       echo"[recv] ".$line."\n";
                                        $this->traffic['in'] += strlen($line);
                                        $lines[] = $line;
                                        if(count($lines) >= self::CLIENT_RECV_MAX_LINES) break;
@@ -120,7 +120,7 @@ class Client {
        
        public function send($line, $newline = "\r\n") {
                if($this->socket == null) return;
-               if(DEBUG_RAW) echo"[send] ".$line."\n";
+               echo"[send] ".$line."\n";
                $this->traffic['out'] += strlen($line);
                fwrite($this->socket,$line.$newline);
        }
index f0637b03d41ef32f7522f3643c626da4966b2204..8174790753541f9af06c7843dcfb016072766434 100644 (file)
@@ -253,7 +253,7 @@ class Uplink {
                                return;
                        }
                        $new_server = new P10_Server($args[0], substr($args[5],0,2), $this->server, $args[2], $args[3], $args[7]);
-                       $this->server->add_server($new_server);
+                       $this->server->addServer($new_server);
                        $this->flags |= self::FLAG_P10SESSION | self::FLAG_BURST_PENDING;
                } else {
                        //another server got a new slave server ^^
@@ -263,7 +263,7 @@ class Uplink {
                                return;
                        }
                        $new_server = new P10_Server($args[0], substr($args[5],0,2), $server, $args[2], $args[3], $args[7]);
-                       $server->add_server($new_server);
+                       $server->addServer($new_server);
                }
        }
        
@@ -296,7 +296,7 @@ class Uplink {
                        $ident = $args[3];
                        $host = $args[4];
                        $modes = implode(" ",array_slice($args, 5, count($args)-8));
-                       $modes = new UserModeSet($modes);
+                       $modes = new P10_UserModeSet($modes);
                        $ip = Numerics::parseIP($args[count($args)-3]);
                        $realname = $args[count($args)-1];
                        new P10_User($nick, $numeric, $server, $connect_time, $ident, $host, $ip, $realname, $modes);
index 42fa0cdfb917e663276b89f590419ba02efabd02..587e730ca5e950688c1171faaf347627cfadfb71 100644 (file)
--- a/main.php
+++ b/main.php
@@ -29,8 +29,8 @@ require_once("Uplink/Uplink.class.php");
 
 //basicly here is nothing, yet :D
 $uplink = new Uplink();
-$uplink->setUplinkHost("localhost", 4402);
-$uplink->setUplinkServer(5, "php.local.TestNet", "very_weak_password", "Test Server");
+$uplink->setUplinkHost("192.168.2.103", 4401);
+$uplink->setUplinkServer(5, "PHP.TestNet", "very_weak_password", "Test Server");
 
 $uplink->initialize();