X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=Bots%2FIPv6.class.php;fp=Bots%2FIPv6.class.php;h=44c79d7fdf9c6100acd58e20add9fd3c1c8ad038;hb=f1a1066826a5cc04606cc12f0bd0b8e0383ca190;hp=9dc8f847bd55974b9a532063ffff067c588027cc;hpb=d551b4197fb637366fa640526fbf914fc1173874;p=PHP-P10.git diff --git a/Bots/IPv6.class.php b/Bots/IPv6.class.php index 9dc8f84..44c79d7 100644 --- a/Bots/IPv6.class.php +++ b/Bots/IPv6.class.php @@ -81,9 +81,7 @@ class {$_NAME} extends Bot { public function recive_join($user, $channel, $isBurst) { if(!$this->botOppedOnChannel($channel)) return false; - $ipv6 = '/^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))(|\/[0-9]{1,3})$/'; - echo $user->getIP()."\n"; - if(preg_match($ipv6, $user->getIP())) { + if($user->getIP()->isIPv6()) { $this->uplink->mode($this->ipv6, $channel, "+ov ".$user->getNumeric()." ".$user->getNumeric()); } else { $this->uplink->mode($this->ipv6, $channel, "+v ".$user->getNumeric());