slitaz-forge rev 325
irc: Updated irc sources. Thanks Trixar_za.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Fri Aug 10 08:47:21 2012 +0000 (2012-08-10) |
parents | 7381bc5d5f27 |
children | 87d4ccc604d7 |
files | irc/src/html/favicon.ico irc/src/html/index.php irc/src/html/style.css irc/src/org/jibble/logbot/LogBot.java irc/src/org/jibble/logbot/LogBotMain.java irc/src/org/jibble/logbot/compile.sh |
line diff
1.1 Binary file irc/src/html/favicon.ico has changed
2.1 --- a/irc/src/html/index.php Wed Aug 01 09:44:41 2012 +0200 2.2 +++ b/irc/src/html/index.php Fri Aug 10 08:47:21 2012 +0000 2.3 @@ -2,78 +2,104 @@ 2.4 <?php 2.5 include("config.inc.php"); 2.6 ?> 2.7 -<html> 2.8 -<head> 2.9 - <title>IRC Logs for SliTaz</title> 2.10 - <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> 2.11 - <meta name="description" content="IRC Logs for SliTaz" /> 2.12 - <meta name="keywords" content="IRC Logs for SliTaz" /> 2.13 - <link rel="stylesheet" href="style.css" type="text/css" /> 2.14 +<html><head> 2.15 +<title>SliTaz IRC Logs</title> 2.16 +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> 2.17 +<meta name="description" content="SliTaz IRC Logs" /> 2.18 +<meta name="keywords" content="SliTaz IRC Logs" /> 2.19 +<link rel="stylesheet" href="style.css" type="text/css" /> 2.20 </head> 2.21 <body> 2.22 - <div id="header"> 2.23 - <div id="logo"></div> 2.24 - <div id="network"> 2.25 - <a href="http://www.slitaz.org/"> 2.26 - <img src="http://www.slitaz.org/images/network.png" alt="network.png" /></a> 2.27 - <a href="http://scn.slitaz.org/">Community</a> 2.28 - <a href="http://doc.slitaz.org/">Doc</a> 2.29 - <a href="http://forum.slitaz.org/">Forum</a> 2.30 - <a href="http://bugs.slitaz.org">Bugs</a> 2.31 - <a href="http://hg.slitaz.org/">Hg</a> 2.32 - </div> 2.33 - <h1><a href="./">IRC Logs for SliTaz</a></h1> 2.34 +<?php $now = date('Y-m-d'); ?> 2.35 +<!-- Header --> 2.36 +<div id="header"> 2.37 + <div id="logo"></div> 2.38 + <div id="network"> 2.39 + <a href="http://www.slitaz.org/">Home</a> 2.40 + <a href="http://scn.slitaz.org/">Community</a> 2.41 + <a href="http://doc.slitaz.org/">Doc</a> 2.42 + <a href="http://forum.slitaz.org/">Forum</a> 2.43 + <a href="http://slitaz.pro/">Pro</a> 2.44 + <a href="http://shop.slitaz.org/">Shop</a> 2.45 + <a href="http://bugs.slitaz.org/">Bugs</a> 2.46 + <a href="http://hg.slitaz.org/">Hg</a> 2.47 </div> 2.48 - <?php 2.49 - $date = $_GET['date']; 2.50 - if (isset($date) && preg_match("/^\d\d\d\d-\d\d-\d\d$/", $date)) { 2.51 - ?> 2.52 - <div id="contentbox"> 2.53 - <h2>Log for <?php echo($date); ?></h2> 2.54 - <p>Timestamps are GMT-7</p> 2.55 - <p><a href="./"><< Back to Index</a></p> 2.56 + <h1><a href="./">SliTaz IRC Logs</a></h1> 2.57 +</div> 2.58 +<?php 2.59 + $date = $_GET['date']; 2.60 + if (is_null($date)) { 2.61 + $date = $now; 2.62 + } 2.63 + if (isset($date) && preg_match("/^\d\d\d\d-\d\d-\d\d$/", $date)) { 2.64 +?> 2.65 +<div id="contentbox"> 2.66 + <h2>Log for <?php echo($date); ?></h2> 2.67 + <p>Timestamps are GMT-6</p> 2.68 + <p><a href="./index"><< Go to Index</a></p> 2.69 +</div> 2.70 +<div id="content"> 2.71 +<?php 2.72 + readfile($date . ".log"); 2.73 +?> 2.74 +</div> 2.75 +<?php 2.76 + } 2.77 + elseif (isset($date) && preg_match("/^index$/", $date)) { 2.78 + $dir = opendir("."); 2.79 + while (false !== ($file = readdir($dir))) { 2.80 + if (strpos($file, ".log") == 10) { 2.81 + $filearray[] = $file; 2.82 + } 2.83 + } 2.84 + closedir($dir); 2.85 + 2.86 + rsort($filearray); 2.87 +?> 2.88 +<div id="contentbox"> 2.89 + <div style="text-align: justify; width: 48%; padding: 20px 10px 0pt 0pt;"> 2.90 + These are the logs from the #slitaz support channel on freenode.<br /> 2.91 + The main purpose of these are to provide records of meetings and<br /> 2.92 + dicussion we have on IRC - not that pankso is around much...<br /><br /> 2.93 + Please click on the date of the log you wish to view:<br /> 2.94 </div> 2.95 - <div id="content"> 2.96 - <?php 2.97 - readfile($date . ".log"); 2.98 - ?> 2.99 - </div> 2.100 - <?php 2.101 - } 2.102 - else { 2.103 - $dir = opendir("."); 2.104 - while (false !== ($file = readdir($dir))) { 2.105 - if (strpos($file, ".log") == 10) { 2.106 - $filearray[] = $file; 2.107 - } 2.108 - } 2.109 - closedir($dir); 2.110 - rsort($filearray); 2.111 - ?> 2.112 - <div id="contentbox"> 2.113 - <ul> 2.114 - <?php 2.115 - foreach ($filearray as $file) { 2.116 - $file = substr($file, 0, 10); 2.117 - ?> 2.118 - <li><a href="<?php echo($file); ?>"><?php echo($file); ?></a></li> 2.119 - <?php 2.120 - } 2.121 - ?> 2.122 - </ul> 2.123 - </div> 2.124 - <?php 2.125 - } 2.126 - ?> 2.127 - <div id="footer"> 2.128 - <p>SliTaz @ 2.129 - <a href="http://twitter.com/slitaz">Twitter</a> 2.130 - <a href="http://www.facebook.com/slitaz">Facebook</a> 2.131 - <a href="http://distrowatch.com/slitaz">Distrowatch</a> 2.132 - <a href="http://en.wikipedia.org/wiki/SliTaz">Wikipedia</a> 2.133 - <a href="http://flattr.com/profile/slitaz">Flattr</a></p> 2.134 - <p>These logs were automatically created by <b><?php echo($nick); ?></b> 2.135 - using <a href="http://www.jibble.org/logbot/">LogBot</a></p> 2.136 - <div/> 2.137 -</body> 2.138 -</html> 2.139 +</div> 2.140 +<div id="content"> 2.141 + <ul> 2.142 +<?php 2.143 + foreach ($filearray as $file) { 2.144 + $file = substr($file, 0, 10); 2.145 +?> 2.146 + <li><a href="<?php echo($file); ?>"><?php echo($file); ?></a></li> 2.147 +<?php 2.148 + } 2.149 +?> 2.150 + </ul> 2.151 +</div> 2.152 +<?php 2.153 + } 2.154 +?> 2.155 +<div id="footer"> 2.156 + <p> 2.157 + Network: 2.158 + <a href="http://www.slitaz.org/">Main Site</a> 2.159 + <a href="http://scn.slitaz.org/">Community</a> 2.160 + <a href="http://doc.slitaz.org/">Doc</a> 2.161 + <a href="http://forum.slitaz.org/">Forum</a> 2.162 + <a href="http://pkgs.slitaz.org/">Packages</a> 2.163 + <a href="http://bugs.slitaz.org">Bugs</a> 2.164 + <a href="http://hg.slitaz.org/">Hg</a> 2.165 + <br> 2.166 + SliTaz @ 2.167 + <a href="http://twitter.com/slitaz">Twitter</a> 2.168 + <a href="http://www.facebook.com/slitaz">Facebook</a> 2.169 + <a href="http://distrowatch.com/slitaz">Distrowatch</a> 2.170 + <a href="http://en.wikipedia.org/wiki/SliTaz">Wikipedia</a> 2.171 + <a href="http://flattr.com/profile/slitaz">Flattr</a> 2.172 + </p> 2.173 + <p> 2.174 + These logs were automatically created by <b><?php echo($nick); ?></b> 2.175 + using <a href="http://www.jibble.org/logbot/">LogBot</a> 2.176 + </p> 2.177 +<div/> 2.178 +</body></html>
3.1 --- a/irc/src/html/style.css Wed Aug 01 09:44:41 2012 +0200 3.2 +++ b/irc/src/html/style.css Fri Aug 10 08:47:21 2012 +0000 3.3 @@ -1,30 +1,32 @@ 3.4 body { 3.5 - margin: 0; 3.6 - padding: 0; 3.7 - background: #000; 3.8 - font: 11px sans-serif, vernada, arial; 3.9 - color: #fff; 3.10 + margin: 0; 3.11 + padding: 0; 3.12 + background: #f1f1f1; 3.13 + font: 13px sans-serif, vernada, arial; 3.14 } 3.15 3.16 -.irc-date { color: grey; } 3.17 +.irc-date { color: gray; } 3.18 .irc-green { color: green; } 3.19 -.irc-white { color: lightgrey; } 3.20 -.irc-orange { color: orange; } 3.21 -.irc-yellow { color: yellow; } 3.22 -.irc-grey { color: grey; } 3.23 +.irc-white { color: black; } 3.24 +.irc-orange { color: #E0681E; } 3.25 +.irc-yellow { color: #6D1670; } 3.26 +.irc-grey { color: gray; } 3.27 .irc-red { color: red; } 3.28 -a {text-decoration: none; color: #335A8F;} 3.29 -a:hover {text-decoration: underline; color: #335A8F;} 3.30 +a {text-decoration: none; color: #215090; } 3.31 +a:hover {text-decoration: none; color: blue; } 3.32 img { border: 0pt none; vertical-align: middle; } 3.33 3.34 /* Header */ 3.35 #header { 3.36 - height: 40px; 3.37 + margin: 0; 3.38 + width: 100%; 3.39 + height: 40px; 3.40 + position: relative; 3.41 background: #351a0a; 3.42 } 3.43 #header h1 { 3.44 margin: 0; 3.45 - padding: 5px 0 0 42px; 3.46 + padding: 2px 0 0 42px; 3.47 width: 250px; 3.48 clear: none; 3.49 } 3.50 @@ -34,9 +36,9 @@ 3.51 font-size: 20px; 3.52 font-style: italic; 3.53 } 3.54 -#header h1 a:hover, #network a:hover { 3.55 - color: #d66018; 3.56 -} 3.57 +#header h1 a:hover, #network a:hover { color: #cfcfcf; } 3.58 +#header p { margin-bottom: 0; } 3.59 +#header h1 a { color: #fff; text-decoration: none; } 3.60 3.61 /* Logo */ 3.62 #logo { 3.63 @@ -68,6 +70,8 @@ 3.64 padding-bottom: 10px; 3.65 padding-right: 20px; 3.66 font-size: 13px; 3.67 + background-color: #fff; 3.68 + color: #000; 3.69 } 3.70 3.71 #contentbox { 3.72 @@ -77,6 +81,7 @@ 3.73 font-size: 13px; 3.74 background: #d66018; 3.75 color: #333; 3.76 + min-height: 120px; 3.77 } 3.78 #contentbox a { 3.79 color: #fff; 3.80 @@ -87,10 +92,13 @@ 3.81 } 3.82 3.83 #footer { 3.84 - background: #AF9E9E; 3.85 + background: #f1f1f1; 3.86 text-align: center; 3.87 - padding: 5px; 3.88 - color: #151515; 3.89 + border-top: 1px solid #ddd; 3.90 + padding: 20px; 3.91 + color: #666; 3.92 + margin: 0; 3.93 + clear: both; 3.94 } 3.95 -#footer a { color: #151515; padding: 0 2px; text-decoration: underline; } 3.96 +#footer a { color: #666; padding: 0 2px; text-decoration: underline; } 3.97 #footer a:hover { text-decoration: none; }
4.1 --- a/irc/src/org/jibble/logbot/LogBot.java Wed Aug 01 09:44:41 2012 +0200 4.2 +++ b/irc/src/org/jibble/logbot/LogBot.java Fri Aug 10 08:47:21 2012 +0000 4.3 @@ -60,6 +60,11 @@ 4.4 4.5 public void onJoin(String channel, String sender, String login, String hostname) { 4.6 append(GREEN, "*** " + sender + " (" + login + "@" + hostname + ") has joined " + channel); 4.7 + // if (sender.equals(getNick())) { 4.8 + // sendNotice(channel, joinMessage); 4.9 + // } else { 4.10 + // sendNotice(sender, joinMessage); 4.11 + // } 4.12 } 4.13 4.14 public void onMessage(String channel, String sender, String login, String hostname, String message) { 4.15 @@ -79,14 +84,30 @@ 4.16 append(ORANGE, "*** " + oldNick + " is now known as " + newNick); 4.17 } 4.18 4.19 + public void onNotice(String sourceNick, String sourceLogin, String sourceHostname, String target, String notice) { 4.20 + // append(ORANGE, "-" + sourceNick + "- " + notice); 4.21 + } 4.22 + 4.23 public void onPart(String channel, String sender, String login, String hostname) { 4.24 append(GREY, "*** " + sender + " (" + login + "@" + hostname + ") has left " + channel); 4.25 } 4.26 - 4.27 + 4.28 + public void onPing(String sourceNick, String sourceLogin, String sourceHostname, String target, String pingValue) { 4.29 + // append(RED, "[" + sourceNick + " PING]"); 4.30 + } 4.31 + 4.32 + public void onPrivateMessage(String sender, String login, String hostname, String message) { 4.33 + // append(WHITE, "<- *" + sender + "* " + message); 4.34 + } 4.35 + 4.36 public void onQuit(String sourceNick, String sourceLogin, String sourceHostname, String reason) { 4.37 append(RED, "*** " + sourceNick + " (" + sourceLogin + "@" + sourceHostname + ") has quit (" + reason + ")"); 4.38 } 4.39 4.40 + public void onTime(String sourceNick, String sourceLogin, String sourceHostname, String target) { 4.41 + // append(RED, "[" + sourceNick + " TIME]"); 4.42 + } 4.43 + 4.44 public void onTopic(String channel, String topic, String setBy, long date, boolean changed) { 4.45 if (changed) { 4.46 append(GREEN, "*** " + setBy + " changes topic to '" + topic + "'"); 4.47 @@ -98,6 +119,7 @@ 4.48 } 4.49 4.50 public void onVersion(String sourceNick, String sourceLogin, String sourceHostname, String target) { 4.51 + // append(RED, "[" + sourceNick + " VERSION]"); 4.52 } 4.53 4.54 public void onKick(String channel, String kickerNick, String kickerLogin, String kickerHostname, String recipientNick, String reason) {
5.1 --- a/irc/src/org/jibble/logbot/LogBotMain.java Wed Aug 01 09:44:41 2012 +0200 5.2 +++ b/irc/src/org/jibble/logbot/LogBotMain.java Fri Aug 10 08:47:21 2012 +0000 5.3 @@ -23,7 +23,9 @@ 5.4 } 5.5 5.6 LogBot.copy(new File("html/style.css"), new File(outDir, "style.css")); 5.7 - LogBot.copy(new File("html/index.php"), new File(outDir, "index.php")); 5.8 + LogBot.copy(new File("html/logo.png"), new File(outDir, "logo.png")); 5.9 + LogBot.copy(new File("html/favicon.ico"), new File(outDir, "favicon.ico")); 5.10 + LogBot.copy(new File("html/index.php"), new File(outDir, "index.php")); 5.11 5.12 BufferedWriter writer = new BufferedWriter(new FileWriter(new File(outDir, "config.inc.php"))); 5.13 writer.write("<?php");