",">","<"),"",$message_parts[3]); /*if(in_array($user,$users)){ $line = str_replace("*** $user","*** $user",$line); }*/ $line = "".$matches_result[2]."\n"; $actual_lines++; $actions++; } elseif(stristr($line,"***") OR stristr($line,"* ")){ $date = $message_parts[0]; $user = $message_parts[3]; $user = str_replace(array("<",">",">","<"),"",$message_parts[3]); $line = "".$line."\n"; $actual_lines++; $actions++; } else { foreach($excludes as $exclude){ //if(!stristr($line,$exclude) OR !stristr($line,"***")){ if(preg_match("/([0-9+\$\/_.-]*?T[0-9+\$\:\/_.-]*) .*(\<(.*?)\> .*)/",htmlspecialchars_decode($line),$matches_result)){ $date = $matches_result[1]; $nick = $matches_result[3]; $user = $matches_result[3]; $user = str_replace(array("<",">",">","<"),"",$message_parts[2]); //echo "A: ".$message_parts[2]."\tB: $user\n"; if(!stristr($line,$exclude)){ if(!fnmatch("*\*\*\* $nick <*!~*\@*\> ", $line) OR !fnmatch("*\*\*\* $nick <*!~*\@*> ", $line)){ /*if(stristr($user,"!")){ $user = explode("!",$user); $user = $user[0]; }*/ if(array_key_exists($user,$users)){ $line = str_replace(array("<$user>","<$user>"),"$user",$line); $messages++; $actual_lines++; // Increment all lines that are real... } else { $users[$user] = get_random_color(); } } } } // end regex line match } // End Foreach } // End IF / Else // Make a nice date format whoa hworth hw ot wrthp st //var_dump($users); $line = str_replace($date,"",$line); // Massive hack goes here... Fix later //$date = str_replace(array(" ","T"),array("","\t"),$date); $date_parts = explode("T", $date); $date = "".$date_parts[0]; if(isset($date[1])){ @$date .= "".str_replace(" ","",$date_parts[1]).""; } $date .= ""; // End hack $proc_line = str_replace(array("\n","\t","\r"," "," "),"",$line); echo "\t\t\t
$line_num$date".$proc_line."
\n"; } if(@isset($_GET['channel']) OR @stristr($_GET['channel'],"##")){ $channel = str_replace(array("#","##"),"",stripslashes(strval(urldecode($_GET['channel'])))); } if(isset($_GET['month'])){ $month = stripslashes(strval(urldecode($_GET['month']))); } else { $month = date("F"); } if(isset($_GET['day'])){ $day = stripslashes(strval(urldecode($_GET['day']))); } else { $day = date('d'); } $day = sprintf('%02d',$day); /* Debug Mode */ if(isset($_GET['network'])){ $network = stripslashes(strval(urldecode($_GET['network']))); } else { $network = "freenode"; } if(isset($_GET['year'])){ $year = stripslashes(strval(urldecode($_GET['year']))); } else { $year = date('Y'); } include "header.php"; $filename = "$path/$network/#$channel/$month/#$channel.log"; $date_string = date("Y-m-d", strtotime("$month $day $year")); if(file_exists($filename)){ echo "\t\t
\n"; $lines = file($filename, FILE_SKIP_EMPTY_LINES); foreach ($lines as $line_num => $line) { if((stristr($line,$date_string)) OR (@$_GET['display_all']=='on')) { process_line($line_num,$line,$users); } } echo "\t\t
\n\t \n\t
\n"; make_users_list($users); echo "\t
"; } else { echo "\t\t

Sorry no channel exists by that name perhaps you should remove the forward # from the name and try again?

"; } include "footer.php"; ?>