* * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to * deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or * sell copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * * @category Common * @package DRI * @author Christoph Brill * @copyright 2012-2017 Christoph Brill * @license MIT https://opensource.org/licenses/MIT * @link https://people.freedesktop.org/~cbrill/ */ // Value taken from /etc/localtime on annarchy date_default_timezone_set('US/Pacific'); define('LOG_DIR', './'); $channels = array ('dri-devel', 'radeon', 'nouveau', 'wayland', 'd3d9', 'freedreno', 'lima', 'etnaviv', 'intel-gfx', 'freedesktop', 'openchrome', 'intel-3d', 'ml-mainline'); if (isset($_GET['channel'])) { $channel = $_GET['channel']; } else if (isset($_COOKIE['last_channel'])) { $channel = $_COOKIE['last_channel']; } else { $channel = 'dri-devel'; } setcookie('last_channel', $channel, time()+2592000); if (isset($_GET['date'])) { $date = validDate($_GET['date']); } else if (isset($_GET['page'])) { $date = getDateFromFilename($_GET['page']); } function validDate($date) { if ($date == 'today') { return date('Y-m-d'); } if ($date == 'yesterday') { return date('Y-m-d', time() - (24*60*60)); } if (preg_match('/[0-9]{4}-[0-9]{2}-[0-9]{2}/', $date)) { return $date; } return null; } /** * Get the date from a filename * * @param string $filename the filename to extract the month from (e.g. * dri-devel-2017-01-27.log) * * @return string the month (e.g. '2017-01-27' for the example above) */ function getDateFromFilename($filename) { return substr($filename, 10, 10); } /** * Check if a line belongs to a given channel * * @param string $line the current line from the chat log * @param string $channel the channel to check if the line belongs to it * * @return boolean true, if the line belongs to the channel */ function isFromChannel($line, $channel) { return strstr($line, '#'.$channel.':'); } /** * Check if a line is a 'xxx joined the channel' line and should be filtered * * @param string $line the current line from the chat log * * @return boolean true, the line should be hidden */ function filterJoin($line) { global $show_joins, $show_irssi; if (!$show_joins && strstr($line, 'has joined')) { return true; } if (!$show_irssi && strstr($line, '-!-')) { return true; } return false; } /** * Get the user name from the given line * * @param string $line the current line from the chat log * * @return string the username found in the line */ function getUser($line) { $result = array(); if (preg_match('=(<.|\* )[a-zA-Z0-9\|_`\]\[\^-]+(>| )=', $line, $result)) { return $result[0]; } return ''; } /** * Get the time from the given line * * @param string $line the current line from the chat log * * @return string the time found in the line */ function getTime($line) { $result = array(); if (preg_match('=^([0-9:]+)=', $line, $result)) { return $result[0]; } return ""; } /** * Get the users avatar * * @param string $user the current user (e.g. retrieved from getUser()) * * @return string|null the link to the users avatar */ function getImage($user) { global $gravatars, $freedesktop, $custom; if (isset($gravatars[$user])) { return 'http://www.gravatar.com/avatar/'.$gravatars[$user]; } if (isset($freedesktop[$user])) { return 'http://planet.freedesktop.org/faces/'.$freedesktop[$user]; } if (isset($custom[$user])) { return $custom[$user]; } return null; } // This is the MD5-sums of the emails for some known users $gravatars = array(); $gravatars['airlied'] = '48abc804ac80b2fb25ce46dbf1506748'; $gravatars['jobermayr'] = 'bdb8b9712e2fe7eeb8efa895867636c2'; $gravatars['fritsch'] = '95f4cc6433f2f59214ab9c7affc6e453'; $freedesktop = array(); $freedesktop['ajax'] = 'ajax.png'; $freedesktop['alanc'] = 'alanc.png'; $freedesktop['anholt'] = 'anholt.png'; $freedesktop['cworth'] = 'cworth.png'; $freedesktop['dberkholz'] = 'dberkholz.png'; $freedesktop['idr'] = 'idr.png'; $freedesktop['krh'] = 'krh.png'; $freedesktop['libv'] = 'libv.png'; $freedesktop['omcfadde'] = 'z3ro.png'; $custom = array(); $custom['darktama'] = 'https://lh4.googleusercontent.com/-8Lx3KozwWDk/AAAAAAAAAAI/AAAAAAAAACU/vbakuLWZFmE/s90-c/photo.jpg'; $custom['dvdhrm'] = 'https://lh6.googleusercontent.com/-ogpdJ0Pf984/AAAAAAAAAAI/AAAAAAAAAHw/XcIa0ybcm6M/s90-c/photo.jpg'; $custom['ickle'] = 'https://lh4.googleusercontent.com/-MzNPVnrPOJY/AAAAAAAAAAI/AAAAAAAAAyo/cjxwRnKVXA0/s90-c/photo.jpg'; $custom['imirkin'] = 'https://avatars3.githubusercontent.com/u/817874?v=2&s=460'; $custom['jbarnes'] = 'https://lh3.googleusercontent.com/-l2-D6D43gVs/AAAAAAAAAAI/AAAAAAAAAUI/Ak7Yhy-zPMA/s90-c/photo.jpg'; $custom['marcheu'] = 'https://lh6.googleusercontent.com/-b3WZZvcLyz8/AAAAAAAAAAI/AAAAAAAAB6s/HdkxCZXg_GQ/s90-c/photo.jpg'; $custom['mjg59'] = 'http://l-userpic.livejournal.com/4975639/1051328'; $custom['Kayden'] = 'http://media.linkedin.com/mpr/pub/image-JLwJ9fTJBTv3Ur9xL18X4Ph00E8D3v8e6S8E_fOH0R2stCRVJLwEu36J0rLw30i-AL_r/kenneth-graunke.jpg'; $custom['keithp'] = 'https://lh6.googleusercontent.com/-s3zvCtonD-E/AAAAAAAAAAI/AAAAAAAAAE4/_MWh9P1Ku3A/s90-c/photo.jpg'; $custom['Prf_Jakob'] = 'https://lh5.googleusercontent.com/-978JYHxUyF8/AAAAAAAAAAI/AAAAAAAAAa0/rl_POiPf6fA/s90-c/photo.jpg'; $custom['robclark'] = 'https://lh6.googleusercontent.com/-LbzNNfquAK8/AAAAAAAAAAI/AAAAAAAAAEQ/YmZvmdvb8XU/s90-c/photo.jpg'; $custom['skeggsb'] = 'https://lh4.googleusercontent.com/-8Lx3KozwWDk/AAAAAAAAAAI/AAAAAAAAACU/vbakuLWZFmE/s90-c/photo.jpg'; $custom['SardemFF7'] = 'https://avatars3.githubusercontent.com/u/222943?v=3&s=460'; $custom['stereotype441'] = 'https://lh5.googleusercontent.com/-JmmSeCPUy2E/AAAAAAAAAAI/AAAAAAAAAUs/wmdZsitKwLs/s90-c/photo.jpg'; $custom['RSpliet'] = 'http://userserve-ak.last.fm/serve/126/35506029.png'; $realname = array(); $realname['_ds_'] = 'Darren Salt'; $realname['adrien'] = 'Adrien Nader'; $realname['agd5f'] = 'Alex Deucher'; $realname['airlied'] = 'Dave Airlie'; $realname['ajax'] = 'Adam Jackson'; $realname['alanc'] = 'Alan Coopersmith'; $realname['anholt'] = 'Eric Anholt'; $realname['arekm'] = 'Arkadiusz Miskiewicz'; $realname['austriancoder'] = 'Christian Gmeiner'; $realname['bbrezillon'] = 'Boris Brezillon'; $realname['bnieuwenhuizen'] = 'Bas Nieuwenhuizen'; $realname['bryce'] = 'Bryce Harrington'; $realname['bryce_'] = 'Bryce Harrington'; $realname['calim'] = 'Christoph Bumiller'; $realname['careym'] = 'Mark Carey'; $realname['chadversary'] = 'Chad Versace'; $realname['cheako'] = 'Mike Mestnik'; $realname['ckoenig'] = 'Christian Koenig'; $realname['CosmicPenguin'] = 'Jordan Crouse'; $realname['curro'] = 'Francisco Jerez'; $realname['cwabbott'] = 'Connor Abbott'; $realname['cworth'] = 'Carl Worth'; $realname['daniels'] = 'Daniel Stone'; $realname['danvet'] = 'Daniel Vetter'; $realname['danvet_'] = 'Daniel Vetter'; $realname['darktama'] = 'Ben Skeggs'; $realname['DavidHeidelberg'] = 'David Heidelberg'; $realname['dberkholz'] = 'Donnie Berkholz'; $realname['dboyan'] = 'Boyan Ding'; $realname['dvdhrm'] = 'David Herrmann'; $realname['egbert'] = 'Egbert Eich'; $realname['egore'] = 'Christoph Brill'; $realname['glisse'] = 'Jerome Glisse'; $realname['giucam'] = 'Guilio Camuffo'; $realname['fredrikh'] = 'Fredrik Höglund'; $realname['fritsch'] = 'Peter Frühberger'; $realname['funfunctor'] = 'Edward O\'Callaghan'; $realname['haagch'] = 'Christoph Haag'; $realname['hakzsam'] = 'Samuel Pitoiset'; $realname['HdkR'] = 'Ryan Houdek'; $realname['ickle'] = 'Chris Wilson'; $realname['idr'] = 'Ian Romanick'; $realname['imirkin'] = 'Ilia Mirkin'; $realname['imirkin_'] = 'Ilia Mirkin'; $realname['jbarnes'] = 'Jesse Barnes'; $realname['jcristau'] = 'Julien Cristau'; $realname['jekstrand'] = 'Jason Ekstrand'; $realname['jobermayr'] = 'Johannes Obermayr'; $realname['joi'] = 'Marcin Ślusarz'; $realname['juergbi'] = 'Jürgen Billeter'; $realname['karolherbst'] = 'Karol Herbst'; $realname['Kayden'] = 'Kenneth Graunke'; $realname['keithp'] = 'Keith Packard'; $realname['krh'] = 'Kristian Høgsberg'; $realname['libv'] = 'Luc Verhaegen'; $realname['lordheavy'] = 'Laurent Carlier'; $realname['lostgoat'] = 'Andres Rodriguez'; $realname['lynxeye'] = 'Lucas Stach'; $realname['mannerov'] = 'Axel Davy'; $realname['mareko'] = 'Marek Olšák'; $realname['marcheu'] = 'Stephane Marchesin'; $realname['mattst88'] = 'Matt Turner'; $realname['mjg59'] = 'Matthew Garrett'; $realname['mlankhorst'] = 'Maarten Lankhorst'; $realname['MostAwesomeDude'] = 'Corbin Simpson'; $realname['MrCooper'] = 'Michel Dänzer'; $realname['mupuf'] = 'Martin Peres'; $realname['nha'] = 'Nicolai Hähnle'; $realname['olesalscheider'] = 'Niels Ole Salscheider'; $realname['okias'] = 'David Heidelberger'; $realname['okias_'] = 'David Heidelberger'; $realname['omcfadde'] = 'Oliver McFadden'; $realname['otaylor'] = 'Owen Taylor'; $realname['ParkerR'] = 'Parker Reed'; $realname['pinchartl'] = 'Laurent Pinchart'; $realname['pq'] = 'Pekka Paalanen'; $realname['Prf_Jakob'] = 'Jakob Bornecrantz'; $realname['robclark'] = 'Rob Clark'; $realname['RSpliet'] = 'Roy Spliet'; $realname['SardemFF7'] = 'Quentin Glidic'; $realname['seanpaul'] = 'Sean Paul'; $realname['siro'] = 'Patrick Rudolph'; $realname['siro__'] = 'Patrick Rudolph'; $realname['skeggsb'] = 'Ben Skeggs'; $realname['soreau'] = 'Scott Moreau'; $realname['spstarr'] = 'Shawn Starr'; $realname['spreeuw'] = 'Hanno Spreeuw'; $realname['stereotype441'] = 'Paul Berry'; $realname['stringfellow'] = 'Henry Verbeet'; $realname['suokko'] = 'Pauli Nieminen'; $realname['tarceri'] = 'Timothy Arceri'; $realname['tizbac'] = 'Tiziano Bacocco'; $realname['thohel'] = 'Thomas Helland'; $realname['tstellar'] = 'Tom Stellard'; $realname['TTimo'] = 'Timothee Besset'; $realname['vadimg'] = 'Vadim Girlin'; $realname['vlj'] = 'Vincent Lejeune'; $realname['vsyrjala'] = 'Ville Syrjälä'; $realname['w00t'] = 'Robin Burchell'; $realname['whot'] = 'Peter Hutterer'; $realname['Wizzup'] = 'Merlijn Wajer'; $realname['xexaxo'] = 'Emil Velikov'; $realname['xexaxo1'] = 'Emil Velikov'; $realname['z3ntu'] = 'Luca Weiss'; $realname['zgreg'] = 'Grigori Goronzy'; $realname['zgreg_'] = 'Grigori Goronzy'; $ignore = array(); array_push($ignore, 'joss193'); array_push($ignore, 'fdo-vcs');