X-Git-Url: http://git.pk910.de/?p=PHP-P10.git;a=blobdiff_plain;f=Uplink%2FUplink.class.php;h=378d4b6a5acea60ee2bf43e6c16fa57e357fb74f;hp=6465a9879d2990bf2e6844e269cad24b81e152d1;hb=f2518601341be698541f0a642aa750ef0187cfd4;hpb=7f51193ddac01b0540000c756c50167ff015e02a diff --git a/Uplink/Uplink.class.php b/Uplink/Uplink.class.php index 6465a98..378d4b6 100644 --- a/Uplink/Uplink.class.php +++ b/Uplink/Uplink.class.php @@ -374,6 +374,8 @@ class Uplink { $modes = implode(" ",array_slice($args, 5, count($args)-8)); $modes = new P10_UserModeSet($modes); $ip = new IPAddr($args[count($args)-3]); + if($host == $server->getName()) + $ip->setServerAddr(true); $realname = $args[count($args)-1]; $user = new P10_User($nick, $numeric, $server, $connect_time, $ident, $host, $ip, $realname, $modes); if($this->eventHandler) @@ -500,7 +502,7 @@ class Uplink { private function recv_kick($from, $args) { $user = P10_User::getUserByNum($from); - if($user == null) { + if($user == null && strlen($from) != 2) { trigger_error("An unknown user tries to kick another user on recv_kick.", E_USER_ERROR); return; } @@ -514,7 +516,7 @@ class Uplink { } if($this->eventHandler) $this->eventHandler->event_kick($user, $target, $channel, $args[1]); - $channel->partUser($user); + $channel->partUser($target); } private function recv_kill($from, $args) {