if (!strpos($Defname,$host)) { fwrite($readfile,"\n".$host." ".$nick); } else { preg_replace($regex,$host." ".$nick,$Defname); }