Thread: [jetrix-cvs] SF.net SVN: jetrix:[714] jetrix/trunk
Brought to you by:
smanux
From: <sm...@us...> - 2008-08-06 13:01:19
|
Revision: 714 http://jetrix.svn.sourceforge.net/jetrix/?rev=714&view=rev Author: smanux Date: 2008-08-06 13:01:16 +0000 (Wed, 06 Aug 2008) Log Message: ----------- First attempt at creating a Debian package Modified Paths: -------------- jetrix/trunk/build.xml Added Paths: ----------- jetrix/trunk/lib/jdeb-0.7-SNAPSHOT.jar jetrix/trunk/src/etc/control/ jetrix/trunk/src/etc/control/control jetrix/trunk/src/etc/control/postinst jetrix/trunk/src/etc/control/preinst Modified: jetrix/trunk/build.xml =================================================================== --- jetrix/trunk/build.xml 2008-08-06 11:40:15 UTC (rev 713) +++ jetrix/trunk/build.xml 2008-08-06 13:01:16 UTC (rev 714) @@ -261,8 +261,24 @@ </target> - <target name="dist.win" depends="deploy" description="Build the windows installer"> + <target name="dist.linux" depends="dist" description="Build the Linux installer"> + <mkdir dir="${build}/control"/> + <copy todir="${build}/control" filtering="true" > + <fileset dir="${src}/etc/control"/> + </copy> + + <taskdef name="deb" classname="org.vafer.jdeb.ant.DebAntTask" classpath="lib/jdeb-0.7-SNAPSHOT.jar"/> + <deb destfile="${dist}/bin/jetrix-${version}.deb" control="${build}/control" compression="bzip2"> + <data src="${dist}/bin/jetrix-${version}.tar.bz2"> + <mapper type="prefix" strip="1" prefix="/usr/share/jetrix"/> + <exclude name="*.bat"/> + </data> + </deb> + </target> + + <target name="dist.win" depends="deploy" description="Build the Windows installer"> + <!-- Build the windows executable file jetrix.exe --> <mkdir dir="${build}/bin"/> <copy todir="${build}/bin" filtering="true"> @@ -316,7 +332,7 @@ </target> - <target name="dist.all" depends="clean, dist, dist.src, dist.win" description="Build all distributed files"/> + <target name="dist.all" depends="clean, dist, dist.src, dist.win, dist.linux" description="Build all distributed files"/> <target name="deploy" depends="dist"> <delete dir="${deploy}"/> Property changes on: jetrix/trunk/lib/jdeb-0.7-SNAPSHOT.jar ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: jetrix/trunk/src/etc/control/control =================================================================== --- jetrix/trunk/src/etc/control/control (rev 0) +++ jetrix/trunk/src/etc/control/control 2008-08-06 13:01:16 UTC (rev 714) @@ -0,0 +1,9 @@ +Package: jetrix +Version: @version@ +Section: games +Priority: optional +Architecture: all +Depends: sun-java6-jre +Maintainer: Emmanuel Bourg <sm...@lf...> +Homepage: http://jetrix.sourceforge.net +Description: Jetrix TetriNET Server Added: jetrix/trunk/src/etc/control/postinst =================================================================== --- jetrix/trunk/src/etc/control/postinst (rev 0) +++ jetrix/trunk/src/etc/control/postinst 2008-08-06 13:01:16 UTC (rev 714) @@ -0,0 +1,3 @@ +#!/bin/sh + +# TODO Move the log directory and create a symlink Added: jetrix/trunk/src/etc/control/preinst =================================================================== --- jetrix/trunk/src/etc/control/preinst (rev 0) +++ jetrix/trunk/src/etc/control/preinst 2008-08-06 13:01:16 UTC (rev 714) @@ -0,0 +1,5 @@ +#!/bin/sh + +# Create the installation directory +mkdir -p /usr/share/jetrix +chmod a+w /usr/share/jetrix This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sm...@us...> - 2008-08-06 14:39:24
|
Revision: 716 http://jetrix.svn.sourceforge.net/jetrix/?rev=716&view=rev Author: smanux Date: 2008-08-06 14:39:20 +0000 (Wed, 06 Aug 2008) Log Message: ----------- Updated the Maven build Modified Paths: -------------- jetrix/trunk/project.properties jetrix/trunk/project.xml Property Changed: ---------------- jetrix/trunk/ Property changes on: jetrix/trunk ___________________________________________________________________ Modified: svn:ignore - build deploy dist + build deploy dist target *.log Modified: jetrix/trunk/project.properties =================================================================== --- jetrix/trunk/project.properties 2008-08-06 13:02:32 UTC (rev 715) +++ jetrix/trunk/project.properties 2008-08-06 14:39:20 UTC (rev 716) @@ -18,3 +18,5 @@ maven.compile.target = 1.5 maven.clover.license.path=src/etc/clover.license + +maven.repo.remote=http://repo1.maven.org/maven/ Modified: jetrix/trunk/project.xml =================================================================== --- jetrix/trunk/project.xml 2008-08-06 13:02:32 UTC (rev 715) +++ jetrix/trunk/project.xml 2008-08-06 14:39:20 UTC (rev 716) @@ -32,8 +32,9 @@ <siteDirectory>/home/groups/j/je/jetrix/htdocs/docs/</siteDirectory> <repository> - <connection>scm:cvs:pserver:ano...@cv...:/cvsroot/jetrix:jetrix</connection> - <url>http://cvs.sourceforge.net/viewcvs.py/jetrix/jetrix/</url> + <connection>scm:svn:https://jetrix.svn.sourceforge.net/svnroot/jetrix/jetrix/trunk/</connection> + <developerConnection>scm:svn:https://jetrix.svn.sourceforge.net/svnroot/jetrix/jetrix/trunk/</developerConnection> + <url>http://jetrix.svn.sourceforge.net/viewvc/jetrix/</url> </repository> <versions> @@ -61,7 +62,7 @@ <mailingLists> <mailingList> - <name>Jetrix CVS List</name> + <name>Jetrix Commits</name> <subscribe>http://lists.sourceforge.net/lists/listinfo/jetrix-cvs</subscribe> <unsubscribe>http://lists.sourceforge.net/lists/listinfo/jetrix-cvs</unsubscribe> <archive>https://sourceforge.net/mailarchive/forum.php?forum_id=12998</archive> @@ -147,7 +148,7 @@ <dependency> <id>commons-beanutils</id> - <version>1.7-dev</version> + <version>1.7.0</version> </dependency> <dependency> @@ -213,7 +214,7 @@ <report>maven-javadoc-plugin</report> <!--<report>maven-jxr-plugin</report>--> <report>maven-junit-report-plugin</report> - <report>maven-clover-plugin</report> + <!--<report>maven-clover-plugin</report>--> <!--<report>maven-checkstyle-plugin</report>--> <report>maven-pmd-plugin</report> <report>maven-simian-plugin</report> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sm...@us...> - 2008-08-22 06:40:00
|
Revision: 730 http://jetrix.svn.sourceforge.net/jetrix/?rev=730&view=rev Author: smanux Date: 2008-08-22 06:39:58 +0000 (Fri, 22 Aug 2008) Log Message: ----------- Updated the changelog Modified Paths: -------------- jetrix/trunk/doc/changelog.txt jetrix/trunk/src/site/changelog.php Modified: jetrix/trunk/doc/changelog.txt =================================================================== --- jetrix/trunk/doc/changelog.txt 2008-08-18 16:35:43 UTC (rev 729) +++ jetrix/trunk/doc/changelog.txt 2008-08-22 06:39:58 UTC (rev 730) @@ -1,7 +1,7 @@ Jetrix Changelog ================ -Changes in version 0.3 (2005-??-??) +Changes in version 0.3 (20??-??-??) ----------------------------------- Player visible changes @@ -24,10 +24,25 @@ - removed the dependency on JDIC +Changes in version 0.2.2 (2005-04-07) +------------------------------------- + +- Fixed a bug preventing the clients from connecting to a server with a default charset different from ISO-8859-1 +- The configuration is no longer broken by a "&" char in the description of a channel + Changes in version 0.2.1 (2005-02-18) ------------------------------------- - Fixed the Shutdown button on the server administration page +- Fixed a bug preventing the configuration files from being saved if the server was installed in a path containing + a space character +- Running Jetrix with jetrix.exe no longer saturate the CPU +- Fixed a bug preventing the execution of several query commands with the same connection + +Changes in version 0.2.1 (2005-02-18) +------------------------------------- + +- Fixed the Shutdown button on the server administration page - Fixed a bug preventing the configuration files from being saved if the server was installed in a path containing a space character - Running Jetrix with jetrix.exe no longer saturate the CPU - Fixed a bug preventing the execution of several query commands with the same connection Modified: jetrix/trunk/src/site/changelog.php =================================================================== --- jetrix/trunk/src/site/changelog.php 2008-08-18 16:35:43 UTC (rev 729) +++ jetrix/trunk/src/site/changelog.php 2008-08-22 06:39:58 UTC (rev 730) @@ -3,6 +3,21 @@ <h1>Changelog</h1> <pre> +Changes in version 0.2.2 (2005-04-07) +------------------------------------- + +- Fixed a bug preventing the clients from connecting to a server with a default charset different from ISO-8859-1 +- The configuration is no longer broken by a "&" char in the description of a channel + +Changes in version 0.2.1 (2005-02-18) +------------------------------------- + +- Fixed the Shutdown button on the server administration page +- Fixed a bug preventing the configuration files from being saved if the server was installed in a path containing + a space character +- Running Jetrix with jetrix.exe no longer saturate the CPU +- Fixed a bug preventing the execution of several query commands with the same connection + Changes in version 0.2 (2005-01-18) ----------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sm...@us...> - 2008-08-22 15:11:22
|
Revision: 736 http://jetrix.svn.sourceforge.net/jetrix/?rev=736&view=rev Author: smanux Date: 2008-08-22 15:11:15 +0000 (Fri, 22 Aug 2008) Log Message: ----------- Site update Modified Paths: -------------- jetrix/trunk/build.xml jetrix/trunk/src/site/changelog.php jetrix/trunk/src/site/features.php jetrix/trunk/src/site/header.inc.php jetrix/trunk/src/site/menu.inc.php jetrix/trunk/src/site/style.css Added Paths: ----------- jetrix/trunk/src/site/favicon.ico jetrix/trunk/src/site/jetrix-rss.xsl Removed Paths: ------------- jetrix/trunk/src/site/images/favicon.gif Modified: jetrix/trunk/build.xml =================================================================== --- jetrix/trunk/build.xml 2008-08-22 14:56:48 UTC (rev 735) +++ jetrix/trunk/build.xml 2008-08-22 15:11:15 UTC (rev 736) @@ -360,7 +360,64 @@ <fileset dir="${deploy}/jetrix-${version}"/> </ftp> </target> + + <target name="site" description="Generate and publish the web site to SourceForge"> + <!-- Create the site distribution directory --> + <mkdir dir="${dist}/site/docs"/> + <!-- Build the project reports --> + <property environment="env"/> + <exec executable="${env.MAVEN2_HOME}/bin/mvn.bat"> + <arg line="site"/> + </exec> + + <!-- Copy the project reports --> + <copy todir="${dist}/site/docs"> + <fileset dir="target/site"/> + </copy> + + <!-- Copy the site --> + <property file="project.properties"/> + <filter token="version.stable" value="${version.stable}"/> + <filter token="version" value="${version}"/> + <copy todir="${dist}/site" filtering="true" overwrite="true"> + <fileset dir="src/site"> + <exclude name="**/*.png"/> + <exclude name="**/*.ico"/> + </fileset> + </copy> + <copy todir="${dist}/site" overwrite="true"> + <fileset dir="src/site"> + <include name="**/*.png"/> + <include name="**/*.ico"/> + </fileset> + </copy> + + <!-- Update the news from the RSS feed --> + <get src="http://sourceforge.net/export/rss2_projnews.php?group_id=52188&rss_fulltext=1" + dest="${dist}/site/jetrix-rss.xml"/> + <xslt in="${dist}/site/jetrix-rss.xml" out="${dist}/site//news.html" style="src/site/jetrix-rss.xsl"/> + <replace file="${dist}/site/news.html"> + <replacefilter token="&gt;" value=">"/> + <replacefilter token="&lt;" value="<"/> + <replacefilter token="<br>" value="<br />"/> + </replace> + <replaceregexp file="${dist}/site/news.html" byline="true"> + <regexp pattern="\(<a href=.*comments</a>\)"/> + <substitution expression=" "/> + </replaceregexp> + + <tar destfile="${dist}/site.tar.bz2" compression="bzip2"> + <tarfileset dir="${dist}/site"/> + </tar> + + <input addproperty="password" message="Password:"/> + + <scp file="${dist}/site.tar.bz2" todir="smanux:${password}@shell.sf.net:/home/users/s/sm/smanux" trust="true"/> + + <sshexec host="shell.sf.net" username="smanux" password="${password}" trust="true" command="tar -jxf site.tar.bz2 --directory=/home/groups/j/je/jetrix/htdocs "/> + </target> + <target name="clean"> <!-- Delete the ${build} directory tree --> <delete dir="${dist}"/> Modified: jetrix/trunk/src/site/changelog.php =================================================================== --- jetrix/trunk/src/site/changelog.php 2008-08-22 14:56:48 UTC (rev 735) +++ jetrix/trunk/src/site/changelog.php 2008-08-22 15:11:15 UTC (rev 736) @@ -7,7 +7,7 @@ ------------------------------------- - Fixed a bug preventing the clients from connecting to a server with a default charset different from ISO-8859-1 -- The configuration is no longer broken by a "&" char in the description of a channel +- The configuration is no longer broken by a "&" char in the description of a channel Changes in version 0.2.1 (2005-02-18) ------------------------------------- Modified: jetrix/trunk/src/site/features.php =================================================================== --- jetrix/trunk/src/site/features.php 2008-08-22 14:56:48 UTC (rev 735) +++ jetrix/trunk/src/site/features.php 2008-08-22 15:11:15 UTC (rev 736) @@ -1,11 +1,5 @@ <? include("header.inc.php") ?> -<style type="text/css"> -.done { list-style-image: url("images/done.png") } -.planned { list-style-image: url("images/planned.png") } -.partial { list-style-image: url("images/partial.png") } -</style> - <h1>Features</h1> <b>Legend:</b> @@ -42,7 +36,7 @@ <li class="done"> TetriFast clients</li> <li class="done"> Block synchronization protocol (1.14)</li> <li class="done"> TSpec clients</li> - <li class="planned"> Flash clients</li> + <!--<li class="planned"> Flash clients</li>--> <li class="done"> Query protocol</li> <li class="partial"> IRC clients</li> </ul> Modified: jetrix/trunk/src/site/header.inc.php =================================================================== --- jetrix/trunk/src/site/header.inc.php 2008-08-22 14:56:48 UTC (rev 735) +++ jetrix/trunk/src/site/header.inc.php 2008-08-22 15:11:15 UTC (rev 736) @@ -15,7 +15,7 @@ <meta name="description" content="Jetrix is a new generation TetriNET server written in Java and designed for maximum scalability and extensibility." /> <meta name="keywords" content="jetrix, tetrinet, server, tnet, tetrifast, tfast, tspec, tetris, tetrix, java" /> <link rel="stylesheet" href="style.css" /> - <link rel="shortcut icon" href="images/favicon.gif" /> + <link rel="shorcut icon" type="image/x-icon" href="favicon.ico" /> <link rel="alternate" type="application/rss+xml" title="RSS" href="http://sourceforge.net/export/rss2_projnews.php?group_id=52188&rss_fulltext=1" /> <title>Jetrix TetriNET Server</title> </head> Added: jetrix/trunk/src/site/jetrix-rss.xsl =================================================================== --- jetrix/trunk/src/site/jetrix-rss.xsl (rev 0) +++ jetrix/trunk/src/site/jetrix-rss.xsl 2008-08-22 15:11:15 UTC (rev 736) @@ -0,0 +1,14 @@ +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + <xsl:output method="html" indent="yes"/> + + <xsl:template match="item"> + <div class="news"> + <h2><xsl:value-of select="title"/></h2> + <div class="newsdate"><xsl:value-of select="pubDate"/></div> + <div class="newstext"><xsl:value-of select="description"/></div> + </div> + </xsl:template> + + <xsl:template match="text()"/> + +</xsl:stylesheet> Modified: jetrix/trunk/src/site/menu.inc.php =================================================================== --- jetrix/trunk/src/site/menu.inc.php 2008-08-22 14:56:48 UTC (rev 735) +++ jetrix/trunk/src/site/menu.inc.php 2008-08-22 15:11:15 UTC (rev 736) @@ -21,7 +21,7 @@ <li><a href="user-guide.php">User Guide</a></li> <li><a href="dev-guide.php">Developper Guide</a></li> <li><a href="javadoc.php">Javadoc</a></li> - <li><a href="docs/maven-reports.html">Project Reports</a></li> + <li><a href="docs/project-reports.html">Project Reports</a></li> </ul> <h1>Project</h1> @@ -31,7 +31,7 @@ <li><a href="http://sourceforge.net/tracker/?group_id=52188&atid=466002">Bugs</a></li> <li><a href="http://sourceforge.net/tracker/?group_id=52188&atid=466005">Feature Requests</a></li> <li><a href="changelog.php">Changelog</a></li> - <li><a href="docs/statcvs/commit_log.html">Commits</a></li> + <li><a href="docs/changelog.html">Commits</a></li> <li><a href="docs/team-list.html">Contributors</a></li> </ul> </div> Modified: jetrix/trunk/src/site/style.css =================================================================== --- jetrix/trunk/src/site/style.css 2008-08-22 14:56:48 UTC (rev 735) +++ jetrix/trunk/src/site/style.css 2008-08-22 15:11:15 UTC (rev 736) @@ -37,3 +37,8 @@ .newsdate { font-size: 9pt; font-style: italic; } .newstext { margin-top: 1em; } + +/* Features */ +.done { list-style-image: url("images/done.png") } +.planned { list-style-image: url("images/planned.png") } +.partial { list-style-image: url("images/partial.png") } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sm...@us...> - 2008-08-26 07:31:51
|
Revision: 738 http://jetrix.svn.sourceforge.net/jetrix/?rev=738&view=rev Author: smanux Date: 2008-08-26 07:31:46 +0000 (Tue, 26 Aug 2008) Log Message: ----------- Updated the changelog for Jetrix 0.2.3 Modified Paths: -------------- jetrix/trunk/doc/changelog.txt jetrix/trunk/src/site/changelog.php Modified: jetrix/trunk/doc/changelog.txt =================================================================== --- jetrix/trunk/doc/changelog.txt 2008-08-22 15:27:52 UTC (rev 737) +++ jetrix/trunk/doc/changelog.txt 2008-08-26 07:31:46 UTC (rev 738) @@ -24,12 +24,20 @@ - removed the dependency on JDIC +Changes in version 0.2.3 (2008-08-23) +------------------------------------- + +- Fixed a bug in the mode 4 (25% pure) of the #custom channel that was causing a crash of the classic tnet 1.13 client +- The address of the server is now published to http://servers.tetrinet.fr instead of tsrv.com, tetrinet.org and tfast.org + + Changes in version 0.2.2 (2005-04-07) ------------------------------------- - Fixed a bug preventing the clients from connecting to a server with a default charset different from ISO-8859-1 - The configuration is no longer broken by a "&" char in the description of a channel + Changes in version 0.2.1 (2005-02-18) ------------------------------------- @@ -39,6 +47,7 @@ - Running Jetrix with jetrix.exe no longer saturate the CPU - Fixed a bug preventing the execution of several query commands with the same connection + Changes in version 0.2.1 (2005-02-18) ------------------------------------- Modified: jetrix/trunk/src/site/changelog.php =================================================================== --- jetrix/trunk/src/site/changelog.php 2008-08-22 15:27:52 UTC (rev 737) +++ jetrix/trunk/src/site/changelog.php 2008-08-26 07:31:46 UTC (rev 738) @@ -3,12 +3,20 @@ <h1>Changelog</h1> <pre> +Changes in version 0.2.3 (2008-08-23) +------------------------------------- + +- Fixed a bug in the mode 4 (25% pure) of the #custom channel that was causing a crash of the classic tnet 1.13 client +- The address of the server is now published to http://servers.tetrinet.fr instead of tsrv.com, tetrinet.org and tfast.org + + Changes in version 0.2.2 (2005-04-07) ------------------------------------- - Fixed a bug preventing the clients from connecting to a server with a default charset different from ISO-8859-1 - The configuration is no longer broken by a "&" char in the description of a channel + Changes in version 0.2.1 (2005-02-18) ------------------------------------- @@ -18,6 +26,7 @@ - Running Jetrix with jetrix.exe no longer saturate the CPU - Fixed a bug preventing the execution of several query commands with the same connection + Changes in version 0.2 (2005-01-18) ----------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sm...@us...> - 2008-08-27 09:22:19
|
Revision: 743 http://jetrix.svn.sourceforge.net/jetrix/?rev=743&view=rev Author: smanux Date: 2008-08-27 09:22:05 +0000 (Wed, 27 Aug 2008) Log Message: ----------- Full documentation of the tetrinet 1.14 extension Implemented the tetrinet random number generator Modified Paths: -------------- jetrix/trunk/pom.xml jetrix/trunk/project.properties jetrix/trunk/project.xml jetrix/trunk/src/etc/README jetrix/trunk/src/java/net/jetrix/filter/GenericFilter.java jetrix/trunk/src/java/net/jetrix/filter/package.html jetrix/trunk/src/site/dev-guide.php jetrix/trunk/src/site/index.php jetrix/trunk/src/site/menu.inc.php Added Paths: ----------- jetrix/trunk/src/java/net/jetrix/tools/TetrinetRandomGenerator.java jetrix/trunk/src/site/images/blocks/ jetrix/trunk/src/site/images/blocks/halfcross1.png jetrix/trunk/src/site/images/blocks/halfcross2.png jetrix/trunk/src/site/images/blocks/halfcross3.png jetrix/trunk/src/site/images/blocks/halfcross4.png jetrix/trunk/src/site/images/blocks/leftl1.png jetrix/trunk/src/site/images/blocks/leftl2.png jetrix/trunk/src/site/images/blocks/leftl3.png jetrix/trunk/src/site/images/blocks/leftl4.png jetrix/trunk/src/site/images/blocks/leftz1.png jetrix/trunk/src/site/images/blocks/leftz2.png jetrix/trunk/src/site/images/blocks/line1.png jetrix/trunk/src/site/images/blocks/line2.png jetrix/trunk/src/site/images/blocks/rightl1.png jetrix/trunk/src/site/images/blocks/rightl2.png jetrix/trunk/src/site/images/blocks/rightl3.png jetrix/trunk/src/site/images/blocks/rightl4.png jetrix/trunk/src/site/images/blocks/rightz1.png jetrix/trunk/src/site/images/blocks/rightz2.png jetrix/trunk/src/site/images/blocks/square.png jetrix/trunk/src/test/net/jetrix/tools/TetrinetRandomGeneratorTest.java Modified: jetrix/trunk/pom.xml =================================================================== --- jetrix/trunk/pom.xml 2008-08-26 13:31:14 UTC (rev 742) +++ jetrix/trunk/pom.xml 2008-08-27 09:22:05 UTC (rev 743) @@ -12,7 +12,7 @@ Jetrix is a new generation TetriNET server written in Java and designed for maximum scalability, extensibility and ease of use. It features a web based administration console and a simple API - to let developpers add custom commands or change the channels' + to let developers add custom commands or change the channels' behavior with little knowledge of the server's inner functioning. The ambitious goal of this project is to create the ideal plateform for server side TetriNET programmers. Jetrix is open source and @@ -126,12 +126,14 @@ <groupId>jetty</groupId> <artifactId>jetty</artifactId> <version>4.1-rc1</version> + <optional>true</optional> </dependency> <dependency> <groupId>jcrontab</groupId> <artifactId>jcrontab</artifactId> <version>1.4.1</version> + <optional>true</optional> </dependency> <!-- Needed for testing --> @@ -139,7 +141,7 @@ <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.2</version> - <scope>tests</scope> + <scope>test</scope> </dependency> </dependencies> Modified: jetrix/trunk/project.properties =================================================================== --- jetrix/trunk/project.properties 2008-08-26 13:31:14 UTC (rev 742) +++ jetrix/trunk/project.properties 2008-08-27 09:22:05 UTC (rev 743) @@ -1,5 +1,5 @@ version=0.3-dev -version.stable=0.2.2 +version.stable=0.2.3 maven.junit.fork=true maven.junit.dir=target/test-classes Modified: jetrix/trunk/project.xml =================================================================== --- jetrix/trunk/project.xml 2008-08-26 13:31:14 UTC (rev 742) +++ jetrix/trunk/project.xml 2008-08-27 09:22:05 UTC (rev 743) @@ -19,7 +19,7 @@ Jetrix is a new generation TetriNET server written in Java and designed for maximum scalability, extensibility and ease of use. It features a web based administration console and a simple API - to let developpers add custom commands or change the channels' + to let developers add custom commands or change the channels' behavior with little knowledge of the server's inner functioning. The ambitious goal of this project is to create the ideal plateform for server side TetriNET programmers. Jetrix is open source and Modified: jetrix/trunk/src/etc/README =================================================================== --- jetrix/trunk/src/etc/README 2008-08-26 13:31:14 UTC (rev 742) +++ jetrix/trunk/src/etc/README 2008-08-27 09:22:05 UTC (rev 743) @@ -6,7 +6,7 @@ Jetrix is a new generation TetriNET server written in Java and designed for maximum scalability, extensibility and ease of use. It features a web based administration console and a simple API - to let developpers add custom commands or change the channels' + to let developers add custom commands or change the channels' behavior with little knowledge of the server's inner functioning. The ambitious goal of this project is to create the ideal plateform for server side TetriNET programmers. Jetrix is open source and @@ -14,8 +14,8 @@ Installing & Running Jetrix - You need a JRE 1.5 or higher installed on your server to run Jetrix. - You can download it here : http://java.sun.com/j2se/1.5.0/download.jsp + You need Java 6 or higher installed on your server to run Jetrix. + You can download it here : http://java.sun.com/j2se/1.6.0/download.jsp Unix @@ -23,7 +23,7 @@ JAVA_HOME environnement variable pointing to your Java directory. For example on Linux you can add this line to your /etc/profile file: - export JAVA_HOME=/usr/java/jre_1.5.0 + export JAVA_HOME=/usr/java/jre_1.6.0 Then decompress the Jetrix archive to the installation directory: Modified: jetrix/trunk/src/java/net/jetrix/filter/GenericFilter.java =================================================================== --- jetrix/trunk/src/java/net/jetrix/filter/GenericFilter.java 2008-08-26 13:31:14 UTC (rev 742) +++ jetrix/trunk/src/java/net/jetrix/filter/GenericFilter.java 2008-08-27 09:22:05 UTC (rev 743) @@ -26,7 +26,7 @@ import net.jetrix.messages.*; /** - * Defines a generic filter to be used and extended by filter developpers. + * Defines a generic filter to be used and extended by filter developers. * GenericFilter makes writing filters easier by dispatching messages to an * appropriate method according to the type of this message (onPline(), * onStartGame(), etc...). Modified: jetrix/trunk/src/java/net/jetrix/filter/package.html =================================================================== --- jetrix/trunk/src/java/net/jetrix/filter/package.html 2008-08-26 13:31:14 UTC (rev 742) +++ jetrix/trunk/src/java/net/jetrix/filter/package.html 2008-08-27 09:22:05 UTC (rev 743) @@ -3,7 +3,7 @@ Contains concrete {@link net.jetrix.filter.MessageFilter} implementations. {@link net.jetrix.filter.GenericFilter} provides a high level implementation ready to handle all Jetrix messages. For more information regarding filters get -a look at the <a href="http://jetrix.sourceforge.net/dev-guide.php">Developper +a look at the <a href="http://jetrix.sourceforge.net/dev-guide.php">Developer Guide</a> available on the website. </body> </html> Added: jetrix/trunk/src/java/net/jetrix/tools/TetrinetRandomGenerator.java =================================================================== --- jetrix/trunk/src/java/net/jetrix/tools/TetrinetRandomGenerator.java (rev 0) +++ jetrix/trunk/src/java/net/jetrix/tools/TetrinetRandomGenerator.java 2008-08-27 09:22:05 UTC (rev 743) @@ -0,0 +1,55 @@ +/** + * Jetrix TetriNET Server + * Copyright (C) 2008 Emmanuel Bourg + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +package net.jetrix.tools; + +/** + * Random number generator used by Tetrinet (ie. the Random() function in Delphi) + * + * @author Emmanuel Bourg + * @version $Revision$, $Date$ + */ +public class TetrinetRandomGenerator +{ + private static final int INCREMENT = 1; + private static final int MULTIPLIER = 0x08088405; + private static final long MODULUS = 0x100000000L; + + private long value; + + public TetrinetRandomGenerator(int seed) + { + this.value = seed; + } + + public long getValue() + { + return value; + } + + public synchronized int nextInt(int L) { + nextValue(); + + return (int) (value * L >> 32); + } + + void nextValue() { + value = (MULTIPLIER * value + INCREMENT) % MODULUS; + } +} Property changes on: jetrix/trunk/src/java/net/jetrix/tools/TetrinetRandomGenerator.java ___________________________________________________________________ Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native Modified: jetrix/trunk/src/site/dev-guide.php =================================================================== --- jetrix/trunk/src/site/dev-guide.php 2008-08-26 13:31:14 UTC (rev 742) +++ jetrix/trunk/src/site/dev-guide.php 2008-08-27 09:22:05 UTC (rev 743) @@ -1,17 +1,19 @@ <? include("header.inc.php") ?> -<h1>Developper Guide</h1> +<h1>Developer Guide</h1> <h2>Table of Contents</h2> <ol> + <!--<li><a href="#section0">Developing with Jetrix</a></li>--> <li><a href="#section1">Architecture</a></li> <li><a href="#section2">Protocols</a> <ul> - <li><a href="#section2-1">TetriNET</a></li> - <li><a href="#section2-2">TetriFast</a></li> - <li><a href="#section2-3">TSpec</a></li> - <li><a href="#section2-4">Query</a></li> + <li><a href="#section2-1">TetriNET 1.13</a></li> + <li><a href="#section2-2">TetriNET 1.14</a></li> + <li><a href="#section2-3">TetriFast</a></li> + <li><a href="#section2-4">TSpec</a></li> + <li><a href="#section2-5">Query</a></li> </ul> </li> <li><a href="#section3">Customization</a> @@ -23,7 +25,16 @@ </li> </ol> +<!-- +<h1><a id="section0"></a>Developing with Jetrix</h1> +@todo + +installing the JDK + +installing & using Apache Ant +--> + <h1><a id="section1"></a>Architecture</h1> Jetrix is designed around the concept of independant threads communicating asynchronously with messages. The three main entities are : @@ -39,21 +50,300 @@ <h1><a id="section2"></a>Protocols</h1> -<h2><a id="section2-1"></a>TetriNET</h2> +<h2><a id="section2-1"></a>TetriNET 1.13</h2> -<h3>Login</h3> +External references: -<h3>Channel Messages</h3> +<ul> + <li><a href="http://knarf2.cheztaz.com/tetrinet.html">Description du protocole TetriNET par knarf2 (french)</a></li> + <li><a href="http://web.archive.org/web/20040413185025/home.planetinternet.be/~m0217000/tsrv/tetrinetproto.htm">Tetrinet protocol on TSRV.COM (archived)</a></li> +</ul> -<h3>Game Messages</h3> +<h2><a id="section2-2"></a>TetriNET 1.14</h2> -<h2><a id="section2-2"></a>TetriFast</h2> +The version 1.14 of the TetriNET protocol is an extension introduced by +Olivier Vidal in August 2003 allowing players to get the same sequence of +blocks. This protocol was first integrated to a server in Jetrix 0.1.3. It +works by adding an extra parameter at the end of the newgame command: -The TetriFast protocol is quite similar to the TetriNET protocol, it has just -been slightly modified to prevent TetriFast clients to connect and cheat on -regular TetriNET servers. +<div class="code">newgame 0 1 2 1 2 1 18 <blocks frequency array> <specials frequency array> 1 1 <b>2A1C21B6</b></div> +The parameter <tt>2A1C21B6</tt> is actually the hexadecimal representation of a +32 bits integer. It determines the seed of the random number generator used by +TetriNET to generate the blocks (see bellow). The number must be zero padded +to 8 digits and use the little endian format. For example <tt>0x123</tt> will +be added as <tt>00000123</tt>. + + +<h3>TetriNET Pseudo Random Number Generator</h3> + +<p>The original TetriNET client designed by St0rmCat uses the standard random +function available in Delphi. It's basically a <a href="http://en.wikipedia.org/wiki/Linear_congruential_generator">linear congruential generator</a>, +the recursive sequence is defined by:</p> + +<div class="code">s<sub>n+1</sub> = (a.s<sub>n</sub> + c) mod M</div> + +<p>with the following parameters:</p> + +<div class="code">a = 0x08088405 +c = 1 +M = 2<sup>32</sup> +</div> + +<p>The seed s<sub><small>0</small></sub> is determined by the last parameter of +the <tt>newgame</tt> message. This sequence gives pseudo random integers between +0 and 2<sup><small>32</small></sup> - 1, but an integer in the [0, 100[ +range is required for selecting the block, and an integer in the [0, 4[ range +for the orientation of the block. So the result is multiplied by the length of +the range and divided by 2<sup><small>32</small></sup>:</p> + +<div class="code">I<sub>n</sub> = s<sub>n</sub> * L / 2<sup><small>32</small></sup></div> + +<p>Where L=100 to select the block and L=4 to select its orientation. The +sequence s<sub><small>n</small></sub> is evaluated twice to determine each block, first for the block +and then for its orientation.</p> + +<p>The following table defines the orientations for each type of block :</p> + +<table class="thin"> + <tr> + <th width="100">Orientation</th> + <th width="75">0</th> + <th width="75">1</th> + <th width="75">2</th> + <th width="75">3</th> + </tr> + <tr> + <th>Line</th> + <td><img src="images/blocks/line1.png" alt="Line"/></td> + <td><img src="images/blocks/line2.png" alt="Line"/></td> + <td><img src="images/blocks/line1.png" alt="Line"/></td> + <td><img src="images/blocks/line2.png" alt="Line"/></td> + </tr> + <tr> + <th>Square</th> + <td><img src="images/blocks/square.png" alt="Square"/></td> + <td><img src="images/blocks/square.png" alt="Square"/></td> + <td><img src="images/blocks/square.png" alt="Square"/></td> + <td><img src="images/blocks/square.png" alt="Square"/></td> + </tr> + <tr> + <th>Left L</th> + <td><img src="images/blocks/leftl1.png" alt="Left L"/></td> + <td><img src="images/blocks/leftl2.png" alt="Left L"/></td> + <td><img src="images/blocks/leftl3.png" alt="Left L"/></td> + <td><img src="images/blocks/leftl4.png" alt="Left L"/></td> + </tr> + <tr> + <th>Right L</th> + <td><img src="images/blocks/rightl1.png" alt="Right L"/></td> + <td><img src="images/blocks/rightl2.png" alt="Right L"/></td> + <td><img src="images/blocks/rightl3.png" alt="Right L"/></td> + <td><img src="images/blocks/rightl4.png" alt="Right L"/></td> + </tr> + <tr> + <th>Left Z</th> + <td><img src="images/blocks/leftz1.png" alt="Left Z"/></td> + <td><img src="images/blocks/leftz2.png" alt="Left Z"/></td> + <td><img src="images/blocks/leftz1.png" alt="Left Z"/></td> + <td><img src="images/blocks/leftz2.png" alt="Left Z"/></td> + </tr> + <tr> + <th>Right Z</th> + <td><img src="images/blocks/rightz1.png" alt="Right Z"/></td> + <td><img src="images/blocks/rightz2.png" alt="Right Z"/></td> + <td><img src="images/blocks/rightz1.png" alt="Right Z"/></td> + <td><img src="images/blocks/rightz2.png" alt="Right Z"/></td> + </tr> + <tr> + <th>Half Cross</th> + <td><img src="images/blocks/halfcross1.png" alt="Half Cross"/></td> + <td><img src="images/blocks/halfcross2.png" alt="Half Cross"/></td> + <td><img src="images/blocks/halfcross3.png" alt="Half Cross"/></td> + <td><img src="images/blocks/halfcross4.png" alt="Half Cross"/></td> + </tr> +</table> + + + +<h3>Examples</h3> + +<p>Here are some examples of block sequences for different seed values. This might +help client programmers to validate their random number generator. The frequencies +for these examples are :</p> + +<table class="thin" style="width: 300px"> + <tr> + <th align="center" colspan="2">Block</th> + <th align="center" width="30%">Frequency</th> + </tr> + <tr> + <td align="center" width="10%">1</td> + <td align="center"><img src="/images/blocks/small/line.png" alt="Line" /></td> + <td align="center">15 %</td> + </tr> + <tr> + <td align="center">2</td> + <td align="center"><img src="/images/blocks/small/square.png" alt="Square" /></td> + <td align="center">15 %</td> + </tr> + <tr> + <td align="center">3</td> + <td align="center"><img src="/images/blocks/small/leftl.png" alt="Left L" /></td> + <td align="center">14 %</td> + </tr> + <tr> + <td align="center">4</td> + <td align="center"><img src="/images/blocks/small/rightl.png" alt="Right L" /></td> + <td align="center">14 %</td> + </tr> + <tr> + <td align="center">5</td> + <td align="center"><img src="/images/blocks/small/leftz.png" alt="Left Z" /></td> + <td align="center">14 %</td> + </tr> + <tr> + <td align="center">6</td> + <td align="center"><img src="/images/blocks/small/rightz.png" alt="Right Z" /></td> + <td align="center">14 %</td> + </tr> + <tr> + <td align="center">7</td> + <td align="center"><img src="/images/blocks/small/halfcross.png" alt="Half Cross" /></td> + <td align="center">14 %</td> + </tr> +</table> + +<br /> + +The corresponding frequency table is : + +<div class="code">F = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 4,4,4,4,4,4,4,4,4,4,4,4,4,4, + 5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7]</div> + +<p>For this example the value of the seed is 0.</p> + +<table class="thin"> + <tr> + <th width="100">Blocks</th> + <th width="150">Sequence</th> + <th width="100">Index</th> + <th width="100">Result</th> + </tr> + <tr> + <td rowspan="2" valign="middle">Block 1</td> + <td>s1 = 0x00000001</td> + <td>0</td> + <td rowspan="2" valign="middle"><img src="images/blocks/line1.png" alt="Line"/></td> + </tr> + <tr> + <td>s2 = 0x08088406</td> + <td>0</td> + </tr> + <tr> + <td rowspan="2" valign="middle">Block 2</td> + <td>s3 = 0xDC6DAC1F</td> + <td>86</td> + <td rowspan="2" valign="middle"><img src="images/blocks/halfcross1.png" alt="Half Cross"/></td> + </tr> + <tr> + <td>s4 = 0x33DC589C</td> + <td>0</td> + </tr> + <tr> + <td rowspan="2" valign="middle">Block 3</td> + <td>s5 = 0x45DE2B0D</td> + <td>27</td> + <td rowspan="2" valign="middle"><img src="images/blocks/square.png" alt="Square"/></td> + </tr> + <tr> + <td>s6 = 0xABF18B42</td> + <td>2</td> + </tr> + + <tr> + <td rowspan="2" valign="middle">Block 4</td> + <td>s7 = 0x5195C04B</td> + <td>31</td> + <td rowspan="2" valign="middle"><img src="images/blocks/leftl1.png" alt="Left L"/></td> + </tr> + <tr> + <td>s8 = 0x296B6D78</td> + <td>0</td> + </tr> +</table> + + +<p>Here are the 10 first blocks for different seed values:</p> + +<table class="thin" cellspacing="1"> + <tbody> + <tr> + <th>Seed</th> + <th>Sequence</th> + </tr> + <tr> + <td>0x00000000</td> + <td> + <img src="images/blocks/line1.png"/> + <img src="images/blocks/halfcross1.png"/> + <img src="images/blocks/square.png"/> + <img src="images/blocks/leftl1.png"/> + <img src="images/blocks/leftl4.png"/> + <img src="images/blocks/line2.png"/> + <img src="images/blocks/line2.png"/> + <img src="images/blocks/line2.png"/> + <img src="images/blocks/halfcross4.png"/> + <img src="images/blocks/leftz2.png"/> + </td> + </tr> + <tr> + <td>0xAABBCCDD</td> + <td> + <img src="images/blocks/rightl4.png"/> + <img src="images/blocks/rightl4.png"/> + <img src="images/blocks/leftl1.png"/> + <img src="images/blocks/leftl3.png"/> + <img src="images/blocks/square.png"/> + <img src="images/blocks/rightz2.png"/> + <img src="images/blocks/square.png"/> + <img src="images/blocks/rightl4.png"/> + <img src="images/blocks/halfcross3.png"/> + <img src="images/blocks/rightl1.png"/> + </td> + </tr> + <tr> + <td>0x12345678</td> + <td> + <img src="images/blocks/leftz2.png"/> + <img src="images/blocks/leftz2.png"/> + <img src="images/blocks/halfcross2.png"/> + <img src="images/blocks/rightz2.png"/> + <img src="images/blocks/leftl2.png"/> + <img src="images/blocks/rightz1.png"/> + <img src="images/blocks/rightz2.png"/> + <img src="images/blocks/halfcross1.png"/> + <img src="images/blocks/line2.png"/> + <img src="images/blocks/rightl1.png"/> + </td> + </tr> + </tbody> +</table> + + +<h2><a id="section2-3"></a>TetriFast</h2> + +TetriFast is a modified TetriNET client that removes the delay between the +block fall and the showing of next block. The TetriFast protocol is quite +similar to the TetriNET protocol, it has just been slightly modified to prevent +TetriFast clients to connect and cheat on regular TetriNET servers. + <h3>Login</h3> TetriFast clients connect on the same port as TetriNET client, that's 31457. The @@ -72,10 +362,10 @@ -<h2><a id="section2-3"></a>TSpec</h2> +<h2><a id="section2-4"></a>TSpec</h2> -<h2><a id="section2-4"></a>Query</h2> +<h2><a id="section2-5"></a>Query</h2> Tetrix first introduced a query protocol to get easily a list of players and channels on TetriNET servers. This protocol consists in 4 commands : Property changes on: jetrix/trunk/src/site/images/blocks/halfcross1.png ___________________________________________________________________ Added: svn:mime-type + image/png Property changes on: jetrix/trunk/src/site/images/blocks/halfcross2.png ___________________________________________________________________ Added: svn:mime-type + image/png Property changes on: jetrix/trunk/src/site/images/blocks/halfcross3.png ___________________________________________________________________ Added: svn:mime-type + image/png Property changes on: jetrix/trunk/src/site/images/blocks/halfcross4.png ___________________________________________________________________ Added: svn:mime-type + image/png Property changes on: jetrix/trunk/src/site/images/blocks/leftl1.png ___________________________________________________________________ Added: svn:mime-type + image/png Property changes on: jetrix/trunk/src/site/images/blocks/leftl2.png ___________________________________________________________________ Added: svn:mime-type + image/png Property changes on: jetrix/trunk/src/site/images/blocks/leftl3.png ___________________________________________________________________ Added: svn:mime-type + image/png Property changes on: jetrix/trunk/src/site/images/blocks/leftl4.png ___________________________________________________________________ Added: svn:mime-type + image/png Property changes on: jetrix/trunk/src/site/images/blocks/leftz1.png ___________________________________________________________________ Added: svn:mime-type + image/png Property changes on: jetrix/trunk/src/site/images/blocks/leftz2.png ___________________________________________________________________ Added: svn:mime-type + image/png Property changes on: jetrix/trunk/src/site/images/blocks/line1.png ___________________________________________________________________ Added: svn:mime-type + image/png Property changes on: jetrix/trunk/src/site/images/blocks/line2.png ___________________________________________________________________ Added: svn:mime-type + image/png Property changes on: jetrix/trunk/src/site/images/blocks/rightl1.png ___________________________________________________________________ Added: svn:mime-type + image/png Property changes on: jetrix/trunk/src/site/images/blocks/rightl2.png ___________________________________________________________________ Added: svn:mime-type + image/png Property changes on: jetrix/trunk/src/site/images/blocks/rightl3.png ___________________________________________________________________ Added: svn:mime-type + image/png Property changes on: jetrix/trunk/src/site/images/blocks/rightl4.png ___________________________________________________________________ Added: svn:mime-type + image/png Property changes on: jetrix/trunk/src/site/images/blocks/rightz1.png ___________________________________________________________________ Added: svn:mime-type + image/png Property changes on: jetrix/trunk/src/site/images/blocks/rightz2.png ___________________________________________________________________ Added: svn:mime-type + image/png Property changes on: jetrix/trunk/src/site/images/blocks/square.png ___________________________________________________________________ Added: svn:mime-type + image/png Modified: jetrix/trunk/src/site/index.php =================================================================== --- jetrix/trunk/src/site/index.php 2008-08-26 13:31:14 UTC (rev 742) +++ jetrix/trunk/src/site/index.php 2008-08-27 09:22:05 UTC (rev 743) @@ -5,7 +5,7 @@ Jetrix is a new generation TetriNET server written in Java and designed for maximum scalability, extensibility and ease of use. It features a web based administration console and a simple API -to let developpers add custom commands or change the channels' +to let developers add custom commands or change the channels' behavior with little knowledge of the server's inner functioning. The ambitious goal of this project is to create the ideal plateform for server side TetriNET programmers. Jetrix is open source and Modified: jetrix/trunk/src/site/menu.inc.php =================================================================== --- jetrix/trunk/src/site/menu.inc.php 2008-08-26 13:31:14 UTC (rev 742) +++ jetrix/trunk/src/site/menu.inc.php 2008-08-27 09:22:05 UTC (rev 743) @@ -19,7 +19,7 @@ <h1>Documentation</h1> <ul> <li><a href="user-guide.php">User Guide</a></li> - <li><a href="dev-guide.php">Developper Guide</a></li> + <li><a href="dev-guide.php">Developer Guide</a></li> <li><a href="javadoc.php">Javadoc</a></li> <li><a href="docs/project-reports.html">Project Reports</a></li> </ul> Added: jetrix/trunk/src/test/net/jetrix/tools/TetrinetRandomGeneratorTest.java =================================================================== --- jetrix/trunk/src/test/net/jetrix/tools/TetrinetRandomGeneratorTest.java (rev 0) +++ jetrix/trunk/src/test/net/jetrix/tools/TetrinetRandomGeneratorTest.java 2008-08-27 09:22:05 UTC (rev 743) @@ -0,0 +1,68 @@ +/** + * Jetrix TetriNET Server + * Copyright (C) 2008 Emmanuel Bourg + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +package net.jetrix.tools; + +import junit.framework.TestCase; + +/** + * @author Emmanuel Bourg + * @version $Revision$, $Date$ + */ +public class TetrinetRandomGeneratorTest extends TestCase +{ + public void testRandom() { + TetrinetRandomGenerator generator = new TetrinetRandomGenerator(0); + + assertEquals("s0", 0x00000000L, generator.getValue()); + generator.nextValue(); + assertEquals("s1", 0x00000001L, generator.getValue()); + generator.nextValue(); + assertEquals("s2", 0x08088406L, generator.getValue()); + generator.nextValue(); + assertEquals("s3", 0xDC6DAC1FL, generator.getValue()); + generator.nextValue(); + assertEquals("s4", 0x33DC589CL, generator.getValue()); + generator.nextValue(); + assertEquals("s5", 0x45DE2B0DL, generator.getValue()); + } + + public void testNextInt() { + TetrinetRandomGenerator generator = new TetrinetRandomGenerator(0); + + assertEquals("i1", 0x00, generator.nextInt(100)); + assertEquals("i2", 0x00, generator.nextInt(4)); + assertEquals("i3", 0x56, generator.nextInt(100)); + assertEquals("i4", 0x00, generator.nextInt(4)); + assertEquals("i5", 0x1B, generator.nextInt(100)); + assertEquals("i6", 0x02, generator.nextInt(4)); + assertEquals("i7", 0x1F, generator.nextInt(100)); + assertEquals("i8", 0x00, generator.nextInt(4)); + assertEquals("i9", 0x25, generator.nextInt(100)); + assertEquals("i10", 0x01, generator.nextInt(4)); + assertEquals("i11", 0x08, generator.nextInt(100)); + assertEquals("i12", 0x01, generator.nextInt(4)); + assertEquals("i13", 0x07, generator.nextInt(100)); + assertEquals("i14", 0x03, generator.nextInt(4)); + assertEquals("i15", 0x05, generator.nextInt(100)); + assertEquals("i16", 0x01, generator.nextInt(4)); + assertEquals("i17", 0x5B, generator.nextInt(100)); + assertEquals("i18", 0x01, generator.nextInt(4)); + } +} Property changes on: jetrix/trunk/src/test/net/jetrix/tools/TetrinetRandomGeneratorTest.java ___________________________________________________________________ Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sm...@us...> - 2008-08-27 14:36:48
|
Revision: 744 http://jetrix.svn.sourceforge.net/jetrix/?rev=744&view=rev Author: smanux Date: 2008-08-27 14:36:45 +0000 (Wed, 27 Aug 2008) Log Message: ----------- Implemented the TServ mode of the tspec protocol Modified Paths: -------------- jetrix/trunk/doc/changelog.txt jetrix/trunk/src/java/net/jetrix/clients/TSpecClient.java jetrix/trunk/src/java/net/jetrix/listeners/TSpecListener.java jetrix/trunk/src/java/net/jetrix/protocols/TspecProtocol.java Modified: jetrix/trunk/doc/changelog.txt =================================================================== --- jetrix/trunk/doc/changelog.txt 2008-08-27 09:22:05 UTC (rev 743) +++ jetrix/trunk/doc/changelog.txt 2008-08-27 14:36:45 UTC (rev 744) @@ -10,6 +10,7 @@ - Implemented the channel operator access level. It's now possible to restrict some commands to the first player in the channel (/move, /start...) - Added support for the client identification protocol (i.e lvl 0 0 request, clientinfo response) - The number of players and spectators currently online is now displayed on logging in +- The 'TServ' mode of TSpec is now supported Admin visible changes - Jetrix now requires Java 6 Modified: jetrix/trunk/src/java/net/jetrix/clients/TSpecClient.java =================================================================== --- jetrix/trunk/src/java/net/jetrix/clients/TSpecClient.java 2008-08-27 09:22:05 UTC (rev 743) +++ jetrix/trunk/src/java/net/jetrix/clients/TSpecClient.java 2008-08-27 14:36:45 UTC (rev 744) @@ -19,6 +19,11 @@ package net.jetrix.clients; +import java.io.IOException; + +import net.jetrix.Message; +import net.jetrix.messages.SmsgMessage; + /** * Spectator client. * @@ -27,8 +32,40 @@ */ public class TSpecClient extends TetrinetClient { + public static final int TETRIX_MODE = 0; + public static final int TSERV_MODE = 1; + + private int mode; + + public void setMode(int mode) + { + this.mode = mode; + } + + public int getMode() + { + return mode; + } + protected boolean isAsynchronous() { return false; } + + public Message receive() throws IOException + { + Message message = super.receive(); + + if (message instanceof SmsgMessage && mode == TSERV_MODE) + { + SmsgMessage smsg = (SmsgMessage) message; + if (smsg.isPrivate()) + { + // echo the message to the player + send(message); + } + } + + return message; + } } Modified: jetrix/trunk/src/java/net/jetrix/listeners/TSpecListener.java =================================================================== --- jetrix/trunk/src/java/net/jetrix/listeners/TSpecListener.java 2008-08-27 09:22:05 UTC (rev 743) +++ jetrix/trunk/src/java/net/jetrix/listeners/TSpecListener.java 2008-08-27 14:36:45 UTC (rev 744) @@ -21,7 +21,6 @@ import java.io.*; import java.net.*; -import java.util.*; import net.jetrix.*; import net.jetrix.protocols.TspecProtocol; import net.jetrix.protocols.TetrinetProtocol; @@ -51,38 +50,38 @@ TetrinetProtocol protocol = ProtocolManager.getInstance().getProtocol(TetrinetProtocol.class); String init = protocol.readLine(new InputStreamReader(socket.getInputStream())); - String dec = TetrinetProtocol.decode(init); + TSpecClient client = new TSpecClient(); + client.setProtocol(ProtocolManager.getInstance().getProtocol(TspecProtocol.class)); + client.setSocket(socket); - // init string parsing "tetristart <nickname> <version>" - StringTokenizer st = new StringTokenizer(dec, " "); - List<String> tokens = new ArrayList<String>(); + User user = new User(); + user.setSpectator(); + client.setUser(user); - while (st.hasMoreTokens()) + // test if the client is using the tspec protocol (<nickname> <encoded password>) + if (init.contains(" ")) { - tokens.add(st.nextToken()); + client.setMode(TSpecClient.TSERV_MODE); + user.setName(init.substring(0, init.indexOf(" "))); } - - if (tokens.size() > 3) + else { - return null; - } + client.setMode(TSpecClient.TETRIX_MODE); + String dec = TetrinetProtocol.decode(init); - TSpecClient client = new TSpecClient(); - User user = new User(); - user.setName(tokens.get(1)); - user.setSpectator(); - client.setSocket(socket); - client.setUser(user); - client.setProtocol(ProtocolManager.getInstance().getProtocol(TspecProtocol.class)); + // init string parsing "tetristart <nickname> <version>" + String[] tokens = dec.split(" "); - if (tokens.size() > 3) - { - Message m = new NoConnectingMessage("No space allowed in nickname !"); - client.send(m); - return null; + if (tokens.length > 3) + { + Message m = new NoConnectingMessage("No space allowed in nickname !"); + client.send(m); + return null; + } + + user.setName(tokens[1]); } return client; } - } Modified: jetrix/trunk/src/java/net/jetrix/protocols/TspecProtocol.java =================================================================== --- jetrix/trunk/src/java/net/jetrix/protocols/TspecProtocol.java 2008-08-27 09:22:05 UTC (rev 743) +++ jetrix/trunk/src/java/net/jetrix/protocols/TspecProtocol.java 2008-08-27 14:36:45 UTC (rev 744) @@ -50,6 +50,8 @@ if (line.startsWith("pline") && !line.startsWith("plineact")) { + // pline message with the tetrix mode + SmsgMessage smsg = new SmsgMessage(); smsg.setSlot(Integer.parseInt(line.substring(6, 7))); @@ -76,7 +78,30 @@ message = smsg; } } + else if (line.startsWith("/pline")) + { + // pline message with the tserv mode + SmsgMessage smsg = new SmsgMessage(); + smsg.setText(line.substring("/pline".length())); + smsg.setPrivate(false); + message = smsg; + } + else if (line.startsWith("/")) + { + // direct command in tserv mode + line = "pline 1 " + line; + } + else if (line.startsWith("<") && line.contains(">")) + { + // private comment in tserv mode + SmsgMessage smsg = new SmsgMessage(); + smsg.setText(line.substring(line.indexOf(">") + 1).trim()); + smsg.setPrivate(true); + + message = smsg; + } + return message != null ? message : super.getMessage(line); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sm...@us...> - 2008-09-01 22:00:27
|
Revision: 752 http://jetrix.svn.sourceforge.net/jetrix/?rev=752&view=rev Author: smanux Date: 2008-09-01 22:00:25 +0000 (Mon, 01 Sep 2008) Log Message: ----------- Fixed the double click on the tray icon Improved the tray icon on Linux System tray links can now be opened on Linux and OS X Modified Paths: -------------- jetrix/trunk/build.xml jetrix/trunk/src/java/net/jetrix/SystrayManager.java Modified: jetrix/trunk/build.xml =================================================================== --- jetrix/trunk/build.xml 2008-08-28 08:20:33 UTC (rev 751) +++ jetrix/trunk/build.xml 2008-09-01 22:00:25 UTC (rev 752) @@ -107,6 +107,7 @@ </fileset> <fileset dir="${src}/etc/icons"> <include name="jetrix-16x16.png"/> + <include name="jetrix-32x32.png"/> </fileset> </jar> Modified: jetrix/trunk/src/java/net/jetrix/SystrayManager.java =================================================================== --- jetrix/trunk/src/java/net/jetrix/SystrayManager.java 2008-08-28 08:20:33 UTC (rev 751) +++ jetrix/trunk/src/java/net/jetrix/SystrayManager.java 2008-09-01 22:00:25 UTC (rev 752) @@ -19,19 +19,16 @@ package net.jetrix; -import java.awt.AWTException; -import java.awt.Font; -import java.awt.Image; -import java.awt.MenuItem; -import java.awt.PopupMenu; -import java.awt.SystemTray; -import java.awt.TrayIcon; +import java.awt.*; +import java.awt.image.ImageObserver; +import java.awt.image.ImageProducer; +import java.awt.image.BufferedImage; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.IOException; import java.util.logging.Level; import java.util.logging.Logger; -import javax.swing.ImageIcon; +import javax.swing.*; import net.jetrix.config.ServerConfig; import net.jetrix.listeners.HttpListener; @@ -108,23 +105,18 @@ menu.setFont(font); // build the trayIcon icon - Image icon = new ImageIcon(Thread.currentThread().getContextClassLoader().getResource("jetrix-16x16.png")).getImage(); + String osname = System.getProperty("os.name"); + String iconname = osname.contains("Linux") ? "jetrix-32x32.png" : "jetrix-16x16.png"; + ClassLoader loader = Thread.currentThread().getContextClassLoader(); + Image icon = new ImageIcon(loader.getResource(iconname)).getImage(); trayIcon = new TrayIcon(icon, TITLE, menu); trayIcon.setImageAutoSize(true); trayIcon.addActionListener(new ActionListener() { - private long timestamp; - public void actionPerformed(ActionEvent e) { - // emulates a double click listener - if (e.getWhen() - timestamp < 750) - { - openWebAdmin(); - } - - timestamp = e.getWhen(); + openWebAdmin(); } }); @@ -198,7 +190,19 @@ try { // open the browser - Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + url); + String osname = System.getProperty("os.name"); + if (osname.contains("Linux")) + { + Runtime.getRuntime().exec("firefox " + url); + } + else if (osname.contains("Windows")) + { + Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + url); + } + else if (osname.contains("Mac")) + { + Runtime.getRuntime().exec("open " + url); + } } catch (IOException e) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sm...@us...> - 2008-09-02 13:51:53
|
Revision: 759 http://jetrix.svn.sourceforge.net/jetrix/?rev=759&view=rev Author: smanux Date: 2008-09-02 13:51:51 +0000 (Tue, 02 Sep 2008) Log Message: ----------- Use the NSIS Ant task to build the Windows installer Modified Paths: -------------- jetrix/trunk/build.xml Added Paths: ----------- jetrix/trunk/lib/nsisant-1.2.jar Modified: jetrix/trunk/build.xml =================================================================== --- jetrix/trunk/build.xml 2008-09-02 10:49:12 UTC (rev 758) +++ jetrix/trunk/build.xml 2008-09-02 13:51:51 UTC (rev 759) @@ -269,6 +269,11 @@ <target name="dist.win" depends="deploy" description="Build the Windows installer"> + <taskdef name="nsis" classname="net.sf.nsisant.Task" classpath="lib/nsisant-1.2.jar"/> + <condition property="nsis.home" value="C:\Program Files\NSIS"> + <os family="windows"/> + </condition> + <!-- Build the windows executable file jetrix.exe --> <mkdir dir="${build}/bin"/> <copy todir="${build}/bin" filtering="true"> @@ -276,14 +281,14 @@ </copy> <copy file="${src}/etc/icons/jetrix.ico" todir="${build}/bin"/> - <exec executable="C:\Program Files\NSIS\makensis.exe"> - <arg line="${build}/bin/launcher.nsi"/> - </exec> + <nsis verbosity="3" script="${build}/bin/launcher.nsi" path="${nsis.home}"> + <define name="OUT_DIR" value="${build}/bin"/> + </nsis> <!-- Build the installer --> - <exec executable="C:\Program Files\NSIS\makensis.exe"> - <arg line="${build}/bin/installer.nsi"/> - </exec> + <nsis verbosity="3" script="${build}/bin/installer.nsi" path="${nsis.home}"> + <define name="OUT_DIR" value="${build}/bin"/> + </nsis> <move file="${build}/bin/jetrix-${version}-installer.exe" todir="${dist}/bin"/> </target> Property changes on: jetrix/trunk/lib/nsisant-1.2.jar ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sm...@us...> - 2008-09-02 15:15:37
|
Revision: 760 http://jetrix.svn.sourceforge.net/jetrix/?rev=760&view=rev Author: smanux Date: 2008-09-02 15:15:27 +0000 (Tue, 02 Sep 2008) Log Message: ----------- The Windows installer is now buildable on Linux Slight improvement of the Windows installer compression Modified Paths: -------------- jetrix/trunk/build.xml jetrix/trunk/src/bin/installer.nsi jetrix/trunk/src/bin/launcher.nsi Modified: jetrix/trunk/build.xml =================================================================== --- jetrix/trunk/build.xml 2008-09-02 13:51:51 UTC (rev 759) +++ jetrix/trunk/build.xml 2008-09-02 15:15:27 UTC (rev 760) @@ -270,7 +270,7 @@ <target name="dist.win" depends="deploy" description="Build the Windows installer"> <taskdef name="nsis" classname="net.sf.nsisant.Task" classpath="lib/nsisant-1.2.jar"/> - <condition property="nsis.home" value="C:\Program Files\NSIS"> + <condition property="nsis.home" value="C:\Program Files\NSIS" else="/usr/bin"> <os family="windows"/> </condition> Modified: jetrix/trunk/src/bin/installer.nsi =================================================================== --- jetrix/trunk/src/bin/installer.nsi 2008-09-02 13:51:51 UTC (rev 759) +++ jetrix/trunk/src/bin/installer.nsi 2008-09-02 15:15:27 UTC (rev 760) @@ -10,7 +10,7 @@ !define PRODUCT_UNINST_ROOT_KEY "HKLM" !define BASE_PATH "..\.." -SetCompressor lzma +SetCompressor /SOLID lzma ; MUI 1.67 compatible ------ !include "MUI.nsh" Modified: jetrix/trunk/src/bin/launcher.nsi =================================================================== --- jetrix/trunk/src/bin/launcher.nsi 2008-09-02 13:51:51 UTC (rev 759) +++ jetrix/trunk/src/bin/launcher.nsi 2008-09-02 15:15:27 UTC (rev 760) @@ -11,6 +11,7 @@ Caption "Jetrix TetriNET Server" Icon "jetrix.ico" OutFile "jetrix.exe" +SetCompressor lzma SilentInstall silent AutoCloseWindow true @@ -68,6 +69,7 @@ JreFound: Pop $R1 + MessageBox MB_ICONEXCLAMATION|MB_YESNO 'exec: $R0' IDNO +2 Exch $R0 FunctionEnd This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sm...@us...> - 2008-09-02 17:48:32
|
Revision: 764 http://jetrix.svn.sourceforge.net/jetrix/?rev=764&view=rev Author: smanux Date: 2008-09-02 17:48:20 +0000 (Tue, 02 Sep 2008) Log Message: ----------- Moved the configuration files in a conf sub directory Modified Paths: -------------- jetrix/trunk/build.xml jetrix/trunk/src/java/net/jetrix/config/ServerConfig.java Added Paths: ----------- jetrix/trunk/src/etc/conf/ jetrix/trunk/src/etc/conf/channels.xml jetrix/trunk/src/etc/conf/server.xml Removed Paths: ------------- jetrix/trunk/src/etc/channels.xml jetrix/trunk/src/etc/server.xml Modified: jetrix/trunk/build.xml =================================================================== --- jetrix/trunk/build.xml 2008-09-02 17:26:49 UTC (rev 763) +++ jetrix/trunk/build.xml 2008-09-02 17:48:20 UTC (rev 764) @@ -182,8 +182,7 @@ <zipfileset prefix="jetrix-${version}/" dir="${src}/etc/"> <include name="LICENSE" /> <include name="README" /> - <include name="server.xml" /> - <include name="channels.xml" /> + <include name="conf/*" /> <include name="data/**" /> </zipfileset> <zipfileset prefix="jetrix-${version}/" dir="${build}/bin/"> @@ -215,8 +214,7 @@ <tarfileset prefix="jetrix-${version}/" dir="${src}/etc/"> <include name="LICENSE" /> <include name="README" /> - <include name="server.xml" /> - <include name="channels.xml" /> + <include name="conf/*" /> <include name="data/**" /> </tarfileset> <tarfileset prefix="jetrix-${version}/" dir="${build}/bin/"> Deleted: jetrix/trunk/src/etc/channels.xml =================================================================== --- jetrix/trunk/src/etc/channels.xml 2008-09-02 17:26:49 UTC (rev 763) +++ jetrix/trunk/src/etc/channels.xml 2008-09-02 17:48:20 UTC (rev 764) @@ -1,282 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE tetrinet-channels PUBLIC "-//LFJR//Jetrix Channels//EN" "http://jetrix.sourceforge.net/dtd/tetrinet-channels.dtd"> - -<tetrinet-channels> - - <!-- Message Of The Day --> - <motd><![CDATA[ -<b> -Welcome on <b>Jetrix TetriNET Server</b>! -<u><blue>http://jetrix.sourceforge.net/</blue></u> -<b> - ]]></motd> - - <!-- Channel filters --> - <filter-definitions> - <alias name="flood" class="net.jetrix.filter.FloodFilter"/> - <alias name="start" class="net.jetrix.filter.StartFilter"/> - <alias name="amplifier" class="net.jetrix.filter.AmplifierFilter"/> - <alias name="ping" class="net.jetrix.filter.PingFilter"/> - <alias name="7tetris" class="net.jetrix.filter.TetrisFilter"/> - <alias name="stats" class="net.jetrix.filter.StatsFilter"/> - <alias name="logo" class="net.jetrix.filter.LogoFilter"/> - <alias name="sudden-death" class="net.jetrix.filter.SuddenDeathFilter"/> - <alias name="command" class="net.jetrix.filter.CommandFilter"/> - <alias name="survival" class="net.jetrix.filter.SurvivalFilter"/> - <alias name="puzzle" class="net.jetrix.filter.PuzzleFilter"/> - <alias name="random" class="net.jetrix.filter.RandomFilter"/> - </filter-definitions> - - <!-- Global filters --> - <default-filters> - <filter name="flood"> - <param name="capacity" value="8"/> - <param name="delay" value="5000"/> - </filter> - <filter name="start"> - <param name="delay" value="10000"/> - </filter> - <filter name="ping"/> - <filter name="stats"/> - <filter name="logo"/> - <filter name="sudden-death"/> - </default-filters> - - <!-- Winlists --> - <winlists> - <winlist name="default" class="net.jetrix.winlist.SimpleWinlist"> - <param name="display.score" value="true"/> - </winlist> - <winlist name="pure" class="net.jetrix.winlist.SimpleWinlist"> - <param name="display.score" value="true"/> - </winlist> - <winlist name="duel" class="net.jetrix.winlist.SimpleWinlist"> - <param name="display.score" value="true"/> - </winlist> - </winlists> - - <!-- Default game settings --> - <default-settings> - <!-- What level each player starts at --> - <starting-level>1</starting-level> - - <!-- How many lines to make before player level increases --> - <lines-per-level>2</lines-per-level> - - <!-- Number of levels to increase each time --> - <level-increase>1</level-increase> - - <!-- Lines to make to get a special block --> - <lines-per-special>2</lines-per-special> - - <!-- Number of special blocks added each time --> - <special-added>1</special-added> - - <!-- Capacity of Special block inventory --> - <special-capacity>18</special-capacity> - - <!-- Play by classic rules? --> - <classic-rules>true</classic-rules> - - <!-- Average together all player's game level? --> - <average-levels>true</average-levels> - - <!-- Same sequence of blocks for all players? (tetrinet 1.14 clients only) --> - <same-blocks>true</same-blocks> - - <block-occurancy> - <line>15</line> - <square>15</square> - <leftl>14</leftl> - <rightl>14</rightl> - <leftz>14</leftz> - <rightz>14</rightz> - <halfcross>14</halfcross> - </block-occurancy> - - <special-occurancy> - <addline>31</addline> - <clearline>21</clearline> - <nukefield>1</nukefield> - <randomclear>13</randomclear> - <switchfield>1</switchfield> - <clearspecial>14</clearspecial> - <gravity>1</gravity> - <quakefield>7</quakefield> - <blockbomb>11</blockbomb> - </special-occurancy> - - <!-- Sudden death parameters --> - <sudden-death> - <!-- Time in seconds before the sudden death begins, 0 to disable the sudden death --> - <time>600</time> - - <!-- The message displayed when the sudden death begins. Use "key:" prefix to display an internationalized message --> - <message>key:filter.suddendeath.message</message> - - <!-- The delay in seconds between lines additions --> - <delay>10</delay> - - <!-- The number of lines added --> - <lines-added>1</lines-added> - </sudden-death> - - </default-settings> - - - <channels> - <channel name="tetrinet1"> - <description>2:1</description> - <winlist name="default"/> - </channel> - - <channel name="tetrinet2"> - <description>2:1</description> - <winlist name="default"/> - </channel> - - <channel name="tetrinet3"> - <description>2:1</description> - <winlist name="default"/> - </channel> - - <channel name="pure"> - <description>Pure</description> - <winlist name="pure"/> - <settings> - <special-added>0</special-added> - </settings> - </channel> - - <channel name="pure2"> - <description>Pure</description> - <winlist name="pure"/> - <settings> - <special-added>0</special-added> - </settings> - </channel> - - <channel name="custom"> - <description>Custom mode</description> - <topic>Type /mode to change the settings</topic> - <filters> - <filter name="command"> - <param name="class" value="net.jetrix.commands.ModeCommand"/> - </filter> - </filters> - </channel> - - <channel name="random"> - <description>Random settings</description> - <topic>New game, new settings. Enjoy!</topic> - <filters> - <filter name="random"/> - </filters> - </channel> - - <channel name="duel1"> - <description>Duel 2:1</description> - <max-players>2</max-players> - <winlist name="duel"/> - </channel> - - <channel name="duel2"> - <description>Duel 2:1</description> - <max-players>2</max-players> - <winlist name="duel"/> - </channel> - - <channel name="pureduel"> - <description>Pure - No Specials</description> - <max-players>2</max-players> - <winlist name="default"/> - <settings> - <special-added>0</special-added> - <same-blocks>true</same-blocks> - </settings> - </channel> - - <channel name="sticks"> - <description>Sticks Only</description> - <settings> - <special-added>0</special-added> - <block-occurancy> - <line>100</line> - </block-occurancy> - </settings> - </channel> - - <channel name="SnS"> - <description><![CDATA[Sticks <i>and</i> Squares]]></description> - <settings> - <special-added>0</special-added> - <block-occurancy> - <line>50</line> - <square>50</square> - </block-occurancy> - </settings> - </channel> - - <channel name="7Tetris"> - <description>7 tetris to win!</description> - <topic> -<![CDATA[ -<b> -Welcome to the 7 tetris channel! The first player completing 7 tetris -win. There is no special in this game, and the lines are not added to -your opponents. Good luck! -<b> -]]> - </topic> - <settings> - <special-added>0</special-added> - </settings> - <filters> - <filter name="7tetris"/> - </filters> - </channel> - - <channel name="survival"> - <description>Staying Aliiiive !!</description> - <topic> -<![CDATA[ -<b> -Welcome to the survival channel! Drop as many blocks as you can -before you die. The sudden death is activated immediately and one -line is added every 5 seconds. -If you clear <b>2</b> lines, <b>1</b> extra line will be removed. -If you clear <b>3</b> lines, <b>2</b> extra lines will be removed. -If you clear <b>4</b> lines, <b>3</b> extra additional lines will be removed. -<b> -]]> - </topic> - <max-players>2</max-players> - <settings> - <sudden-death> - <time>5</time> - <delay>5</delay> - <lines-added>1</lines-added> - </sudden-death> - </settings> - <filters> - <filter name="survival"/> - </filters> - </channel> - - <channel name="puzzle"> - <description>Downstack 'em all!</description> - <max-players>1</max-players> - <filters> - <filter name="puzzle"/> - </filters> - </channel> - - <channel name="admins"> - <description>Administrators' Lair</description> - <access-level>1</access-level> - <idle>true</idle> - </channel> - - </channels> - -</tetrinet-channels> Copied: jetrix/trunk/src/etc/conf/channels.xml (from rev 752, jetrix/trunk/src/etc/channels.xml) =================================================================== --- jetrix/trunk/src/etc/conf/channels.xml (rev 0) +++ jetrix/trunk/src/etc/conf/channels.xml 2008-09-02 17:48:20 UTC (rev 764) @@ -0,0 +1,282 @@ +<?xml version="1.0"?> +<!DOCTYPE tetrinet-channels PUBLIC "-//LFJR//Jetrix Channels//EN" "http://jetrix.sourceforge.net/dtd/tetrinet-channels.dtd"> + +<tetrinet-channels> + + <!-- Message Of The Day --> + <motd><![CDATA[ +<b> +Welcome on <b>Jetrix TetriNET Server</b>! +<u><blue>http://jetrix.sourceforge.net/</blue></u> +<b> + ]]></motd> + + <!-- Channel filters --> + <filter-definitions> + <alias name="flood" class="net.jetrix.filter.FloodFilter"/> + <alias name="start" class="net.jetrix.filter.StartFilter"/> + <alias name="amplifier" class="net.jetrix.filter.AmplifierFilter"/> + <alias name="ping" class="net.jetrix.filter.PingFilter"/> + <alias name="7tetris" class="net.jetrix.filter.TetrisFilter"/> + <alias name="stats" class="net.jetrix.filter.StatsFilter"/> + <alias name="logo" class="net.jetrix.filter.LogoFilter"/> + <alias name="sudden-death" class="net.jetrix.filter.SuddenDeathFilter"/> + <alias name="command" class="net.jetrix.filter.CommandFilter"/> + <alias name="survival" class="net.jetrix.filter.SurvivalFilter"/> + <alias name="puzzle" class="net.jetrix.filter.PuzzleFilter"/> + <alias name="random" class="net.jetrix.filter.RandomFilter"/> + </filter-definitions> + + <!-- Global filters --> + <default-filters> + <filter name="flood"> + <param name="capacity" value="8"/> + <param name="delay" value="5000"/> + </filter> + <filter name="start"> + <param name="delay" value="10000"/> + </filter> + <filter name="ping"/> + <filter name="stats"/> + <filter name="logo"/> + <filter name="sudden-death"/> + </default-filters> + + <!-- Winlists --> + <winlists> + <winlist name="default" class="net.jetrix.winlist.SimpleWinlist"> + <param name="display.score" value="true"/> + </winlist> + <winlist name="pure" class="net.jetrix.winlist.SimpleWinlist"> + <param name="display.score" value="true"/> + </winlist> + <winlist name="duel" class="net.jetrix.winlist.SimpleWinlist"> + <param name="display.score" value="true"/> + </winlist> + </winlists> + + <!-- Default game settings --> + <default-settings> + <!-- What level each player starts at --> + <starting-level>1</starting-level> + + <!-- How many lines to make before player level increases --> + <lines-per-level>2</lines-per-level> + + <!-- Number of levels to increase each time --> + <level-increase>1</level-increase> + + <!-- Lines to make to get a special block --> + <lines-per-special>2</lines-per-special> + + <!-- Number of special blocks added each time --> + <special-added>1</special-added> + + <!-- Capacity of Special block inventory --> + <special-capacity>18</special-capacity> + + <!-- Play by classic rules? --> + <classic-rules>true</classic-rules> + + <!-- Average together all player's game level? --> + <average-levels>true</average-levels> + + <!-- Same sequence of blocks for all players? (tetrinet 1.14 clients only) --> + <same-blocks>true</same-blocks> + + <block-occurancy> + <line>15</line> + <square>15</square> + <leftl>14</leftl> + <rightl>14</rightl> + <leftz>14</leftz> + <rightz>14</rightz> + <halfcross>14</halfcross> + </block-occurancy> + + <special-occurancy> + <addline>31</addline> + <clearline>21</clearline> + <nukefield>1</nukefield> + <randomclear>13</randomclear> + <switchfield>1</switchfield> + <clearspecial>14</clearspecial> + <gravity>1</gravity> + <quakefield>7</quakefield> + <blockbomb>11</blockbomb> + </special-occurancy> + + <!-- Sudden death parameters --> + <sudden-death> + <!-- Time in seconds before the sudden death begins, 0 to disable the sudden death --> + <time>600</time> + + <!-- The message displayed when the sudden death begins. Use "key:" prefix to display an internationalized message --> + <message>key:filter.suddendeath.message</message> + + <!-- The delay in seconds between lines additions --> + <delay>10</delay> + + <!-- The number of lines added --> + <lines-added>1</lines-added> + </sudden-death> + + </default-settings> + + + <channels> + <channel name="tetrinet1"> + <description>2:1</description> + <winlist name="default"/> + </channel> + + <channel name="tetrinet2"> + <description>2:1</description> + <winlist name="default"/> + </channel> + + <channel name="tetrinet3"> + <description>2:1</description> + <winlist name="default"/> + </channel> + + <channel name="pure"> + <description>Pure</description> + <winlist name="pure"/> + <settings> + <special-added>0</special-added> + </settings> + </channel> + + <channel name="pure2"> + <description>Pure</description> + <winlist name="pure"/> + <settings> + <special-added>0</special-added> + </settings> + </channel> + + <channel name="custom"> + <description>Custom mode</description> + <topic>Type /mode to change the settings</topic> + <filters> + <filter name="command"> + <param name="class" value="net.jetrix.commands.ModeCommand"/> + </filter> + </filters> + </channel> + + <channel name="random"> + <description>Random settings</description> + <topic>New game, new settings. Enjoy!</topic> + <filters> + <filter name="random"/> + </filters> + </channel> + + <channel name="duel1"> + <description>Duel 2:1</description> + <max-players>2</max-players> + <winlist name="duel"/> + </channel> + + <channel name="duel2"> + <description>Duel 2:1</description> + <max-players>2</max-players> + <winlist name="duel"/> + </channel> + + <channel name="pureduel"> + <description>Pure - No Specials</description> + <max-players>2</max-players> + <winlist name="default"/> + <settings> + <special-added>0</special-added> + <same-blocks>true</same-blocks> + </settings> + </channel> + + <channel name="sticks"> + <description>Sticks Only</description> + <settings> + <special-added>0</special-added> + <block-occurancy> + <line>100</line> + </block-occurancy> + </settings> + </channel> + + <channel name="SnS"> + <description><![CDATA[Sticks <i>and</i> Squares]]></description> + <settings> + <special-added>0</special-added> + <block-occurancy> + <line>50</line> + <square>50</square> + </block-occurancy> + </settings> + </channel> + + <channel name="7Tetris"> + <description>7 tetris to win!</description> + <topic> +<![CDATA[ +<b> +Welcome to the 7 tetris channel! The first player completing 7 tetris +win. There is no special in this game, and the lines are not added to +your opponents. Good luck! +<b> +]]> + </topic> + <settings> + <special-added>0</special-added> + </settings> + <filters> + <filter name="7tetris"/> + </filters> + </channel> + + <channel name="survival"> + <description>Staying Aliiiive !!</description> + <topic> +<![CDATA[ +<b> +Welcome to the survival channel! Drop as many blocks as you can +before you die. The sudden death is activated immediately and one +line is added every 5 seconds. +If you clear <b>2</b> lines, <b>1</b> extra line will be removed. +If you clear <b>3</b> lines, <b>2</b> extra lines will be removed. +If you clear <b>4</b> lines, <b>3</b> extra additional lines will be removed. +<b> +]]> + </topic> + <max-players>2</max-players> + <settings> + <sudden-death> + <time>5</time> + <delay>5</delay> + <lines-added>1</lines-added> + </sudden-death> + </settings> + <filters> + <filter name="survival"/> + </filters> + </channel> + + <channel name="puzzle"> + <description>Downstack 'em all!</description> + <max-players>1</max-players> + <filters> + <filter name="puzzle"/> + </filters> + </channel> + + <channel name="admins"> + <description>Administrators' Lair</description> + <access-level>1</access-level> + <idle>true</idle> + </channel> + + </channels> + +</tetrinet-channels> Property changes on: jetrix/trunk/src/etc/conf/channels.xml ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Copied: jetrix/trunk/src/etc/conf/server.xml (from rev 752, jetrix/trunk/src/etc/server.xml) =================================================================== --- jetrix/trunk/src/etc/conf/server.xml (rev 0) +++ jetrix/trunk/src/etc/conf/server.xml 2008-09-02 17:48:20 UTC (rev 764) @@ -0,0 +1,122 @@ +<?xml version="1.0"?> +<!DOCTYPE tetrinet-server PUBLIC "-//LFJR//Jetrix TetriNET Server//EN" "http://jetrix.sourceforge.net/dtd/tetrinet-server.dtd"> + +<tetrinet-server host="[ALL]"> + + <!-- Server name --> + <name>Jetrix TetriNET Server</name> + + <!-- Server default language (using an ISO-639 two-letter language code) --> + <language>en</language> + + <!-- How many seconds of inactivity before timeout occurs --> + <timeout>1000</timeout> + + <!-- How many channels should be available on the server --> + <max-channels>8</max-channels> + + <!-- Maximum number of players on the server --> + <max-players>50</max-players> + + <!-- Maximum number of simultaneous connections allowed from the same IP --> + <max-connections>3</max-connections> + + <!-- Typing /op <thispassword> will give player operator status --> + <op-password>jetrixpass</op-password> + + <!-- Use this password to log on the administration console --> + <admin-password>adminpass</admin-password> + + <!-- Access Log, where requests are logged to --> + <access-log path="log/access%g.log" /> + + <!-- Error Log, where errors are logged to --> + <error-log path="log/error%g.log" /> + + <!-- Client listeners --> + <listeners> + <listener class="net.jetrix.listeners.TetrinetListener"/> + <listener class="net.jetrix.listeners.TSpecListener"/> + <listener class="net.jetrix.listeners.IRCListener" port="31456" auto-start="false"/> + <listener class="net.jetrix.listeners.HttpListener" port="8080"/> + </listeners> + + <!-- Services --> + <services> + <service class="net.jetrix.services.PublishingService"> + <!--<param name="host" value="tetrinet.yourhostname.net"/>--> + </service> + <service class="net.jetrix.services.GhostbusterService"/> + <service class="net.jetrix.services.VersionService"/> + </services> + + <!-- Server commands --> + <commands> + <command class="net.jetrix.commands.AwayCommand"/> + <command class="net.jetrix.commands.BroadcastCommand"/> + <command class="net.jetrix.commands.ConfigCommand"/> + <command class="net.jetrix.commands.EmoteCommand"/> + <command class="net.jetrix.commands.GotoCommand"/> + <command class="net.jetrix.commands.HelpCommand"/> + <command class="net.jetrix.commands.IgnoreCommand"/> + <command class="net.jetrix.commands.IpCommand"/> + <command class="net.jetrix.commands.JoinCommand"/> + <command class="net.jetrix.commands.KickCommand"/> + <command class="net.jetrix.commands.LanguageCommand"/> + <command class="net.jetrix.commands.ListCommand"/> + <command class="net.jetrix.commands.MotdCommand"/> + <command class="net.jetrix.commands.MoveCommand"/> + <command class="net.jetrix.commands.OperatorCommand"/> + <command class="net.jetrix.commands.PauseCommand"/> + <command class="net.jetrix.commands.PetitionCommand"/> + <command class="net.jetrix.commands.PingCommand"/> + <command class="net.jetrix.commands.RandomCommand"/> + <command class="net.jetrix.commands.ReplyCommand"/> + <command class="net.jetrix.commands.SpecListCommand"/> + <command class="net.jetrix.commands.StartCommand"/> + <command class="net.jetrix.commands.StopCommand"/> + <command class="net.jetrix.commands.SummonCommand"/> + <command class="net.jetrix.commands.TeamMessageCommand"/> + <command class="net.jetrix.commands.TeleportCommand"/> + <command class="net.jetrix.commands.TellCommand"/> + <command class="net.jetrix.commands.TimeCommand"/> + <command class="net.jetrix.commands.VersionCommand"/> + <command class="net.jetrix.commands.WhoCommand"/> + </commands> + + <ban> + <!-- Cheating from host 1cust007.tnt2.billgates.da.uu.net --> + <host>*.tnt*.billgates.da.uu.net</host> + + <!-- Flooding from 192.168.33.200. Ban all C class IP block --> + <host>192.168.33.*</host> + + <!-- Ban all hostname contain the word foobar --> + <host>*foobar*</host> + + <!-- Ban IP block from 192.168.10.0 to 192.168.19.255 --> + <host>192.168.1?.*</host> + + <!-- Ban nickname --> + <nick>billgates</nick> + + <!-- Ban team --> + <team>Flying Cucumbers</team> + </ban> + + <!-- Database connection parameters --> + <datasource> + <!-- The class of the JDBC driver used --> + <driver>com.mysql.jdbc.Driver</driver> + + <!-- The URL of the database (jdbc:<type>://<hostname>:<port>/<database>) --> + <url>jdbc:mysql://localhost/jetrix</url> + + <!-- The username connecting to the database --> + <username>jetrix</username> + + <!-- The password of the user --> + <password>jetrixpass</password> + </datasource> + +</tetrinet-server> Property changes on: jetrix/trunk/src/etc/conf/server.xml ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Deleted: jetrix/trunk/src/etc/server.xml =================================================================== --- jetrix/trunk/src/etc/server.xml 2008-09-02 17:26:49 UTC (rev 763) +++ jetrix/trunk/src/etc/server.xml 2008-09-02 17:48:20 UTC (rev 764) @@ -1,122 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE tetrinet-server PUBLIC "-//LFJR//Jetrix TetriNET Server//EN" "http://jetrix.sourceforge.net/dtd/tetrinet-server.dtd"> - -<tetrinet-server host="[ALL]"> - - <!-- Server name --> - <name>Jetrix TetriNET Server</name> - - <!-- Server default language (using an ISO-639 two-letter language code) --> - <language>en</language> - - <!-- How many seconds of inactivity before timeout occurs --> - <timeout>1000</timeout> - - <!-- How many channels should be available on the server --> - <max-channels>8</max-channels> - - <!-- Maximum number of players on the server --> - <max-players>50</max-players> - - <!-- Maximum number of simultaneous connections allowed from the same IP --> - <max-connections>3</max-connections> - - <!-- Typing /op <thispassword> will give player operator status --> - <op-password>jetrixpass</op-password> - - <!-- Use this password to log on the administration console --> - <admin-password>adminpass</admin-password> - - <!-- Access Log, where requests are logged to --> - <access-log path="log/access%g.log" /> - - <!-- Error Log, where errors are logged to --> - <error-log path="log/error%g.log" /> - - <!-- Client listeners --> - <listeners> - <listener class="net.jetrix.listeners.TetrinetListener"/> - <listener class="net.jetrix.listeners.TSpecListener"/> - <listener class="net.jetrix.listeners.IRCListener" port="31456" auto-start="false"/> - <listener class="net.jetrix.listeners.HttpListener" port="8080"/> - </listeners> - - <!-- Services --> - <services> - <service class="net.jetrix.services.PublishingService"> - <!--<param name="host" value="tetrinet.yourhostname.net"/>--> - </service> - <service class="net.jetrix.services.GhostbusterService"/> - <service class="net.jetrix.services.VersionService"/> - </services> - - <!-- Server commands --> - <commands> - <command class="net.jetrix.commands.AwayCommand"/> - <command class="net.jetrix.commands.BroadcastCommand"/> - <command class="net.jetrix.commands.ConfigCommand"/> - <command class="net.jetrix.commands.EmoteCommand"/> - <command class="net.jetrix.commands.GotoCommand"/> - <command class="net.jetrix.commands.HelpCommand"/> - <command class="net.jetrix.commands.IgnoreCommand"/> - <command class="net.jetrix.commands.IpCommand"/> - <command class="net.jetrix.commands.JoinCommand"/> - <command class="net.jetrix.commands.KickCommand"/> - <command class="net.jetrix.commands.LanguageCommand"/> - <command class="net.jetrix.commands.ListCommand"/> - <command class="net.jetrix.commands.MotdCommand"/> - <command class="net.jetrix.commands.MoveCommand"/> - <command class="net.jetrix.commands.OperatorCommand"/> - <command class="net.jetrix.commands.PauseCommand"/> - <command class="net.jetrix.commands.PetitionCommand"/> - <command class="net.jetrix.commands.PingCommand"/> - <command class="net.jetrix.commands.RandomCommand"/> - <command class="net.jetrix.commands.ReplyCommand"/> - <command class="net.jetrix.commands.SpecListCommand"/> - <command class="net.jetrix.commands.StartCommand"/> - <command class="net.jetrix.commands.StopCommand"/> - <command class="net.jetrix.commands.SummonCommand"/> - <command class="net.jetrix.commands.TeamMessageCommand"/> - <command class="net.jetrix.commands.TeleportCommand"/> - <command class="net.jetrix.commands.TellCommand"/> - <command class="net.jetrix.commands.TimeCommand"/> - <command class="net.jetrix.commands.VersionCommand"/> - <command class="net.jetrix.commands.WhoCommand"/> - </commands> - - <ban> - <!-- Cheating from host 1cust007.tnt2.billgates.da.uu.net --> - <host>*.tnt*.billgates.da.uu.net</host> - - <!-- Flooding from 192.168.33.200. Ban all C class IP block --> - <host>192.168.33.*</host> - - <!-- Ban all hostname contain the word foobar --> - <host>*foobar*</host> - - <!-- Ban IP block from 192.168.10.0 to 192.168.19.255 --> - <host>192.168.1?.*</host> - - <!-- Ban nickname --> - <nick>billgates</nick> - - <!-- Ban team --> - <team>Flying Cucumbers</team> - </ban> - - <!-- Database connection parameters --> - <datasource> - <!-- The class of the JDBC driver used --> - <driver>com.mysql.jdbc.Driver</driver> - - <!-- The URL of the database (jdbc:<type>://<hostname>:<port>/<database>) --> - <url>jdbc:mysql://localhost/jetrix</url> - - <!-- The username connecting to the database --> - <username>jetrix</username> - - <!-- The password of the user --> - <password>jetrixpass</password> - </datasource> - -</tetrinet-server> Modified: jetrix/trunk/src/java/net/jetrix/config/ServerConfig.java =================================================================== --- jetrix/trunk/src/java/net/jetrix/config/ServerConfig.java 2008-09-02 17:26:49 UTC (rev 763) +++ jetrix/trunk/src/java/net/jetrix/config/ServerConfig.java 2008-09-02 17:48:20 UTC (rev 764) @@ -121,14 +121,14 @@ // parse the server configuration digester.push(this); - serverConfigURL = findResource("server.xml"); + serverConfigURL = findResource("conf/server.xml"); Reader reader = new InputStreamReader(serverConfigURL.openStream(), ENCODING); digester.parse(new InputSource(reader)); reader.close(); // parse the channel configuration digester.push(this); - channelsConfigURL = findResource("channels.xml"); + channelsConfigURL = findResource("conf/channels.xml"); reader = new InputStreamReader(channelsConfigURL.openStream(), ENCODING); digester.parse(new InputSource(reader)); reader.close(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sm...@us...> - 2008-09-02 19:42:55
|
Revision: 767 http://jetrix.svn.sourceforge.net/jetrix/?rev=767&view=rev Author: smanux Date: 2008-09-02 19:42:47 +0000 (Tue, 02 Sep 2008) Log Message: ----------- Removed the Maven 1 build Removed Paths: ------------- jetrix/trunk/project.properties jetrix/trunk/project.xml jetrix/trunk/src/etc/clover.license Deleted: jetrix/trunk/project.properties =================================================================== --- jetrix/trunk/project.properties 2008-09-02 18:17:42 UTC (rev 766) +++ jetrix/trunk/project.properties 2008-09-02 19:42:47 UTC (rev 767) @@ -1,22 +0,0 @@ -version=0.3-dev -version.stable=0.2.3 - -maven.junit.fork=true -maven.junit.dir=target/test-classes -maven.test.failure.ignore=true - -maven.changelog.range=365 - -maven.jar.override=on -maven.jar.jcrontab=lib/jcrontab-1.4.1-light.jar - -maven.javadoc.use=false -maven.javadoc.links=http://java.sun.com/j2se/1.5/docs/api/, http://jetty.mortbay.org/javadoc/, http://jakarta.apache.org/commons/digester/apidocs/, http://jakarta.apache.org/commons/collections/apidocs/, http://jakarta.apache.org/commons/lang/apidocs/ -maven.javadoc.stylesheet=doc/javadoc-stylesheet.css - -maven.compile.source = 1.5 -maven.compile.target = 1.5 - -maven.clover.license.path=src/etc/clover.license - -maven.repo.remote=http://repo1.maven.org/maven/ Deleted: jetrix/trunk/project.xml =================================================================== --- jetrix/trunk/project.xml 2008-09-02 18:17:42 UTC (rev 766) +++ jetrix/trunk/project.xml 2008-09-02 19:42:47 UTC (rev 767) @@ -1,223 +0,0 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<project> - <pomVersion>3</pomVersion> - <name>Jetrix TetriNET Server</name> - <id>jetrix</id> - <currentVersion>${version}</currentVersion> - - <organization> - <logo>http://jetrix.sourceforge.net/images/jetrix-logo.png</logo> - <name>Emmanuel Bourg</name> - </organization> - - <inceptionYear>2001</inceptionYear> - <package>net.jetrix</package> - - <shortDescription>Jetrix TetriNET Server</shortDescription> - - <description> - Jetrix is a new generation TetriNET server written in Java and - designed for maximum scalability, extensibility and ease of use. - It features a web based administration console and a simple API - to let developers add custom commands or change the channels' - behavior with little knowledge of the server's inner functioning. - The ambitious goal of this project is to create the ideal plateform - for server side TetriNET programmers. Jetrix is open source and - developped under the GNU General Public License. - </description> - - <url>http://jetrix.sourceforge.net</url> - <issueTrackingUrl>https://sourceforge.net/tracker/?group_id=52188&atid=466002</issueTrackingUrl> - <siteAddress>shell.sourceforge.net</siteAddress> - <siteDirectory>/home/groups/j/je/jetrix/htdocs/docs/</siteDirectory> - - <repository> - <connection>scm:svn:https://jetrix.svn.sourceforge.net/svnroot/jetrix/jetrix/trunk/</connection> - <developerConnection>scm:svn:https://jetrix.svn.sourceforge.net/svnroot/jetrix/jetrix/trunk/</developerConnection> - <url>http://jetrix.svn.sourceforge.net/viewvc/jetrix/</url> - </repository> - - <versions> - <version> - <id>0.1.3</id> - <name>0.1.3</name> - <tag>jetrix_0_1_3</tag> - </version> - <version> - <id>0.1.2</id> - <name>0.1.2</name> - <tag>jetrix_0_1_2</tag> - </version> - <version> - <id>0.1.1</id> - <name>0.1.1</name> - <tag>jetrix_0_1_1</tag> - </version> - <version> - <id>0.1.0</id> - <name>0.1.0</name> - <tag>jetrix_0_1_0</tag> - </version> - </versions> - - <mailingLists> - <mailingList> - <name>Jetrix Commits</name> - <subscribe>http://lists.sourceforge.net/lists/listinfo/jetrix-cvs</subscribe> - <unsubscribe>http://lists.sourceforge.net/lists/listinfo/jetrix-cvs</unsubscribe> - <archive>https://sourceforge.net/mailarchive/forum.php?forum_id=12998</archive> - </mailingList> - </mailingLists> - - <developers> - <developer> - <name>Emmanuel Bourg</name> - <id>smanux</id> - <email>sm...@lf...</email> - <organization>LFJR - Ligue Francophone de Jeux en R\xE9seau</organization> - </developer> - </developers> - - <contributors> - <contributor> - <name>Tim Van Wassenhove</name> - <roles> - <role>Dutch translator</role> - </roles> - </contributor> - <contributor> - <name>Mario Meuser</name> - <roles> - <role>German translator</role> - </roles> - </contributor> - <contributor> - <name>Julian Mesa Llopis</name> - <roles> - <role>Spanish translator</role> - </roles> - </contributor> - <contributor> - <name>Bryan Reynaert</name> - <roles> - <role>Spanish translator</role> - </roles> - </contributor> - <contributor> - <name>Claudio Gargiulo</name> - <roles> - <role>Italian translator</role> - </roles> - </contributor> - <contributor> - <name>V\xEDtor Melo</name> - <roles> - <role>Portuguese translator</role> - </roles> - </contributor> - </contributors> - - <licenses> - <license> - <name>GNU General Public License, Version 2</name> - <url>/doc/license.txt</url> - <distribution>manual</distribution> - </license> - </licenses> - - <dependencies> - <dependency> - <id>commons-collections</id> - <version>2.1</version> - </dependency> - - <dependency> - <id>commons-lang</id> - <version>2.0</version> - </dependency> - - <dependency> - <id>commons-logging</id> - <version>1.0.3</version> - </dependency> - - <dependency> - <id>commons-digester</id> - <version>1.5</version> - </dependency> - - <dependency> - <id>commons-beanutils</id> - <version>1.7.0</version> - </dependency> - - <dependency> - <id>jetty</id> - <version>4.1-rc1</version> - </dependency> - - <dependency> - <id>jcrontab</id> - <version>1.4.1</version> - </dependency> - - <!-- Needed for testing --> - <dependency> - <id>junit</id> - <version>3.8.1</version> - <url>http://www.junit.org</url> - </dependency> - - </dependencies> - - <build> - <sourceDirectory>src/java</sourceDirectory> - <unitTestSourceDirectory>src/test</unitTestSourceDirectory> - - <!-- Unit test classes --> - <unitTest> - <includes> - <include>**/*Test.java</include> - </includes> - <resources> - <resource> - <directory>src/etc</directory> - <targetPath>/</targetPath> - <includes> - <include>*.xml</include> - <include>*.dtd</include> - </includes> - </resource> - <resource> - <directory>src/lang</directory> - <targetPath>/</targetPath> - <includes> - <include>*.properties</include> - </includes> - </resource> - <resource> - <directory>src/etc/data/puzzle</directory> - <targetPath>/data/puzzle</targetPath> - <includes> - <include>*.field</include> - <include>*.settings</include> - </includes> - </resource> - </resources> - </unitTest> - - </build> - - <reports> - <!--<report>maven-statcvs-plugin</report>--> - <report>maven-changes-plugin</report> - <report>maven-javadoc-plugin</report> - <!--<report>maven-jxr-plugin</report>--> - <report>maven-junit-report-plugin</report> - <!--<report>maven-clover-plugin</report>--> - <!--<report>maven-checkstyle-plugin</report>--> - <report>maven-pmd-plugin</report> - <report>maven-simian-plugin</report> - </reports> - -</project> Deleted: jetrix/trunk/src/etc/clover.license =================================================================== --- jetrix/trunk/src/etc/clover.license 2008-09-02 18:17:42 UTC (rev 766) +++ jetrix/trunk/src/etc/clover.license 2008-09-02 19:42:47 UTC (rev 767) @@ -1,165 +0,0 @@ -Product: Clover -License: Open Source License, 0.x, 1.x -Issued: Mon Sep 1 2003 01:36:08 CDT -Expiry: Never -Key: 9860a7991bd1927a59fa014c4 -Name: Emmanuel Bourg -Org: Jetrix Tetrinet Server -Certificate: AAABxG+Ow8B7/zEbxOMqqKwwrdpP+a1COmJGHco7sCNLjHkHnajPF+dQW -Ct12PMy0uml0s9xuus5wKngJ9OFk5XFeh01dzQF66bhXH1bvegLfvja3Kle6BYtDv4LZgE -gk3E0aJN4IbgTn+TgUckSevXDR4KzK77NWJfrVzkxV3/JepY1WvQgUcXQilK7QTwBcZ3Od -/PwtdKMROjIOsav+nqW28rPvCoDOXEpG/GxuA4RC5riWXzv3ZnKQr8IOhO1LXIBKpNWND2 -SbjToMITzpUvSEnrjw1aOrDCr0lidvwM5dwNdyS6uOVamHUyR9oZIrFxyN2DP63fzpr/Ow -G20rTrFr7MgxPrHrLlvHTJ9PxC/oOoUEiGp4UV+79fJykPmRUIIpjZ7DSDSVjJyjyZO8Cu -b67hLyAI/jd5Nh/0rqcpY+aNKJWVTc8pnqCJb40NFjOeKSLpNfA12zuh35bvhkJomqZ5ok -vq2bYO7qMWgZBsxcThI0rj9AARO+fhfeePbmctF6whyU+wzYRNg0Ec1bJR6avswm6fjUMh -XN+jURcupMb3QT56qVz9+TTfNOLMlWqYKRYryilTnIjoNdsn1Zuzq7dTeYf+tVIfIf+gSu -YZ8scRKj7QNiqP52718muMWBetR0UIXuWfj0jNXGuyP7QMm0ZjyuG3YVlwmoG1s5Qft8mt -kTNfmohTZo735HGjKoWUpX2IaA6FgMam9e0lBaTAjVO2+ejmdQXEHH7gRAWGUFhcflKC8o -CtGNP93xFQYtrDGPEzUaQA= -License Agreement: CLOVER VERSION 1 (ONE) SOFTWARE LICENSE AGREEMENT - -1. Licenses and Software - -Cortex eBusiness Pty Ltd, an Australian Proprietary Limited Company -("CENQUA") hereby grants to the purchaser (the "LICENSEE") a limited, -revocable, worldwide, non-exclusive, non-transferable, -non-sublicensable license to use the Clover version 1 (one) software -(the "Software"), including any minor upgrades thereof during the Term -(hereinafter defined) up to, but not including the next major version -of the Software. The licensee shall not, or knowingly allow others to, -reverse engineer, decompile, disassemble, modify, adapt, create -derivative works from or otherwise attempt to derive source code from -the Software provided. And, in accordance with the terms and -conditions of this Software License Agreement (the "Agreement"), the -Software shall be used solely by the licensed users in accordance with -the following edition specific conditions: - -a) Server Edition - -A Server Edition license entitles the Licensee to execute one instance -of Clover Server Edition on one (1) machine for the purposes of -instrumenting source code and generating reports. There are no -limitations on the use of the instrumented source code or generated -reports produced by Server Edition. - -b) Workstation Edition - -A Workstation Edition license entitles the licensee to use Clover -Workstation Edition on one (1) machine by one (1) individual end -user. Workstation Edition does not permit the generation of reports -for distribution. - -c) Team Edition - -A Team Edition license entitles the licensee to use Clover Team -edition on any number of machines solely by the licensed number of -users. Reports generated by Clover Team Edition are strictly for use -only by the licensed number of individual end users. - -2. License Fee - -In exchange for the License(s), the Licensee shall pay to Cenqua a -one-time, up front, non-refundable license fee. At the sole discretion -of Cenqua this fee will be waived for non-commercial -projects. Notwithstanding the Licensee's payment of the License Fee, -Cenqua reserves the right to terminate the License if Cenqua discovers -that the Licensee and/or the Licensee's use of the Software is in -breach of this Agreement. - -3. Proprietary Rights - -Cenqua will retain all right, title and interest in and to the -Software, all copies thereof, and Cenqua website(s), software, and -other intellectual property, including, but not limited to, ownership -of all copyrights, look and feel, trademark rights, design rights, -trade secret rights and any and all other intellectual property and -other proprietary rights therein. The Licensee will not directly or -indirectly obtain or attempt to obtain at any time, any right, title -or interest by registration or otherwise in or to the trademarks, -service marks, copyrights, trade names, symbols, logos or designations -or other intellectual property rights owned or used by Cenqua. All -technical manuals or other information provided by Cenqua to the -Licensee shall be the sole property of Cenqua. - -4. Term and Termination - -Subject to the other provisions hereof, this Agreement shall commence -upon the Licensee's opting into this Agreement and continue until the -Licensee discontinues use of the Software or the Agreement terminates -automatically upon the Licensee's breach of any term or condition of -this Agreement (the "Term"). Upon any such termination, the Licensee -will delete the Software immediately. - -5. Copying & Transfer - -The Licensee may copy the Software for back-up purposes only. The -Licensee may not assign or otherwise transfer the Software to any -third party. - -6. Specific Disclaimer of Warranty and Limitation of Liability - -THE SOFTWARE IS PROVIDED WITHOUT WARRANTY OF ANY KIND. CENQUA -DISCLAIMS ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING BUT NOT -LIMITED TO THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. CENQUA WILL NOT BE LIABLE FOR ANY DAMAGES -ASSOCIATED WITH THE SOFTWARE, INCLUDING, WITHOUT LIMITATION, ORDINARY, -INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES OF ANY KIND, INCLUDING -BUT NOT LIMITED TO DAMAGES RELATING TO LOST DATA OR LOST PROFITS, EVEN -IF CENQUA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. Warranties and Representations - -Licensee Indemnification. CENQUA agrees to indemnify, defend and hold -the Licensee harmless from and against any and all liabilities, -damages, losses, claims, costs, and expenses (including reasonable -legal fees) arising out of or resulting from the Software or the use -thereof infringing upon, misappropriating or violating any patents, -copyrights, trademarks, or trade secret rights or other proprietary -rights of persons, firms or entities who are not parties to this -Agreement. - -CENQUA Indemnification. The Licensee warrants and represents that the -Licensee's actions with regard to the Software will be in compliance -with all applicable laws; and the Licensee agrees to indemnify, -defend, and hold CENQUA harmless from and against any and all -liabilities, damages, losses, claims, costs, and expenses (including -reasonable legal fees) arising out of or resulting from the -Licensee's failure to observe the use restrictions set forth herein. - -8. Publicity - -The Licensee grants permission for CENQUA to use Licensee's name -solely in customer lists. CENQUA shall not, without prior consent in -writing, use the Licensee's name, or that of its affiliates, in any -form with the specific exception of customer lists. CENQUA agrees to -remove Licensee's name from any and all materials within 7 days if -notified by the Licensee in writing. - -9. Governing Law - -This Agreement shall be governed by the laws of New South Wales, -Australia. - -10. Independent Contractors - -The parties are independent contractors with respect to each other, -and nothing in this Agreement shall be construed as creating an -employer-employee relationship, a partnership, agency relationship or -a joint venture between the parties. - -11. Assignment - -This Agreement is not assignable or transferable by the Licensee. -CENQUA in its sole discretion may transfer a license to a third party -at the written request of the Licensee. - -12. Entire Agreement - -This Agreement constitutes the entire agreement between the parties -concerning the Licensee's use of the Software. This Agreement -supersedes any prior verbal understanding between the parties and any -Licensee purchase order or other ordering document, regardless of -whether such document is received by CENQUA before or after execution -of this Agreement. This Agreement may be amended only in writing by -CENQUA. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sm...@us...> - 2008-09-02 21:41:31
|
Revision: 768 http://jetrix.svn.sourceforge.net/jetrix/?rev=768&view=rev Author: smanux Date: 2008-09-02 21:41:15 +0000 (Tue, 02 Sep 2008) Log Message: ----------- Removed the dependency on Commons Collections Modified Paths: -------------- jetrix/trunk/build.xml jetrix/trunk/lib/commons-digester.jar jetrix/trunk/pom.xml jetrix/trunk/src/java/net/jetrix/Channel.java jetrix/trunk/src/java/net/jetrix/ClientRepository.java jetrix/trunk/src/java/net/jetrix/commands/CommandManager.java jetrix/trunk/src/java/net/jetrix/filter/CommandFilter.java jetrix/trunk/src/java/net/jetrix/listeners/ClientListener.java jetrix/trunk/src/java/net/jetrix/messages/ChannelMessage.java jetrix/trunk/src/java/net/jetrix/protocols/IRCProtocol.java Added Paths: ----------- jetrix/trunk/project.properties Removed Paths: ------------- jetrix/trunk/lib/commons-collections.jar Modified: jetrix/trunk/build.xml =================================================================== --- jetrix/trunk/build.xml 2008-09-02 19:42:47 UTC (rev 767) +++ jetrix/trunk/build.xml 2008-09-02 21:41:15 UTC (rev 768) @@ -149,7 +149,6 @@ <!-- Pack the dependencies --> <antcall target="pack.lib" inheritAll="true"><param name="library" value="commons-digester"/></antcall> - <antcall target="pack.lib" inheritAll="true"><param name="library" value="commons-collections"/></antcall> <antcall target="pack.lib" inheritAll="true"><param name="library" value="commons-beanutils"/></antcall> <antcall target="pack.lib" inheritAll="true"><param name="library" value="commons-lang-2.0-light"/></antcall> <antcall target="pack.lib" inheritAll="true"><param name="library" value="jetty"/></antcall> Modified: jetrix/trunk/pom.xml =================================================================== --- jetrix/trunk/pom.xml 2008-09-02 19:42:47 UTC (rev 767) +++ jetrix/trunk/pom.xml 2008-09-02 21:41:15 UTC (rev 768) @@ -93,12 +93,6 @@ <dependencies> <dependency> - <groupId>commons-collections</groupId> - <artifactId>commons-collections</artifactId> - <version>2.1</version> - </dependency> - - <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>2.0</version> Added: jetrix/trunk/project.properties =================================================================== --- jetrix/trunk/project.properties (rev 0) +++ jetrix/trunk/project.properties 2008-09-02 21:41:15 UTC (rev 768) @@ -0,0 +1,2 @@ +version=0.3-dev +version.stable=0.2.3 Property changes on: jetrix/trunk/project.properties ___________________________________________________________________ Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native Modified: jetrix/trunk/src/java/net/jetrix/Channel.java =================================================================== --- jetrix/trunk/src/java/net/jetrix/Channel.java 2008-09-02 19:42:47 UTC (rev 767) +++ jetrix/trunk/src/java/net/jetrix/Channel.java 2008-09-02 21:41:15 UTC (rev 768) @@ -33,8 +33,6 @@ import net.jetrix.winlist.*; import net.jetrix.clients.TetrinetClient; -import org.apache.commons.collections.*; - /** * Game channel. * @@ -614,14 +612,14 @@ { // players... JoinMessage mjoin2 = new JoinMessage(); - mjoin2.setChannel(this); + mjoin2.setChannelName(getConfig().getName()); mjoin2.setSlot(i + 1); mjoin2.setName(resident.getUser().getName()); // NPE client.send(mjoin2); // ...and teams TeamMessage mteam = new TeamMessage(); - mteam.setChannel(this); + mteam.setChannelName(getConfig().getName()); mteam.setSource(resident); mteam.setSlot(i + 1); mteam.setName(resident.getUser().getTeam()); @@ -685,7 +683,7 @@ if (gameState != STOPPED) { IngameMessage ingame = new IngameMessage(); - ingame.setChannel(this); + ingame.setChannelName(getConfig().getName()); client.send(ingame); // tell the player if the game is currently paused @@ -1041,7 +1039,17 @@ */ public Iterator<Client> getSpectators() { - return new FilterIterator(clients.iterator(), ClientRepository.SPECTATOR_PREDICATE); + List<Client> spectators = new ArrayList<Client>(); + + for (Client client : clients) + { + if (client.getUser().isSpectator()) + { + spectators.add(client); + } + } + + return spectators.iterator(); } /** Modified: jetrix/trunk/src/java/net/jetrix/ClientRepository.java =================================================================== --- jetrix/trunk/src/java/net/jetrix/ClientRepository.java 2008-09-02 19:42:47 UTC (rev 767) +++ jetrix/trunk/src/java/net/jetrix/ClientRepository.java 2008-09-02 21:41:15 UTC (rev 768) @@ -19,11 +19,14 @@ package net.jetrix; -import java.net.*; -import java.util.*; +import java.net.InetAddress; +import java.util.Collection; +import java.util.Iterator; +import java.util.Map; +import java.util.List; +import java.util.ArrayList; +import java.util.concurrent.ConcurrentSkipListMap; -import org.apache.commons.collections.*; - /** * Repository of clients connected to the server. * @@ -33,40 +36,10 @@ public class ClientRepository { private static ClientRepository instance = new ClientRepository(); - private Map<String, Client> clients; + private Map<String, Client> clients = new ConcurrentSkipListMap<String, Client>(); - public static final Predicate PLAYER_PREDICATE = new Predicate() - { - public boolean evaluate(Object obj) - { - Client client = (Client) obj; - return client.getUser().isPlayer(); - } - }; - - public static final Predicate SPECTATOR_PREDICATE = new Predicate() - { - public boolean evaluate(Object obj) - { - Client client = (Client) obj; - return client.getUser().isSpectator(); - } - }; - - public static final Predicate OPERATOR_PREDICATE = new Predicate() - { - public boolean evaluate(Object obj) - { - Client client = (Client) obj; - return client.getUser().getAccessLevel() > 0; - } - }; - private ClientRepository() { - FastTreeMap map = new FastTreeMap(); - map.setFast(true); - clients = map; } public static ClientRepository getInstance() @@ -105,7 +78,17 @@ */ public Iterator<Client> getPlayers() { - return new FilterIterator(clients.values().iterator(), PLAYER_PREDICATE); + List<Client> player = new ArrayList<Client>(); + + for (Client client : clients.values()) + { + if (client.getUser().isPlayer()) + { + player.add(client); + } + } + + return player.iterator(); } /** @@ -113,7 +96,16 @@ */ public int getPlayerCount() { - return CollectionUtils.select(clients.values(), PLAYER_PREDICATE).size(); + int count = 0; + for (Client client : clients.values()) + { + if (client.getUser().isPlayer()) + { + count++; + } + } + + return count; } /** @@ -121,7 +113,17 @@ */ public Iterator<Client> getSpectators() { - return new FilterIterator(clients.values().iterator(), SPECTATOR_PREDICATE); + List<Client> spectators = new ArrayList<Client>(); + + for (Client client : clients.values()) + { + if (client.getUser().isSpectator()) + { + spectators.add(client); + } + } + + return spectators.iterator(); } /** @@ -129,7 +131,16 @@ */ public int getSpectatorCount() { - return CollectionUtils.select(clients.values(), SPECTATOR_PREDICATE).size(); + int count = 0; + for (Client client : clients.values()) + { + if (client.getUser().isSpectator()) + { + count++; + } + } + + return count; } /** @@ -137,7 +148,17 @@ */ public Iterator<Client> getOperators() { - return new FilterIterator(clients.values().iterator(), OPERATOR_PREDICATE); + List<Client> operators = new ArrayList<Client>(); + + for (Client client : clients.values()) + { + if (client.getUser().getAccessLevel() > 0) + { + operators.add(client); + } + } + + return operators.iterator(); } /** Modified: jetrix/trunk/src/java/net/jetrix/commands/CommandManager.java =================================================================== --- jetrix/trunk/src/java/net/jetrix/commands/CommandManager.java 2008-09-02 19:42:47 UTC (rev 767) +++ jetrix/trunk/src/java/net/jetrix/commands/CommandManager.java 2008-09-02 21:41:15 UTC (rev 768) @@ -21,8 +21,6 @@ import java.util.*; -import org.apache.commons.collections.*; - import net.jetrix.*; import net.jetrix.messages.*; @@ -142,16 +140,17 @@ */ public Iterator<Command> getCommands(final int accessLevel) { - Predicate availableToLevel = new Predicate() + List<Command> commands = new ArrayList<Command>(); + + for (Command command : commandSet.values()) { - public boolean evaluate(Object obj) + if (command.getAccessLevel() <= accessLevel) { - Command command = (Command) obj; - return command.getAccessLevel() <= accessLevel; + commands.add(command); } - }; + } - return new FilterIterator(commandSet.values().iterator(), availableToLevel); + return commands.iterator(); } /** Modified: jetrix/trunk/src/java/net/jetrix/filter/CommandFilter.java =================================================================== --- jetrix/trunk/src/java/net/jetrix/filter/CommandFilter.java 2008-09-02 19:42:47 UTC (rev 767) +++ jetrix/trunk/src/java/net/jetrix/filter/CommandFilter.java 2008-09-02 21:41:15 UTC (rev 768) @@ -22,6 +22,7 @@ import java.util.*; import java.util.logging.*; +import net.jetrix.Message; import net.jetrix.messages.*; import net.jetrix.commands.*; @@ -59,9 +60,8 @@ } } - public void onMessage(CommandMessage m, List out) + public void onMessage(CommandMessage m, List<Message> out) { - for (String alias : command.getAliases()) { if (m.getCommand().equals(alias)) Modified: jetrix/trunk/src/java/net/jetrix/listeners/ClientListener.java =================================================================== --- jetrix/trunk/src/java/net/jetrix/listeners/ClientListener.java 2008-09-02 19:42:47 UTC (rev 767) +++ jetrix/trunk/src/java/net/jetrix/listeners/ClientListener.java 2008-09-02 21:41:15 UTC (rev 768) @@ -91,7 +91,7 @@ InetAddress address = socket.getInetAddress(); // log the connection - log.info("Incoming client " + address.getHostAddress() + ":" + socket.getPort()); + log.info("Incoming " + getName() + " client " + address.getHostAddress() + ":" + socket.getPort()); // test the ban list if (Banlist.getInstance().isBanned(address)) Modified: jetrix/trunk/src/java/net/jetrix/messages/ChannelMessage.java =================================================================== --- jetrix/trunk/src/java/net/jetrix/messages/ChannelMessage.java 2008-09-02 19:42:47 UTC (rev 767) +++ jetrix/trunk/src/java/net/jetrix/messages/ChannelMessage.java 2008-09-02 21:41:15 UTC (rev 768) @@ -30,6 +30,7 @@ public abstract class ChannelMessage extends Message { private int slot; + private String channelName; public int getSlot() { @@ -41,13 +42,13 @@ this.slot = slot; } - public Channel getChannel() + public String getChannelName() { - return (Channel) getDestination(); + return channelName; } - public void setChannel(Channel channel) + public void setChannelName(String channelName) { - setDestination(channel); + this.channelName = channelName; } } Modified: jetrix/trunk/src/java/net/jetrix/protocols/IRCProtocol.java =================================================================== --- jetrix/trunk/src/java/net/jetrix/protocols/IRCProtocol.java 2008-09-02 19:42:47 UTC (rev 767) +++ jetrix/trunk/src/java/net/jetrix/protocols/IRCProtocol.java 2008-09-02 21:41:15 UTC (rev 768) @@ -144,12 +144,7 @@ message.setNick("jetrix"); } - Channel channel = m.getChannel(); - String name = "#jetrix"; - if (channel != null) - { - name = "#" + channel.getConfig().getName(); - } + String name = m.getChannelName() == null ? "#jetrix" : "#" + m.getChannelName(); message.addParameter(name); message.addParameter(applyStyle(m.getText(locale))); @@ -171,12 +166,7 @@ message.setNick("jetrix"); } - Channel channel = m.getChannel(); - String name = "#jetrix"; - if (channel != null) - { - name = "#" + channel.getConfig().getName(); - } + String name = m.getChannelName() == null ? "#jetrix" : "#" + m.getChannelName(); message.addParameter(name); message.addParameter(applyStyle("\u0001ACTION " + m.getText(locale) + "\u0001")); @@ -198,12 +188,7 @@ message.setNick("jetrix"); } - Channel channel = m.getChannel(); - String name = "#jetrix"; - if (channel != null) - { - name = "#" + channel.getConfig().getName(); - } + String name = m.getChannelName() == null ? "#jetrix" : "#" + m.getChannelName(); // todo remove the <name> of the player at the beginning of the message @@ -239,7 +224,7 @@ IRCMessage message = new IRCMessage(IRCCommand.PRIVMSG); message.setNick("jetrix"); - message.addParameter("#" + m.getChannel().getConfig().getName()); + message.addParameter("#" + m.getChannelName()); String messageKey = m.getName() == null ? "channel.team.none" : "channel.team.new"; Object[] params = new Object[] { client.getUser().getName(), m.getName() }; @@ -252,7 +237,7 @@ { IRCMessage message = new IRCMessage(IRCCommand.JOIN); message.setNick(m.getName()); - message.addParameter("#" + m.getChannel().getConfig().getName()); + message.addParameter("#" + m.getChannelName()); return message.toString(); } @@ -261,7 +246,7 @@ { IRCMessage message = new IRCMessage(IRCCommand.PART); message.setNick(m.getName()); - message.addParameter("#" + m.getChannel().getConfig().getName()); + message.addParameter("#" + m.getChannelName()); return message.toString(); } @@ -270,7 +255,7 @@ { IRCMessage message = new IRCMessage(IRCCommand.PRIVMSG); message.setNick("jetrix"); - message.addParameter("#" + m.getChannel().getConfig().getName()); + message.addParameter("#" + m.getChannelName()); message.addParameter(applyStyle(Language.getText("channel.game.start", locale))); return message.toString(); @@ -280,7 +265,7 @@ { IRCMessage message = new IRCMessage(IRCCommand.PRIVMSG); message.setNick("jetrix"); - message.addParameter("#" + m.getChannel().getConfig().getName()); + message.addParameter("#" + m.getChannelName()); message.addParameter(applyStyle(Language.getText("channel.game.stop", locale))); return message.toString(); @@ -290,7 +275,7 @@ { IRCMessage message = new IRCMessage(IRCCommand.PRIVMSG); message.setNick("jetrix"); - message.addParameter("#" + m.getChannel().getConfig().getName()); + message.addParameter("#" + m.getChannelName()); message.addParameter(applyStyle(Language.getText("channel.game.running", locale))); return message.toString(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sm...@us...> - 2008-11-11 23:12:24
|
Revision: 774 http://jetrix.svn.sourceforge.net/jetrix/?rev=774&view=rev Author: smanux Date: 2008-11-11 23:12:19 +0000 (Tue, 11 Nov 2008) Log Message: ----------- Implementation of the database connection Modified Paths: -------------- jetrix/trunk/build.xml jetrix/trunk/pom.xml jetrix/trunk/src/admin/WEB-INF/classes/net/jetrix/servlets/ServerAction.java jetrix/trunk/src/admin/server.jsp jetrix/trunk/src/etc/tetrinet-server.dtd jetrix/trunk/src/java/net/jetrix/Server.java jetrix/trunk/src/java/net/jetrix/config/ServerConfig.java jetrix/trunk/src/java/net/jetrix/config/ServerRuleSet.java Added Paths: ----------- jetrix/trunk/lib/commons-dbcp-1.2.2.jar jetrix/trunk/lib/commons-pool-1.4.jar jetrix/trunk/src/java/net/jetrix/DataSourceManager.java jetrix/trunk/src/java/net/jetrix/config/DataSourceConfig.java Modified: jetrix/trunk/build.xml =================================================================== --- jetrix/trunk/build.xml 2008-11-11 23:03:21 UTC (rev 773) +++ jetrix/trunk/build.xml 2008-11-11 23:12:19 UTC (rev 774) @@ -151,6 +151,8 @@ <antcall target="pack.lib" inheritAll="true"><param name="library" value="commons-digester"/></antcall> <antcall target="pack.lib" inheritAll="true"><param name="library" value="commons-beanutils"/></antcall> <antcall target="pack.lib" inheritAll="true"><param name="library" value="commons-lang-2.0-light"/></antcall> + <antcall target="pack.lib" inheritAll="true"><param name="library" value="commons-pool-1.4"/></antcall> + <antcall target="pack.lib" inheritAll="true"><param name="library" value="commons-dbcp-1.2.2"/></antcall> <antcall target="pack.lib" inheritAll="true"><param name="library" value="jetty"/></antcall> <antcall target="pack.lib" inheritAll="true"><param name="library" value="servlet-light"/></antcall> <antcall target="pack.lib" inheritAll="true"><param name="library" value="jasper-runtime"/></antcall> Added: jetrix/trunk/lib/commons-dbcp-1.2.2.jar =================================================================== (Binary files differ) Property changes on: jetrix/trunk/lib/commons-dbcp-1.2.2.jar ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: jetrix/trunk/lib/commons-pool-1.4.jar =================================================================== (Binary files differ) Property changes on: jetrix/trunk/lib/commons-pool-1.4.jar ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: jetrix/trunk/pom.xml =================================================================== --- jetrix/trunk/pom.xml 2008-11-11 23:03:21 UTC (rev 773) +++ jetrix/trunk/pom.xml 2008-11-11 23:12:19 UTC (rev 774) @@ -117,6 +117,18 @@ </dependency> <dependency> + <groupId>commons-pool</groupId> + <artifactId>commons-pool</artifactId> + <version>1.4</version> + </dependency> + + <dependency> + <groupId>commons-dbcp</groupId> + <artifactId>commons-dbcp</artifactId> + <version>1.2.2</version> + </dependency> + + <dependency> <groupId>jetty</groupId> <artifactId>jetty</artifactId> <version>4.1-rc1</version> @@ -148,7 +160,7 @@ <directory>src/etc</directory> <targetPath>/</targetPath> <includes> - <include>*.xml</include> + <include>**/*.xml</include> <include>*.dtd</include> </includes> </testResource> Modified: jetrix/trunk/src/admin/WEB-INF/classes/net/jetrix/servlets/ServerAction.java =================================================================== --- jetrix/trunk/src/admin/WEB-INF/classes/net/jetrix/servlets/ServerAction.java 2008-11-11 23:03:21 UTC (rev 773) +++ jetrix/trunk/src/admin/WEB-INF/classes/net/jetrix/servlets/ServerAction.java 2008-11-11 23:12:19 UTC (rev 774) @@ -108,6 +108,19 @@ String pattern = request.getParameter("pattern"); Banlist.getInstance().unban(pattern); } + else if ("datasource.update".equals(action)) + { + DataSourceConfig datasourceConfig = new DataSourceConfig(); + datasourceConfig.setDriver(request.getParameter("driver")); + datasourceConfig.setUrl(request.getParameter("url")); + datasourceConfig.setUsername(request.getParameter("username")); + datasourceConfig.setPassword(request.getParameter("password")); + datasourceConfig.setMinIdle(Integer.parseInt(request.getParameter("minIdle"))); + datasourceConfig.setMaxActive(Integer.parseInt(request.getParameter("maxActive"))); + + config.setDataSource(datasourceConfig); + DataSourceManager.getInstance().setDataSource(datasourceConfig); + } else if ("gc".equals(action)) { System.gc(); Modified: jetrix/trunk/src/admin/server.jsp =================================================================== --- jetrix/trunk/src/admin/server.jsp 2008-11-11 23:03:21 UTC (rev 773) +++ jetrix/trunk/src/admin/server.jsp 2008-11-11 23:12:19 UTC (rev 774) @@ -40,8 +40,8 @@ <table class="thin" style="width: 600px"> <tr> - <td width="20%">Version</td> - <td width="80%"> + <th width="25%">Version</th> + <td width="75%"> <%= ServerConfig.VERSION %> <% if (VersionService.isNewVersionAvailable()) { %> <span style="color: red; padding-left: 2em">new version available (<%= VersionService.getLatestVersion() %>), <a href="http://jetrix.sourceforge.net">download it</a> now!</span> @@ -49,11 +49,11 @@ </td> </tr> <tr> - <td>Name</td> + <th>Name</th> <td><input class="thin" type="text" name="name" value="<%= conf.getName() != null ? conf.getName() : "" %>"></td> </tr> <tr> - <td>Host</td> + <th>Host</th> <td> <select name="host"> <option value="[ALL]">All Interfaces</option> @@ -79,28 +79,26 @@ </td> </tr> <tr> - <td>Max Players</td> + <th>Max Players</th> <td><input class="thin" type="text" name="maxPlayers" value="<%= conf.getMaxPlayers() %>"></td> </tr> <tr> - <td>Max Connections</td> + <th>Max Connections</th> <td><input class="thin" type="text" name="maxConnections" value="<%= conf.getMaxConnections() %>"></td> </tr> <tr> - <td>Operator Password</td> + <th>Operator Password</th> <td><input class="thin" type="text" name="opPassword" value="<%= conf.getOpPassword() != null ? conf.getOpPassword() : "" %>"></td> </tr> <tr> - <td>Administrator Password</td> + <th>Administrator Password</th> <td><input class="thin" type="text" name="adminPassword" value="<%= conf.getAdminPassword() != null ? conf.getAdminPassword() : "" %>"></td> </tr> <tr> - <td>Default Language</td> + <th>Default Language</th> <td> -<% Iterator locales = Language.getLocales().iterator(); %> <select class="thin" name="locale"> -<% while (locales.hasNext()) { - Locale locale = (Locale) locales.next(); %> +<% for (Locale locale : Language.getLocales()) { %> <option value="<%= locale.getLanguage() %>" <%= conf.getLocale().equals(locale) ? "selected" : "" %>> <%= locale.getLanguage().toUpperCase() %> - <%= locale.getDisplayLanguage() %> </option> @@ -109,7 +107,7 @@ </td> </tr> <tr> - <td>Status</td> + <th>Status</th> <td> <table> <tr> @@ -122,7 +120,7 @@ </td> </tr> <tr> - <td valign="top">Message of the day</td> + <th valign="top">Message of the day</th> <td><textarea class="thin" name="motd" cols="20" rows="5" style="width: 100%"><%= conf.getMessageOfTheDay() %></textarea></td> </tr> </table> @@ -391,21 +389,62 @@ <table class="thin" style="width: 400px"> <tr> - <td width="30%">Uptime</td> + <th width="35%">Uptime</th> <td><%= conf.getStatistics().getUpTime() %> day<%= conf.getStatistics().getUpTime() > 1 ? "s" : "" %></td> </tr> <tr> - <td>Number of Connections</td> + <th>Number of Connections</th> <td><%= conf.getStatistics().getConnectionCount() %></td> </tr> <tr> - <td>Games Played</td> + <th>Games Played</th> <td><%= conf.getStatistics().getGameCount() %></td> </tr> </table> </div> + <div class="tab-page" style="height: 400px"> + <h2 class="tab">Database</h2> + + <form id="datasource" action="/servlet/<%= ServerAction.class.getName() %>"> + <input type="hidden" name="action" value="datasource.update"> + + <table class="thin" style="width: 400px"> + <tr> + <th width="30%">Driver</th> + <td><input class="thin" type="text" name="driver" value="<%= conf.getDataSource().getDriver() %>" style="width: 98%"></td> + </tr> + <tr> + <th>URL</th> + <td><input class="thin" type="text" name="url" value="<%= conf.getDataSource().getUrl() %>" style="width: 98%"></td> + </tr> + <tr> + <th>Username</th> + <td><input class="thin" type="text" name="username" value="<%= conf.getDataSource().getUsername() %>"></td> + </tr> + <tr> + <th>Password</th> + <td><input class="thin" type="text" name="password" value="<%= conf.getDataSource().getPassword() %>"></td> + </tr> + <tr> + <th>Min Idle</th> + <td><input class="thin" type="text" name="minIdle" value="<%= conf.getDataSource().getMinIdle() %>"></td> + </tr> + <tr> + <th>Max Active</th> + <td><input class="thin" type="text" name="maxActive" value="<%= conf.getDataSource().getMaxActive() %>"></td> + </tr> + </table> + + <br> + + <input type="submit" value="Update"> + + </form> + </div> + + <div class="tab-page" style="height: 400px"> <h2 class="tab">System</h2> <% @@ -417,7 +456,7 @@ <table class="thin" style="width: 600px"> <tr> - <td width="30%">Java Virtual Machine</td> + <th width="30%">Java Virtual Machine</th> <td> <%= System.getProperty("java.vm.name") %> (build <%= System.getProperty("java.vm.version") %>, @@ -425,14 +464,14 @@ </td> </tr> <tr> - <td>Java Runtime Environment</td> + <th>Java Runtime Environment</th> <td> <%= System.getProperty("java.runtime.name") %> (build <%= System.getProperty("java.vm.version") %>) </td> </tr> <tr> - <td>Operating System</td> + <th>Operating System</th> <td> <%= System.getProperty("os.name") %> <%= System.getProperty("os.version") %> @@ -440,7 +479,7 @@ </td> </tr> <tr> - <td>Processor(s)</td> + <th>Processor(s)</th> <td><%= runtime.availableProcessors() %></td> </tr> </table> @@ -450,15 +489,15 @@ <table class="thin" style="width: 600px"> <tr> - <td width="30%">Total Memory</td> + <th width="30%">Total Memory</th> <td><%= df.format(runtime.totalMemory()/1024d/1024d) %> Mb</td> </tr> <tr> - <td>Max Memory</td> + <th>Max Memory</th> <td><%= df.format(runtime.maxMemory()/1024d/1024d) %> Mb</td> </tr> <tr> - <td>Free Memory</td> + <th>Free Memory</th> <td><%= df.format(runtime.freeMemory()/1024d/1024d) %> Mb</td> </tr> </table> Modified: jetrix/trunk/src/etc/tetrinet-server.dtd =================================================================== --- jetrix/trunk/src/etc/tetrinet-server.dtd 2008-11-11 23:03:21 UTC (rev 773) +++ jetrix/trunk/src/etc/tetrinet-server.dtd 2008-11-11 23:12:19 UTC (rev 774) @@ -67,8 +67,10 @@ <!ELEMENT nick (#PCDATA)> <!ELEMENT team (#PCDATA)> -<!ELEMENT datasource (driver, url, username, password?)> +<!ELEMENT datasource (driver, url, username, password?, min-idle?, max-active?)> <!ELEMENT driver (#PCDATA)> <!ELEMENT url (#PCDATA)> <!ELEMENT username (#PCDATA)> <!ELEMENT password (#PCDATA)> +<!ELEMENT min-idle (#PCDATA)> +<!ELEMENT max-active (#PCDATA)> Added: jetrix/trunk/src/java/net/jetrix/DataSourceManager.java =================================================================== --- jetrix/trunk/src/java/net/jetrix/DataSourceManager.java (rev 0) +++ jetrix/trunk/src/java/net/jetrix/DataSourceManager.java 2008-11-11 23:12:19 UTC (rev 774) @@ -0,0 +1,128 @@ +/** + * Jetrix TetriNET Server + * Copyright (C) 2008 Emmanuel Bourg + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +package net.jetrix; + +import java.util.HashMap; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.sql.SQLException; +import javax.sql.DataSource; + +import org.apache.commons.dbcp.BasicDataSource; + +import net.jetrix.config.DataSourceConfig; + +/** + * Manage the connection pools to the databases. + * + * @author Emmanuel Bourg + * @version $Revision$, $Date$ + * @since 0.3 + */ +public final class DataSourceManager +{ + private Logger log = Logger.getLogger(getClass().getName()); + + private static DataSourceManager instance = new DataSourceManager(); + + private Map<String, DataSource> datasources = new HashMap<String, DataSource>(); + + /** Key of the default datasource. */ + private static final String DEFAULT_DATASOURCE = "DEFAULT"; + + private DataSourceManager() + { + } + + public static DataSourceManager getInstance() + { + return instance; + } + + /** + * Returns the default datasource. + */ + public DataSource getDataSource() + { + return getDataSource(DEFAULT_DATASOURCE); + } + + public DataSource getDataSource(String environnement) + { + return (DataSource) datasources.get(environnement); + } + + /** + * Configure the default datasource. + */ + public void setDataSource(DataSourceConfig config) + { + setDataSource(config, DEFAULT_DATASOURCE); + } + + /** + * Configure a datasource. + * + * @param config the configuration of the datasource + * @param environment the environment of the datasource + */ + public void setDataSource(DataSourceConfig config, String environment) + { + try + { + Class.forName(config.getDriver()); + } + catch (ClassNotFoundException e) + { + log.warning("Unable to find the database driver (" + config.getDriver() + "), put the related jar in the lib directory"); + return; + } + + try + { + // close the previous datasource if necessary + if (datasources.containsKey(environment)) + { + BasicDataSource datasource = (BasicDataSource) datasources.get(environment); + datasource.close(); + } + + BasicDataSource datasource = new BasicDataSource(); + datasource.setDefaultAutoCommit(false); + + datasource.setDriverClassName(config.getDriver()); + datasource.setUrl(config.getUrl()); + datasource.setUsername(config.getUsername()); + datasource.setPassword(config.getPassword()); + datasource.setMinIdle(config.getMinIdle() != 0 ? config.getMinIdle() : 1); + datasource.setMaxActive(config.getMaxActive() != 0 ? config.getMaxActive() : 50); + + // attempts to open the connection + datasource.getConnection().close(); + + datasources.put(environment, datasource); + } + catch (Exception e) + { + log.log(Level.SEVERE, "Unable to configure the datasource '" + environment + "'", e); + } + } +} Property changes on: jetrix/trunk/src/java/net/jetrix/DataSourceManager.java ___________________________________________________________________ Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native Modified: jetrix/trunk/src/java/net/jetrix/Server.java =================================================================== --- jetrix/trunk/src/java/net/jetrix/Server.java 2008-11-11 23:03:21 UTC (rev 773) +++ jetrix/trunk/src/java/net/jetrix/Server.java 2008-11-11 23:12:19 UTC (rev 774) @@ -89,6 +89,13 @@ // prepare the loggers LogManager.init(); + + // open the database connection + if (config.getDataSource() != null) + { + log.info("Initializing the datasource..."); + DataSourceManager.getInstance().setDataSource(config.getDataSource()); + } // display the systray icon (windows only) SystrayManager.open(); Added: jetrix/trunk/src/java/net/jetrix/config/DataSourceConfig.java =================================================================== --- jetrix/trunk/src/java/net/jetrix/config/DataSourceConfig.java (rev 0) +++ jetrix/trunk/src/java/net/jetrix/config/DataSourceConfig.java 2008-11-11 23:12:19 UTC (rev 774) @@ -0,0 +1,96 @@ +/** + * Jetrix TetriNET Server + * Copyright (C) 2008 Emmanuel Bourg + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +package net.jetrix.config; + +/** + * Configuration for a pool of connections to a database. + * + * @author Emmanuel Bourg + * @version $Revision$, $Date$ + */ +public class DataSourceConfig +{ + private String url; + private String driver; + private String username; + private String password; + private int minIdle; + private int maxActive; + + public String getUrl() + { + return url; + } + + public void setUrl(String url) + { + this.url = url; + } + + public String getDriver() + { + return driver; + } + + public void setDriver(String driver) + { + this.driver = driver; + } + + public String getUsername() + { + return username; + } + + public void setUsername(String username) + { + this.username = username; + } + + public String getPassword() + { + return password; + } + + public void setPassword(String password) + { + this.password = password; + } + + public int getMinIdle() + { + return minIdle; + } + + public void setMinIdle(int minIdle) + { + this.minIdle = minIdle; + } + + public int getMaxActive() + { + return maxActive; + } + + public void setMaxActive(int maxActive) + { + this.maxActive = maxActive; + } +} Property changes on: jetrix/trunk/src/java/net/jetrix/config/DataSourceConfig.java ___________________________________________________________________ Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native Modified: jetrix/trunk/src/java/net/jetrix/config/ServerConfig.java =================================================================== --- jetrix/trunk/src/java/net/jetrix/config/ServerConfig.java 2008-11-11 23:03:21 UTC (rev 773) +++ jetrix/trunk/src/java/net/jetrix/config/ServerConfig.java 2008-11-11 23:12:19 UTC (rev 774) @@ -67,11 +67,8 @@ private int status; private Statistics statistics; - // datasource parameters - private String dataSourceDriver; - private String dataSourceURL; - private String dataSourceUsername; - private String dataSourcePassword; + // datasource configuration + private DataSourceConfig datasourceConfig; private URL serverConfigURL; private URL channelsConfigURL; @@ -273,23 +270,47 @@ out.println(" </ban>"); out.println(); - out.println(" <!-- Database connection parameters -->"); - out.println(" <datasource>"); - out.println(" <!-- The class of the JDBC driver used -->"); - out.println(" <driver>" + dataSourceDriver + "</driver>"); - out.println(); - out.println(" <!-- The URL of the database (jdbc:<type>://<hostname>:<port>/<database>) -->"); - out.println(" <url>" + dataSourceURL + "</url>"); - out.println(); - out.println(" <!-- The username connecting to the database -->"); - out.println(" <username>" + dataSourceUsername + "</username>"); - out.println(); - out.println(" <!-- The password of the user -->"); - out.println(" <password>" + dataSourcePassword + "</password>"); - out.println(" </datasource>"); - out.println(); + if (datasourceConfig != null) + { + out.println(" <!-- Database connection parameters -->"); + out.println(" <datasource>"); + out.println(" <!-- The class of the JDBC driver used -->"); + out.println(" <driver>" + datasourceConfig.getDriver() + "</driver>"); + out.println(); + out.println(" <!-- The URL of the database (jdbc:<type>://<hostname>:<port>/<database>) -->"); + out.println(" <url>" + datasourceConfig.getUrl() + "</url>"); + out.println(); + out.println(" <!-- The username connecting to the database -->"); + out.println(" <username>" + datasourceConfig.getUsername() + "</username>"); + out.println(); + out.println(" <!-- The password of the user -->"); + if (datasourceConfig.getPassword() != null) + { + out.println(" <password>" + datasourceConfig.getPassword() + "</password>"); + } + else + { + out.println(" <password/>"); + } + if (datasourceConfig.getMinIdle() != 0) + { + out.println(); + out.println(" <!-- The minimum number of idle connections -->"); + out.println(" <min-idle>" + datasourceConfig.getMinIdle() + "</min-idle>"); + } + if (datasourceConfig.getMaxActive() != 0) + { + out.println(); + out.println(" <!-- The maximum number of active connections -->"); + out.println(" <max-active>" + datasourceConfig.getMaxActive() + "</max-active>"); + } + out.println(" </datasource>"); + out.println(); + } + out.println("</tetrinet-server>"); + out.flush(); out.close(); // save the channels.xml file @@ -911,65 +932,16 @@ /** * @since 0.3 */ - public String getDataSourceDriver() + public DataSourceConfig getDataSource() { - return dataSourceDriver; + return datasourceConfig; } /** * @since 0.3 */ - public void setDataSourceDriver(String driver) + public void setDataSource(DataSourceConfig datasourceConfig) { - this.dataSourceDriver = driver; + this.datasourceConfig = datasourceConfig; } - - /** - * @since 0.3 - */ - public String getDataSourceURL() - { - return dataSourceURL; - } - - /** - * @since 0.3 - */ - public void setDataSourceURL(String url) - { - this.dataSourceURL = url; - } - - /** - * @since 0.3 - */ - public String getDataSourceUsername() - { - return dataSourceUsername; - } - - /** - * @since 0.3 - */ - public void setDataSourceUsername(String username) - { - this.dataSourceUsername = username; - } - - /** - * @since 0.3 - */ - public String getDataSourcePassword() - { - return dataSourcePassword; - } - - /** - * @since 0.3 - */ - public void setDataSourcePassword(String password) - { - this.dataSourcePassword = password; - } - } Modified: jetrix/trunk/src/java/net/jetrix/config/ServerRuleSet.java =================================================================== --- jetrix/trunk/src/java/net/jetrix/config/ServerRuleSet.java 2008-11-11 23:03:21 UTC (rev 773) +++ jetrix/trunk/src/java/net/jetrix/config/ServerRuleSet.java 2008-11-11 23:12:19 UTC (rev 774) @@ -74,10 +74,14 @@ digester.addCallMethod("tetrinet-server/ban/host", "addBannedHost", 0); // datasource - digester.addCallMethod("*/datasource/driver", "setDataSourceDriver", 0); - digester.addCallMethod("*/datasource/url", "setDataSourceURL", 0); - digester.addCallMethod("*/datasource/username", "setDataSourceUsername", 0); - digester.addCallMethod("*/datasource/password", "setDataSourcePassword", 0); + digester.addObjectCreate("*/datasource", "net.jetrix.config.DataSourceConfig"); + digester.addSetNext("*/datasource", "setDataSource", "net.jetrix.config.DataSourceConfig"); + digester.addCallMethod("*/datasource/driver", "setDriver", 0); + digester.addCallMethod("*/datasource/url", "setUrl", 0); + digester.addCallMethod("*/datasource/username", "setUsername", 0); + digester.addCallMethod("*/datasource/password", "setPassword", 0); + digester.addCallMethod("*/datasource/min-idle", "setMinIdle", 0); + digester.addCallMethod("*/datasource/max-active", "setMaxActive", 0); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sm...@us...> - 2009-02-12 15:56:50
|
Revision: 784 http://jetrix.svn.sourceforge.net/jetrix/?rev=784&view=rev Author: smanux Date: 2009-02-12 15:56:40 +0000 (Thu, 12 Feb 2009) Log Message: ----------- Fixed the deploy task to make the jetrix shell script executable Modified Paths: -------------- jetrix/trunk/build.xml Property Changed: ---------------- jetrix/trunk/src/bin/jetrix jetrix/trunk/src/bin/update Modified: jetrix/trunk/build.xml =================================================================== --- jetrix/trunk/build.xml 2009-02-12 14:48:21 UTC (rev 783) +++ jetrix/trunk/build.xml 2009-02-12 15:56:40 UTC (rev 784) @@ -332,6 +332,8 @@ <delete dir="${deploy}"/> <mkdir dir="${deploy}"/> <unzip src="${dist}/bin/jetrix-${version}.zip" dest="${deploy}" /> + <chmod file="${deploy}/jetrix-${version}/jetrix" perm="+x"/> + <chmod file="${deploy}/jetrix-${version}/update" perm="+x"/> </target> <target name="run" depends="deploy"> Property changes on: jetrix/trunk/src/bin/jetrix ___________________________________________________________________ Added: svn:executable + * Property changes on: jetrix/trunk/src/bin/update ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sm...@us...> - 2009-02-12 16:11:45
|
Revision: 785 http://jetrix.svn.sourceforge.net/jetrix/?rev=785&view=rev Author: smanux Date: 2009-02-12 16:11:42 +0000 (Thu, 12 Feb 2009) Log Message: ----------- Added a --conf startup parameter to specify the path of the server configuration file (conf/server.xml by default) The path of the channels configuration file (channels.xml) is now defined in the server configuration file Modified Paths: -------------- jetrix/trunk/build.xml jetrix/trunk/src/bin/jetrix jetrix/trunk/src/etc/conf/server.xml jetrix/trunk/src/etc/tetrinet-server.dtd jetrix/trunk/src/java/net/jetrix/Launcher.java jetrix/trunk/src/java/net/jetrix/Server.java jetrix/trunk/src/java/net/jetrix/config/ChannelsRuleSet.java jetrix/trunk/src/java/net/jetrix/config/ServerConfig.java jetrix/trunk/src/java/net/jetrix/config/ServerRuleSet.java jetrix/trunk/src/test/net/jetrix/config/ServerConfigTest.java Modified: jetrix/trunk/build.xml =================================================================== --- jetrix/trunk/build.xml 2009-02-12 15:56:40 UTC (rev 784) +++ jetrix/trunk/build.xml 2009-02-12 16:11:42 UTC (rev 785) @@ -339,6 +339,8 @@ <target name="run" depends="deploy"> <java dir="${deploy}/jetrix-${version}" jar="${deploy}/jetrix-${version}/lib/jetrix-launcher-${version}.jar" fork="true"> <sysproperty key="jetrix.debug" value="true"/> + <arg value="--conf"/> + <arg value="conf/server.xml"/> </java> </target> Modified: jetrix/trunk/src/bin/jetrix =================================================================== --- jetrix/trunk/src/bin/jetrix 2009-02-12 15:56:40 UTC (rev 784) +++ jetrix/trunk/src/bin/jetrix 2009-02-12 16:11:42 UTC (rev 785) @@ -92,7 +92,9 @@ else - echo "Usage: jetrix.sh ( commands ... )" + echo "Jetrix TetriNET Server" + echo "" + echo "Usage: jetrix ( commands ... )" echo "commands:" echo " run Start Jetrix in the current window" echo " start Start Jetrix in a separate window" Modified: jetrix/trunk/src/etc/conf/server.xml =================================================================== --- jetrix/trunk/src/etc/conf/server.xml 2009-02-12 15:56:40 UTC (rev 784) +++ jetrix/trunk/src/etc/conf/server.xml 2009-02-12 16:11:42 UTC (rev 785) @@ -33,6 +33,9 @@ <!-- Error Log, where errors are logged to --> <error-log path="log/error%g.log" /> + <!-- Path to the channels descriptor file (relative to the current configuration file) --> + <channels path="channels.xml"/> + <!-- Client listeners --> <listeners> <listener class="net.jetrix.listeners.TetrinetListener"/> Modified: jetrix/trunk/src/etc/tetrinet-server.dtd =================================================================== --- jetrix/trunk/src/etc/tetrinet-server.dtd 2009-02-12 15:56:40 UTC (rev 784) +++ jetrix/trunk/src/etc/tetrinet-server.dtd 2009-02-12 16:11:42 UTC (rev 785) @@ -1,6 +1,6 @@ <!-- Jetrix TetriNET Server -Copyright (C) 2001-2005 Emmanuel Bourg +Copyright (C) 2001-2009 Emmanuel Bourg This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -23,7 +23,7 @@ <!ELEMENT tetrinet-server (name?, language?, timeout?, max-channels?, max-players?, max-connections?, op-password, admin-password, access-log, - error-log, listeners, services?, commands, ban?, datasource?)> + error-log, channels?, listeners, services?, commands, ban?, datasource?)> <!ATTLIST tetrinet-server host CDATA #IMPLIED> <!ELEMENT name (#PCDATA)> @@ -41,6 +41,9 @@ <!ELEMENT error-log EMPTY> <!ATTLIST error-log path CDATA #REQUIRED> +<!ELEMENT channels EMPTY> +<!ATTLIST channels path CDATA #REQUIRED> + <!ELEMENT commands (command*)> <!ELEMENT command EMPTY> <!ATTLIST command class CDATA #REQUIRED> Modified: jetrix/trunk/src/java/net/jetrix/Launcher.java =================================================================== --- jetrix/trunk/src/java/net/jetrix/Launcher.java 2009-02-12 15:56:40 UTC (rev 784) +++ jetrix/trunk/src/java/net/jetrix/Launcher.java 2009-02-12 16:11:42 UTC (rev 785) @@ -81,7 +81,7 @@ /** * Unpack the pack200 files in the specified directory * - * @param directory + * @param directory the directory containing the files to be unpacked */ private static void unpack(File directory) throws IOException { @@ -111,7 +111,7 @@ * Build a classloader including the jar and zip files in the specified * directories. The directories are also included in the classpath. * - * @param directories + * @param directories the directories containing the jars to be mounted in the classpath */ private static ClassLoader createClassLoader(File... directories) throws Exception { @@ -122,12 +122,12 @@ // add the jar and zip files in the directory to the classpath File[] files = directory.listFiles(); - for (int i = 0; i < files.length; i++) + for (File file : files) { - String filename = files[i].getAbsolutePath(); + String filename = file.getAbsolutePath(); if (filename.endsWith(".jar") || filename.endsWith(".zip")) { - urls.add(files[i].toURI().toURL()); + urls.add(file.toURI().toURL()); } } Modified: jetrix/trunk/src/java/net/jetrix/Server.java =================================================================== --- jetrix/trunk/src/java/net/jetrix/Server.java 2009-02-12 15:56:40 UTC (rev 784) +++ jetrix/trunk/src/java/net/jetrix/Server.java 2009-02-12 16:11:42 UTC (rev 785) @@ -1,6 +1,6 @@ /** * Jetrix TetriNET Server - * Copyright (C) 2001-2004 Emmanuel Bourg + * Copyright (C) 2001-2009 Emmanuel Bourg * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -19,6 +19,8 @@ package net.jetrix; +import java.io.*; +import java.util.*; import java.util.concurrent.*; import java.util.logging.*; @@ -30,7 +32,7 @@ import net.jetrix.listeners.ShutdownListener; /** - * Main class, starts server components. + * Main class, starts the server components and handle the server level messages. * * @author Emmanuel Bourg * @version $Revision$, $Date$ @@ -39,19 +41,18 @@ { private static Server instance; + private Logger log = Logger.getLogger("net.jetrix"); + + private File configFile; private ServerConfig config; - private BlockingQueue<Message> queue; + private BlockingQueue<Message> queue = new LinkedBlockingQueue<Message>(); private ChannelManager channelManager; - private Logger log = Logger.getLogger("net.jetrix"); private Client console; private Server() { - // spawn the server message queue - queue = new LinkedBlockingQueue<Message>(); - // add the stop hook - Runtime.getRuntime().addShutdownHook(new Thread() + Runtime.getRuntime().addShutdownHook(new Thread("StopHook") { public void run() { @@ -61,8 +62,6 @@ } } }); - - config = new ServerConfig(); } /** @@ -84,7 +83,8 @@ private void init() { // read the server configuration - config.load(); + config = new ServerConfig(); + config.load(configFile); config.setRunning(true); // prepare the loggers @@ -286,14 +286,37 @@ } /** + * Set the server configuration file. + */ + public void setConfigFile(File configFile) + { + this.configFile = configFile; + } + + /** * Server entry point. * * @param args start parameters */ public static void main(String[] args) { - System.out.println("Jetrix TetriNET Server " + ServerConfig.VERSION + ", Copyright (C) 2001-2008 Emmanuel Bourg\n"); + System.out.println("Jetrix TetriNET Server " + ServerConfig.VERSION + ", Copyright (C) 2001-2009 Emmanuel Bourg\n"); + Server server = Server.getInstance(); + + List<String> params = Arrays.asList(args); + + // read the path of the server configuration file + int p = params.indexOf("--conf"); + if (p != -1 && p + 1 < params.size()) + { + server.setConfigFile(new File(params.get(p + 1))); + } + else + { + server.setConfigFile(new File("conf/server.xml")); + } + server.start(); } Modified: jetrix/trunk/src/java/net/jetrix/config/ChannelsRuleSet.java =================================================================== --- jetrix/trunk/src/java/net/jetrix/config/ChannelsRuleSet.java 2009-02-12 15:56:40 UTC (rev 784) +++ jetrix/trunk/src/java/net/jetrix/config/ChannelsRuleSet.java 2009-02-12 16:11:42 UTC (rev 785) @@ -29,7 +29,7 @@ * @author Emmanuel Bourg * @version $Revision$, $Date$ */ -public class ChannelsRuleSet extends RuleSetBase +class ChannelsRuleSet extends RuleSetBase { public void addRuleInstances(Digester digester) Modified: jetrix/trunk/src/java/net/jetrix/config/ServerConfig.java =================================================================== --- jetrix/trunk/src/java/net/jetrix/config/ServerConfig.java 2009-02-12 15:56:40 UTC (rev 784) +++ jetrix/trunk/src/java/net/jetrix/config/ServerConfig.java 2009-02-12 16:11:42 UTC (rev 785) @@ -43,8 +43,15 @@ */ public class ServerConfig { + private static Logger log = Logger.getLogger("net.jetrix"); + public static final String ENCODING = "ISO-8859-1"; + public static final String VERSION = "@version@"; + + public static final int STATUS_OPENED = 0; + public static final int STATUS_LOCKED = 1; + private String name; private InetAddress host; private int timeout; @@ -55,17 +62,18 @@ private String adminPassword; private String accesslogPath; private String errorlogPath; + private String channelsFile = "channels.xml"; private String motd; private Locale locale; // private List bans; - private List<ChannelConfig> channels; - private List<FilterConfig> globalFilters; - private List<Listener> listeners; - private List<Service> services; + private List<ChannelConfig> channels = new ArrayList<ChannelConfig>(); + private List<FilterConfig> globalFilters = new ArrayList<FilterConfig>(); + private List<Listener> listeners = new ArrayList<Listener>(); + private List<Service> services = new ArrayList<Service>(); private boolean running; private int status; - private Statistics statistics; + private Statistics statistics = new Statistics(); // datasource configuration private DataSourceConfig datasourceConfig; @@ -73,66 +81,54 @@ private URL serverConfigURL; private URL channelsConfigURL; - public static final int STATUS_OPENED = 0; - public static final int STATUS_LOCKED = 1; - - public static final String VERSION = "@version@"; - - private static Logger log = Logger.getLogger("net.jetrix"); - /** - * Constructor declaration + * Load the configuration */ - public ServerConfig() + public void load(File file) { - channels = new ArrayList<ChannelConfig>(); - globalFilters = new ArrayList<FilterConfig>(); - listeners = new ArrayList<Listener>(); - services = new ArrayList<Service>(); - statistics = new Statistics(); + try + { + load(file.toURI().toURL()); + } + catch (MalformedURLException e) + { + log.log(Level.SEVERE, "Unable to load the configuration", e); + } } /** * Load the configuration. */ - public void load() + public void load(URL serverConfigURL) { + this.serverConfigURL = serverConfigURL; + try { + // parse the server configuration Digester digester = new Digester(); - - // register the Jetrix server configuration file DTD - URL url = findResource("tetrinet-server.dtd"); - digester.register("-//LFJR//Jetrix TetriNET Server//EN", url.toString()); - - // register the Jetrix channels configuration file DTD - url = findResource("tetrinet-channels.dtd"); - digester.register("-//LFJR//Jetrix Channels//EN", url.toString()); - - // enable the document validation + digester.register("-//LFJR//Jetrix TetriNET Server//EN", findResource("tetrinet-server.dtd").toString()); digester.setValidating(true); - - // add the rule sets digester.addRuleSet(new ServerRuleSet()); - digester.addRuleSet(new ChannelsRuleSet()); - - // parse the server configuration digester.push(this); - serverConfigURL = findResource("conf/server.xml"); Reader reader = new InputStreamReader(serverConfigURL.openStream(), ENCODING); digester.parse(new InputSource(reader)); reader.close(); // parse the channel configuration + digester = new Digester(); + digester.register("-//LFJR//Jetrix Channels//EN", findResource("tetrinet-channels.dtd").toString()); + digester.setValidating(true); + digester.addRuleSet(new ChannelsRuleSet()); digester.push(this); - channelsConfigURL = findResource("conf/channels.xml"); + channelsConfigURL = new URL(serverConfigURL, channelsFile); reader = new InputStreamReader(channelsConfigURL.openStream(), ENCODING); digester.parse(new InputSource(reader)); reader.close(); } catch (Exception e) { - log.log(Level.SEVERE, e.getMessage(), e); + log.log(Level.SEVERE, "Unable to load the configuration", e); } } @@ -191,6 +187,9 @@ out.println(" <!-- Error Log, where errors are logged to -->"); out.println(" <error-log path=\"" + getErrorLogPath() + "\" />"); out.println(); + out.println(" <!-- Path to the channels descriptor file (relative to the current configuration file) -->"); + out.println(" <channels path=\"" + getChannelsFile() + "\"/>"); + out.println(); out.println(" <!-- Client listeners -->"); out.println(" <listeners>"); for (Listener listener : getListeners()) @@ -248,7 +247,7 @@ { Command command = commands.next(); String hidden = command.isHidden() ? " hidden=\"true\"" : ""; - Command command2 = (Command) command.getClass().newInstance(); + Command command2 = command.getClass().newInstance(); String level = command2.getAccessLevel() != command.getAccessLevel() ? " access-level=\"" + command.getAccessLevel() + "\"" : ""; out.println(" <command class=\"" + command.getClass().getName() + "\"" + hidden + level + "/>"); } @@ -667,7 +666,7 @@ if (url == null) { File file = new File(name); - url = file.toURL(); + url = file.toURI().toURL(); } return url; @@ -808,6 +807,16 @@ this.errorlogPath = errorlogPath; } + public String getChannelsFile() + { + return channelsFile; + } + + public void setChannelsFile(String channelsFile) + { + this.channelsFile = channelsFile; + } + public String getMessageOfTheDay() { return motd; Modified: jetrix/trunk/src/java/net/jetrix/config/ServerRuleSet.java =================================================================== --- jetrix/trunk/src/java/net/jetrix/config/ServerRuleSet.java 2009-02-12 15:56:40 UTC (rev 784) +++ jetrix/trunk/src/java/net/jetrix/config/ServerRuleSet.java 2009-02-12 16:11:42 UTC (rev 785) @@ -28,7 +28,7 @@ * @author Emmanuel Bourg * @version $Revision$, $Date$ */ -public class ServerRuleSet extends RuleSetBase +class ServerRuleSet extends RuleSetBase { public void addRuleInstances(Digester digester) @@ -48,6 +48,8 @@ digester.addCallParam("tetrinet-server/access-log", 0, "path"); digester.addCallMethod("tetrinet-server/error-log", "setErrorLogPath", 1); digester.addCallParam("tetrinet-server/error-log", 0, "path"); + digester.addCallMethod("tetrinet-server/channels", "setChannelsFile", 1); + digester.addCallParam("tetrinet-server/channels", 0, "path"); // command definitions digester.addObjectCreate("*/command", null, "class"); Modified: jetrix/trunk/src/test/net/jetrix/config/ServerConfigTest.java =================================================================== --- jetrix/trunk/src/test/net/jetrix/config/ServerConfigTest.java 2009-02-12 15:56:40 UTC (rev 784) +++ jetrix/trunk/src/test/net/jetrix/config/ServerConfigTest.java 2009-02-12 16:11:42 UTC (rev 785) @@ -19,6 +19,8 @@ package net.jetrix.config; +import java.net.URL; + import junit.framework.*; import net.jetrix.ChannelManager; @@ -30,12 +32,14 @@ */ public class ServerConfigTest extends TestCase { + private URL serverConfigURL = getClass().getResource("/conf/server.xml"); + public void testGetInstance() { try { ServerConfig config = new ServerConfig(); - config.load(); + config.load(serverConfigURL); } catch (Throwable e) { @@ -47,7 +51,7 @@ { // load... ServerConfig config = new ServerConfig(); - config.load(); + config.load(serverConfigURL); // create the channels for (ChannelConfig cc : config.getChannels()) @@ -61,7 +65,7 @@ // and load again ! ServerConfig config2 = new ServerConfig(); - config2.load(); + config2.load(serverConfigURL); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sm...@us...> - 2009-02-13 14:38:34
|
Revision: 790 http://jetrix.svn.sourceforge.net/jetrix/?rev=790&view=rev Author: smanux Date: 2009-02-13 14:38:29 +0000 (Fri, 13 Feb 2009) Log Message: ----------- Daemonization for Debian Modified Paths: -------------- jetrix/trunk/build.xml jetrix/trunk/src/etc/deb/control/conffiles jetrix/trunk/src/etc/deb/control/postinst jetrix/trunk/src/etc/deb/control/postrm jetrix/trunk/src/etc/deb/control/preinst Added Paths: ----------- jetrix/trunk/src/etc/deb/ jetrix/trunk/src/etc/deb/control/ jetrix/trunk/src/etc/deb/control/prerm jetrix/trunk/src/etc/deb/data/ jetrix/trunk/src/etc/deb/data/etc/ jetrix/trunk/src/etc/deb/data/etc/default/ jetrix/trunk/src/etc/deb/data/etc/default/jetrix jetrix/trunk/src/etc/deb/data/etc/init.d/ jetrix/trunk/src/etc/deb/data/etc/init.d/jetrix Removed Paths: ------------- jetrix/trunk/src/etc/control/ Modified: jetrix/trunk/build.xml =================================================================== --- jetrix/trunk/build.xml 2009-02-13 14:30:13 UTC (rev 789) +++ jetrix/trunk/build.xml 2009-02-13 14:38:29 UTC (rev 790) @@ -253,7 +253,7 @@ <target name="dist.linux" depends="dist" description="Build the Linux installer"> <mkdir dir="${build}/control"/> <copy todir="${build}/control" filtering="true" > - <fileset dir="${src}/etc/control"/> + <fileset dir="src/etc/deb/control"/> </copy> <taskdef name="deb" classname="org.vafer.jdeb.ant.DebAntTask" classpath="lib/build/jdeb-0.7-SNAPSHOT.jar"/> @@ -262,7 +262,9 @@ <data src="${dist}/bin/jetrix-${version}.tar.bz2"> <mapper type="prefix" strip="1" prefix="/usr/share/jetrix"/> <exclude name="**/*.bat"/> + <exclude name="**/update"/> </data> + <fileset dir="src/etc/deb/data"/> </deb> </target> Modified: jetrix/trunk/src/etc/deb/control/conffiles =================================================================== --- jetrix/trunk/src/etc/control/conffiles 2009-02-12 16:11:42 UTC (rev 785) +++ jetrix/trunk/src/etc/deb/control/conffiles 2009-02-13 14:38:29 UTC (rev 790) @@ -1,2 +1,4 @@ +/etc/default/jetrix +/etc/init.d/jetrix /etc/jetrix/server.xml /etc/jetrix/channels.xml Modified: jetrix/trunk/src/etc/deb/control/postinst =================================================================== --- jetrix/trunk/src/etc/control/postinst 2009-02-12 16:11:42 UTC (rev 785) +++ jetrix/trunk/src/etc/deb/control/postinst 2009-02-13 14:38:29 UTC (rev 790) @@ -1,13 +1,56 @@ #!/bin/sh +# +# Post installation script for Jetrix +# +set -e + +# summary of how this script can be called: +# * <postinst> `configure' <most-recently-configured-version> +# * <old-postinst> `abort-upgrade' <new version> +# * <conflictor's-postinst> `abort-remove' `in-favour' <package> +# <new-version> +# * <postinst> `abort-remove' +# * <deconfigured's-postinst> `abort-deconfigure' `in-favour' +# <failed-install-package> <version> `removing' +# <conflicting-package> <version> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + JETRIX_HOME="/usr/share/jetrix"; -ln -s $JETRIX_HOME/jetrix /usr/games/jetrix +# create the jetrix user running the daemon +adduser --quiet --system --no-create-home --disabled-password jetrix +# add a symbolic link in /usr/games +ln -s --force $JETRIX_HOME/jetrix /usr/games/jetrix + # move the conf directory to /etc/jetrix and create a symbolic link mv $JETRIX_HOME/conf /etc/jetrix ln -s /etc/jetrix $JETRIX_HOME/conf +chown -R jetrix:nogroup /etc/jetrix # move the log directory to /var/log/jetrix and create a symbolic link mv $JETRIX_HOME/log /var/log/jetrix ln -s /var/log/jetrix $JETRIX_HOME/log +chown -R jetrix:nogroup /var/log/jetrix + +# unpack the jar files in the lib directory +for FILENAME in $(find $JETRIX_HOME/lib -name "*.pack" -print) +do + echo "Unpacking $FILENAME ..." + FILEBASE=$(dirname $FILENAME)/$(basename $FILENAME .pack) + unpack200 -r $FILENAME $FILEBASE +done + +# start Jetrix and register it to start at the end of the boot sequence +if [ -x "/etc/init.d/jetrix" ]; then + update-rc.d jetrix defaults 95 >/dev/null + if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then + invoke-rc.d jetrix start || exit $? + else + /etc/init.d/jetrix start || exit $? + fi +fi + +exit 0 Modified: jetrix/trunk/src/etc/deb/control/postrm =================================================================== --- jetrix/trunk/src/etc/control/postrm 2009-02-12 16:11:42 UTC (rev 785) +++ jetrix/trunk/src/etc/deb/control/postrm 2009-02-13 14:38:29 UTC (rev 790) @@ -1,3 +1,54 @@ #!/bin/sh +# +# Post removal script for Jetrix +# -rm -f /usr/games/jetrix +set -e + +# summary of how this script can be called: +# * <postrm> `remove' +# * <postrm> `purge' +# * <old-postrm> `upgrade' <new-version> +# * <new-postrm> `failed-upgrade' <old-version> +# * <new-postrm> `abort-install' +# * <new-postrm> `abort-install' <old-version> +# * <new-postrm> `abort-upgrade' <old-version> +# * <disappearer's-postrm> `disappear' <overwriter> +# <overwriter-version> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +case "$1" in + purge) + # remove the log files + rm -Rf /var/log/jetrix + + # remove the symbolic link in /usr/games + rm -f /usr/games/jetrix + + # remove the unpacked jars in the lib directory + rm /usr/share/jetrix/lib/*.jar + + # unregister Jetrix from the boot sequence + update-rc.d jetrix remove >/dev/null || exit $? + + # remove the jetrix user + if [ -x "$(command -v deluser)" ] ; then + if getent passwd|grep -q ^jetrix: ; then + deluser --quiet --system jetrix > /dev/null || true + fi + else + echo >&2 "not removing 'jetrix' system account because deluser command was not found." + fi + ;; + + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +exit 0 Modified: jetrix/trunk/src/etc/deb/control/preinst =================================================================== --- jetrix/trunk/src/etc/control/preinst 2009-02-12 16:11:42 UTC (rev 785) +++ jetrix/trunk/src/etc/deb/control/preinst 2009-02-13 14:38:29 UTC (rev 790) @@ -1,5 +1,20 @@ #!/bin/sh +# +# Pre installation script for Jetrix +# +set -e + +# summary of how this script can be called: +# * <new-preinst> `install' +# * <new-preinst> `install' <old-version> +# * <new-preinst> `upgrade' <old-version> +# * <old-preinst> `abort-upgrade' <new-version> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + # Create the installation directory mkdir -p /usr/share/jetrix chmod a+w /usr/share/jetrix + +exit 0 Added: jetrix/trunk/src/etc/deb/control/prerm =================================================================== --- jetrix/trunk/src/etc/deb/control/prerm (rev 0) +++ jetrix/trunk/src/etc/deb/control/prerm 2009-02-13 14:38:29 UTC (rev 790) @@ -0,0 +1,17 @@ +#!/bin/sh +# +# Pre removal script for Jetrix +# + +set -e + +# stop the server +if [ -x "/etc/init.d/jetrix" ]; then + if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then + invoke-rc.d jetrix stop || exit $? + else + /etc/init.d/jetrix stop || exit $? + fi +fi + +exit 0 Added: jetrix/trunk/src/etc/deb/data/etc/default/jetrix =================================================================== --- jetrix/trunk/src/etc/deb/data/etc/default/jetrix (rev 0) +++ jetrix/trunk/src/etc/deb/data/etc/default/jetrix 2009-02-13 14:38:29 UTC (rev 790) @@ -0,0 +1,5 @@ +# Defaults for jetrix initscript + +# Master system-wide jetrix switch. The initscript +# will not run if it is not set to yes. +RUN="yes" Added: jetrix/trunk/src/etc/deb/data/etc/init.d/jetrix =================================================================== --- jetrix/trunk/src/etc/deb/data/etc/init.d/jetrix (rev 0) +++ jetrix/trunk/src/etc/deb/data/etc/init.d/jetrix 2009-02-13 14:38:29 UTC (rev 790) @@ -0,0 +1,85 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: tetrinet-server jetrix +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Init script for Jetrix +### END INIT INFO + + +PATH=/sbin:/bin:/usr/sbin:/usr/bin +NAME=jetrix +DESC="Jetrix TetriNET Server" +DAEMON=/usr/share/jetrix/jetrix +USER=jetrix +GROUP=nogroup + +test -x $DAEMON || exit 0 + +CONF=/etc/jetrix/server.xml +DAEMON_OPTS="--conf $CONF" +RUN="no" + +# Include jetrix defaults if available +if [ -f /etc/default/$NAME ] ; then + . /etc/default/$NAME +fi + +. /lib/init/vars.sh +. /lib/lsb/init-functions + +case "$1" in + start) + if [ "$RUN" != "yes" ] ; then + log_warning_msg "Not starting $DESC $NAME, disabled via /etc/default/$NAME" + exit 0 + fi + + [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" + + start-stop-daemon --start --quiet --user $USER --chuid $USER:$GROUP --exec $DAEMON -- $DAEMON_OPTS + + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + + stop) + [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" + + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --user $USER + + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + + restart) + [ "$VERBOSE" != no ] && log_daemon_msg "Restarting $DESC" "$NAME" + + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --user $USER + + case "$?" in + 0|1) + start-stop-daemon --start --quiet --user $USER --chuid $USER:$GROUP --exec $DAEMON -- start $DAEMON_OPTS + + case "$?" in + 0) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + *) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + *) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + esac + ;; + + *) + echo "Usage: /etc/init.d/$NAME {start|stop|restart}" >&2 + exit 3 + ;; +esac + +exit 0 Property changes on: jetrix/trunk/src/etc/deb/data/etc/init.d/jetrix ___________________________________________________________________ Added: svn:executable + * Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sm...@us...> - 2009-02-16 15:17:10
|
Revision: 792 http://jetrix.svn.sourceforge.net/jetrix/?rev=792&view=rev Author: smanux Date: 2009-02-16 15:17:02 +0000 (Mon, 16 Feb 2009) Log Message: ----------- Simplification and speed up of the Linux packaging Modified Paths: -------------- jetrix/trunk/build.xml Added Paths: ----------- jetrix/trunk/src/etc/deb/data/usr/ jetrix/trunk/src/etc/deb/data/usr/share/ jetrix/trunk/src/etc/deb/data/usr/share/jetrix/ Property Changed: ---------------- jetrix/trunk/src/bin/jetrix jetrix/trunk/src/bin/update Modified: jetrix/trunk/build.xml =================================================================== --- jetrix/trunk/build.xml 2009-02-13 15:43:28 UTC (rev 791) +++ jetrix/trunk/build.xml 2009-02-16 15:17:02 UTC (rev 792) @@ -165,89 +165,63 @@ <target name="dist" depends="pack"> - <!-- Replace the tokens in the scripts --> - <mkdir dir="${build}/bin"/> - <copy todir="${build}/bin" filtering="on"> - <fileset dir="${src}/bin" includes="**/*"/> + <mkdir dir="${build}/dist"/> + + <copy todir="${build}/dist" filtering="on"> + <fileset dir="${src}/bin" includes="**/*" excludes="**/*.nsi"/> </copy> - <fixcrlf srcdir="${build}/bin" eol="lf" eof="remove"> - <include name="jetrix"/> - <include name="update"/> - </fixcrlf> + <copy todir="${build}/dist"> + <fileset dir="${src}/etc"> + <include name="LICENSE" /> + <include name="README" /> + <include name="conf/*" /> + <include name="data/**" /> + <include name="log/**" /> + </fileset> + <fileset dir="${build}"> + <include name="lib/*.pack" /> + </fileset> + <fileset dir="${dist}"> + <include name="lib/jetrix-${version}.jar.pack" /> + <include name="lib/jetrix-launcher-${version}.jar" /> + </fileset> + <fileset dir="${src}"> + <include name="lang/*.properties" /> + </fileset> + </copy> + <copy todir="${build}/dist/lib"> + <fileset dir="${dist}/webapp/"> + <include name="*.war.pack" /> + </fileset> + </copy> <!-- Create the distribution directory --> <mkdir dir="${dist}/bin"/> <!-- Create the Windows distribution --> <zip zipfile="${dist}/bin/jetrix-${version}.zip"> - <zipfileset prefix="jetrix-${version}/" dir="${src}/etc/"> - <include name="LICENSE" /> - <include name="README" /> - <include name="conf/*" /> - <include name="data/**" /> + <zipfileset prefix="jetrix-${version}" dir="${build}/dist" filemode="755"> + <include name="jetrix"/> + <include name="update"/> </zipfileset> - <zipfileset prefix="jetrix-${version}/" dir="${build}/bin/"> - <include name="jetrix.bat" /> - <include name="update.bat" /> + <zipfileset prefix="jetrix-${version}" dir="${build}/dist"> + <exclude name="jetrix"/> + <exclude name="update"/> </zipfileset> - <zipfileset prefix="jetrix-${version}/" dir="${build}/bin/" filemode="755"> - <include name="jetrix" /> - <include name="update" /> - </zipfileset> - <zipfileset prefix="jetrix-${version}/lib" dir="${build}/lib"> - <include name="*.pack" /> - </zipfileset> - <zipfileset prefix="jetrix-${version}/lib/" dir="${dist}/lib/"> - <include name="jetrix-${version}.jar.pack" /> - <include name="jetrix-launcher-${version}.jar" /> - </zipfileset> - <zipfileset prefix="jetrix-${version}/lib/" dir="${dist}/webapp/"> - <include name="*.war.pack" /> - </zipfileset> - <zipfileset prefix="jetrix-${version}/lang/" dir="${src}/lang/"> - <include name="*.properties" /> - </zipfileset> - <zipfileset prefix="jetrix-${version}/log/" dir="${src}/etc/log/"/> </zip> <!-- Create the Unix distribution --> - <tar destfile="${dist}/bin/jetrix-${version}.tar"> - <tarfileset prefix="jetrix-${version}/" dir="${src}/etc/"> - <include name="LICENSE" /> - <include name="README" /> - <include name="conf/*" /> - <include name="data/**" /> + <tar destfile="${dist}/bin/jetrix-${version}.tar.bz2" compression="bzip2"> + <tarfileset prefix="jetrix-${version}" dir="${build}/dist" filemode="755"> + <include name="jetrix"/> + <include name="update"/> </tarfileset> - <tarfileset prefix="jetrix-${version}/" dir="${build}/bin/"> - <include name="jetrix.bat" /> - <include name="update.bat" /> + <tarfileset prefix="jetrix-${version}" dir="${build}/dist"> + <exclude name="jetrix"/> + <exclude name="update"/> </tarfileset> - <tarfileset prefix="jetrix-${version}/" dir="${build}/bin/" mode="755"> - <include name="jetrix" /> - <include name="update" /> - </tarfileset> - <tarfileset prefix="jetrix-${version}" dir="${build}" includes="lib"/> - <tarfileset prefix="jetrix-${version}/lib" dir="${build}/lib"> - <include name="*.pack" /> - </tarfileset> - <tarfileset prefix="jetrix-${version}/lib/" dir="${dist}/lib/"> - <include name="jetrix-${version}.jar.pack" /> - <include name="jetrix-launcher-${version}.jar" /> - </tarfileset> - <tarfileset prefix="jetrix-${version}/lib/" dir="${dist}/webapp/"> - <include name="*.war.pack" /> - </tarfileset> - <tarfileset prefix="jetrix-${version}" dir="${src}" includes="lang"/> - <tarfileset prefix="jetrix-${version}/lang/" dir="${src}/lang/"> - <include name="*.properties" /> - </tarfileset> - <tarfileset prefix="jetrix-${version}" dir="${src}/etc" includes="log"/> - <tarfileset prefix="jetrix-${version}/log/" dir="${src}/etc/log/"/> </tar> - <bzip2 zipfile="${dist}/bin/jetrix-${version}.tar.bz2" src="${dist}/bin/jetrix-${version}.tar"/> - <delete file="${dist}/bin/jetrix-${version}.tar"/> - </target> <target name="dist.linux" depends="dist" description="Build the Linux installer"> @@ -255,16 +229,19 @@ <copy todir="${build}/control" filtering="true" > <fileset dir="src/etc/deb/control"/> </copy> - + <taskdef name="deb" classname="org.vafer.jdeb.ant.DebAntTask" classpath="lib/build/jdeb-0.7-SNAPSHOT.jar"/> <deb destfile="${dist}/bin/jetrix-${version}.deb" control="${build}/control" compression="bzip2"> - <data src="${dist}/bin/jetrix-${version}.tar.bz2"> - <mapper type="prefix" strip="1" prefix="/usr/share/jetrix"/> - <exclude name="**/*.bat"/> - <exclude name="**/update"/> - </data> <fileset dir="src/etc/deb/data"/> + <tarfileset prefix="/usr/share/jetrix" dir="${build}/dist" username="root" group="root" filemode="755"> + <include name="jetrix"/> + </tarfileset> + <tarfileset prefix="/usr/share/jetrix" dir="${build}/dist" username="root" group="root"> + <exclude name="jetrix"/> + <exclude name="update"/> + <exclude name="*.bat"/> + </tarfileset> </deb> </target> Property changes on: jetrix/trunk/src/bin/jetrix ___________________________________________________________________ Modified: svn:eol-style - native + LF Property changes on: jetrix/trunk/src/bin/update ___________________________________________________________________ Modified: svn:eol-style - native + LF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sm...@us...> - 2009-02-16 20:46:55
|
Revision: 793 http://jetrix.svn.sourceforge.net/jetrix/?rev=793&view=rev Author: smanux Date: 2009-02-16 20:46:51 +0000 (Mon, 16 Feb 2009) Log Message: ----------- Updated jdeb to fix an issue on uninstalling the debian package Modified Paths: -------------- jetrix/trunk/build.xml Added Paths: ----------- jetrix/trunk/lib/build/jdeb-0.8-SNAPSHOT.jar Removed Paths: ------------- jetrix/trunk/lib/build/jdeb-0.7-SNAPSHOT.jar Modified: jetrix/trunk/build.xml =================================================================== --- jetrix/trunk/build.xml 2009-02-16 15:17:02 UTC (rev 792) +++ jetrix/trunk/build.xml 2009-02-16 20:46:51 UTC (rev 793) @@ -230,7 +230,7 @@ <fileset dir="src/etc/deb/control"/> </copy> - <taskdef name="deb" classname="org.vafer.jdeb.ant.DebAntTask" classpath="lib/build/jdeb-0.7-SNAPSHOT.jar"/> + <taskdef name="deb" classname="org.vafer.jdeb.ant.DebAntTask" classpath="lib/build/jdeb-0.8-SNAPSHOT.jar"/> <deb destfile="${dist}/bin/jetrix-${version}.deb" control="${build}/control" compression="bzip2"> <fileset dir="src/etc/deb/data"/> Deleted: jetrix/trunk/lib/build/jdeb-0.7-SNAPSHOT.jar =================================================================== (Binary files differ) Added: jetrix/trunk/lib/build/jdeb-0.8-SNAPSHOT.jar =================================================================== (Binary files differ) Property changes on: jetrix/trunk/lib/build/jdeb-0.8-SNAPSHOT.jar ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sm...@us...> - 2009-02-17 19:08:46
|
Revision: 794 http://jetrix.svn.sourceforge.net/jetrix/?rev=794&view=rev Author: smanux Date: 2009-02-17 19:08:39 +0000 (Tue, 17 Feb 2009) Log Message: ----------- Updated the svn:keywords and svn:eol-style properties Property Changed: ---------------- jetrix/trunk/build.xml jetrix/trunk/doc/changelog.txt jetrix/trunk/doc/javadoc-stylesheet.css jetrix/trunk/doc/license.txt jetrix/trunk/doc/todo.txt jetrix/trunk/src/admin/WEB-INF/classes/net/jetrix/servlets/ChannelAction.java jetrix/trunk/src/admin/WEB-INF/classes/net/jetrix/servlets/PrecompiledPagesFilter.java jetrix/trunk/src/admin/WEB-INF/classes/net/jetrix/servlets/ServerAction.java jetrix/trunk/src/admin/WEB-INF/classes/net/jetrix/servlets/SettingsAction.java jetrix/trunk/src/admin/WEB-INF/classes/net/jetrix/servlets/UserAction.java jetrix/trunk/src/admin/WEB-INF/web.xml jetrix/trunk/src/admin/channel.jsp jetrix/trunk/src/admin/field.jsp jetrix/trunk/src/admin/images/blocks/halfcross.png jetrix/trunk/src/admin/images/blocks/leftl.png jetrix/trunk/src/admin/images/blocks/leftz.png jetrix/trunk/src/admin/images/blocks/line.png jetrix/trunk/src/admin/images/blocks/rightl.png jetrix/trunk/src/admin/images/blocks/rightz.png jetrix/trunk/src/admin/images/blocks/square.png jetrix/trunk/src/admin/images/delete16.png jetrix/trunk/src/admin/images/specials/a.png jetrix/trunk/src/admin/images/specials/b.png jetrix/trunk/src/admin/images/specials/c.png jetrix/trunk/src/admin/images/specials/g.png jetrix/trunk/src/admin/images/specials/n.png jetrix/trunk/src/admin/images/specials/o.png jetrix/trunk/src/admin/images/specials/q.png jetrix/trunk/src/admin/images/specials/r.png jetrix/trunk/src/admin/images/specials/s.png jetrix/trunk/src/admin/images/tiny/0.png jetrix/trunk/src/admin/images/tiny/1.png jetrix/trunk/src/admin/images/tiny/2.png jetrix/trunk/src/admin/images/tiny/3.png jetrix/trunk/src/admin/images/tiny/4.png jetrix/trunk/src/admin/images/tiny/5.png jetrix/trunk/src/admin/images/tiny/a.png jetrix/trunk/src/admin/images/tiny/b.png jetrix/trunk/src/admin/images/tiny/background.png jetrix/trunk/src/admin/images/tiny/c.png jetrix/trunk/src/admin/images/tiny/g.png jetrix/trunk/src/admin/images/tiny/n.png jetrix/trunk/src/admin/images/tiny/o.png jetrix/trunk/src/admin/images/tiny/q.png jetrix/trunk/src/admin/images/tiny/r.png jetrix/trunk/src/admin/images/tiny/s.png jetrix/trunk/src/admin/index.html jetrix/trunk/src/admin/javascript/server.js jetrix/trunk/src/admin/javascript/settings.js jetrix/trunk/src/admin/javascript/tabpane/css/luna/tab.active.png jetrix/trunk/src/admin/javascript/tabpane/css/luna/tab.css jetrix/trunk/src/admin/javascript/tabpane/css/luna/tab.hover.png jetrix/trunk/src/admin/javascript/tabpane/css/luna/tab.png jetrix/trunk/src/admin/javascript/tabpane/js/tabpane.js jetrix/trunk/src/admin/javascript/xloadtree/images/blank.png jetrix/trunk/src/admin/javascript/xloadtree/images/xp/I.png jetrix/trunk/src/admin/javascript/xloadtree/images/xp/L.png jetrix/trunk/src/admin/javascript/xloadtree/images/xp/Lminus.png jetrix/trunk/src/admin/javascript/xloadtree/images/xp/Lplus.png jetrix/trunk/src/admin/javascript/xloadtree/images/xp/T.png jetrix/trunk/src/admin/javascript/xloadtree/images/xp/Tminus.png jetrix/trunk/src/admin/javascript/xloadtree/images/xp/Tplus.png jetrix/trunk/src/admin/javascript/xloadtree/images/xp/file.png jetrix/trunk/src/admin/javascript/xloadtree/images/xp/folder.png jetrix/trunk/src/admin/javascript/xloadtree/images/xp/openfolder.png jetrix/trunk/src/admin/javascript/xloadtree/xloadtree.js jetrix/trunk/src/admin/javascript/xloadtree/xmlextras.js jetrix/trunk/src/admin/javascript/xloadtree/xtree.css jetrix/trunk/src/admin/javascript/xloadtree/xtree.js jetrix/trunk/src/admin/navigation.jsp jetrix/trunk/src/admin/navigationChannels.jsp jetrix/trunk/src/admin/navigationUsers.jsp jetrix/trunk/src/admin/server.jsp jetrix/trunk/src/admin/settings.jsp jetrix/trunk/src/admin/style.css jetrix/trunk/src/admin/top.html jetrix/trunk/src/admin/user.jsp jetrix/trunk/src/admin/winlist.jsp jetrix/trunk/src/etc/conf/channels.xml jetrix/trunk/src/etc/conf/server.xml jetrix/trunk/src/etc/icons/jetrix-16x16.png jetrix/trunk/src/etc/icons/jetrix-32x32.png jetrix/trunk/src/etc/icons/jetrix-64x64.png jetrix/trunk/src/java/net/jetrix/AccessLevel.java jetrix/trunk/src/java/net/jetrix/Banlist.java jetrix/trunk/src/java/net/jetrix/Channel.java jetrix/trunk/src/java/net/jetrix/ChannelManager.java jetrix/trunk/src/java/net/jetrix/Client.java jetrix/trunk/src/java/net/jetrix/ClientRepository.java jetrix/trunk/src/java/net/jetrix/Destination.java jetrix/trunk/src/java/net/jetrix/Field.java jetrix/trunk/src/java/net/jetrix/GameState.java jetrix/trunk/src/java/net/jetrix/Language.java jetrix/trunk/src/java/net/jetrix/Launcher.java jetrix/trunk/src/java/net/jetrix/Listener.java jetrix/trunk/src/java/net/jetrix/LogManager.java jetrix/trunk/src/java/net/jetrix/Message.java jetrix/trunk/src/java/net/jetrix/Protocol.java jetrix/trunk/src/java/net/jetrix/ProtocolManager.java jetrix/trunk/src/java/net/jetrix/Server.java jetrix/trunk/src/java/net/jetrix/Service.java jetrix/trunk/src/java/net/jetrix/SystemSignal.java jetrix/trunk/src/java/net/jetrix/SystrayManager.java jetrix/trunk/src/java/net/jetrix/User.java jetrix/trunk/src/java/net/jetrix/agent/Agent.java jetrix/trunk/src/java/net/jetrix/agent/ChannelInfo.java jetrix/trunk/src/java/net/jetrix/agent/PlayerInfo.java jetrix/trunk/src/java/net/jetrix/agent/QueryAgent.java jetrix/trunk/src/java/net/jetrix/agent/QueryInfo.java jetrix/trunk/src/java/net/jetrix/agent/TSpecAgent.java jetrix/trunk/src/java/net/jetrix/clients/ConsoleClient.java jetrix/trunk/src/java/net/jetrix/clients/IRCClient.java jetrix/trunk/src/java/net/jetrix/clients/QueryClient.java jetrix/trunk/src/java/net/jetrix/clients/TSpecClient.java jetrix/trunk/src/java/net/jetrix/clients/TetrinetClient.java jetrix/trunk/src/java/net/jetrix/clients/package.html jetrix/trunk/src/java/net/jetrix/commands/AbstractCommand.java jetrix/trunk/src/java/net/jetrix/commands/AwayCommand.java jetrix/trunk/src/java/net/jetrix/commands/BroadcastCommand.java jetrix/trunk/src/java/net/jetrix/commands/Command.java jetrix/trunk/src/java/net/jetrix/commands/CommandManager.java jetrix/trunk/src/java/net/jetrix/commands/ConfigCommand.java jetrix/trunk/src/java/net/jetrix/commands/EmoteCommand.java jetrix/trunk/src/java/net/jetrix/commands/GotoCommand.java jetrix/trunk/src/java/net/jetrix/commands/HelpCommand.java jetrix/trunk/src/java/net/jetrix/commands/IgnoreCommand.java jetrix/trunk/src/java/net/jetrix/commands/IpCommand.java jetrix/trunk/src/java/net/jetrix/commands/JoinCommand.java jetrix/trunk/src/java/net/jetrix/commands/KickCommand.java jetrix/trunk/src/java/net/jetrix/commands/LanguageCommand.java jetrix/trunk/src/java/net/jetrix/commands/ListCommand.java jetrix/trunk/src/java/net/jetrix/commands/ModeCommand.java jetrix/trunk/src/java/net/jetrix/commands/MotdCommand.java jetrix/trunk/src/java/net/jetrix/commands/MoveCommand.java jetrix/trunk/src/java/net/jetrix/commands/OperatorCommand.java jetrix/trunk/src/java/net/jetrix/commands/ParameterCommand.java jetrix/trunk/src/java/net/jetrix/commands/PauseCommand.java jetrix/trunk/src/java/net/jetrix/commands/PetitionCommand.java jetrix/trunk/src/java/net/jetrix/commands/PingCommand.java jetrix/trunk/src/java/net/jetrix/commands/RandomCommand.java jetrix/trunk/src/java/net/jetrix/commands/ReplyCommand.java jetrix/trunk/src/java/net/jetrix/commands/SpecListCommand.java jetrix/trunk/src/java/net/jetrix/commands/StartCommand.java jetrix/trunk/src/java/net/jetrix/commands/StopCommand.java jetrix/trunk/src/java/net/jetrix/commands/SummonCommand.java jetrix/trunk/src/java/net/jetrix/commands/TeamMessageCommand.java jetrix/trunk/src/java/net/jetrix/commands/TeleportCommand.java jetrix/trunk/src/java/net/jetrix/commands/TellCommand.java jetrix/trunk/src/java/net/jetrix/commands/TimeCommand.java jetrix/trunk/src/java/net/jetrix/commands/VersionCommand.java jetrix/trunk/src/java/net/jetrix/commands/WhoCommand.java jetrix/trunk/src/java/net/jetrix/commands/package.html jetrix/trunk/src/java/net/jetrix/config/Block.java jetrix/trunk/src/java/net/jetrix/config/ChannelConfig.java jetrix/trunk/src/java/net/jetrix/config/ChannelsRuleSet.java jetrix/trunk/src/java/net/jetrix/config/Configuration.java jetrix/trunk/src/java/net/jetrix/config/FilterConfig.java jetrix/trunk/src/java/net/jetrix/config/Puzzle.java jetrix/trunk/src/java/net/jetrix/config/ServerConfig.java jetrix/trunk/src/java/net/jetrix/config/ServerRuleSet.java jetrix/trunk/src/java/net/jetrix/config/Settings.java jetrix/trunk/src/java/net/jetrix/config/Special.java jetrix/trunk/src/java/net/jetrix/config/Statistics.java jetrix/trunk/src/java/net/jetrix/config/WinlistConfig.java jetrix/trunk/src/java/net/jetrix/config/package.html jetrix/trunk/src/java/net/jetrix/filter/AmplifierFilter.java jetrix/trunk/src/java/net/jetrix/filter/CommandFilter.java jetrix/trunk/src/java/net/jetrix/filter/DownstackPuzzleGenerator.java jetrix/trunk/src/java/net/jetrix/filter/FilenameComparator.java jetrix/trunk/src/java/net/jetrix/filter/FilterException.java jetrix/trunk/src/java/net/jetrix/filter/FilterManager.java jetrix/trunk/src/java/net/jetrix/filter/FloodFilter.java jetrix/trunk/src/java/net/jetrix/filter/GenericFilter.java jetrix/trunk/src/java/net/jetrix/filter/LogoFilter.java jetrix/trunk/src/java/net/jetrix/filter/MessageFilter.java jetrix/trunk/src/java/net/jetrix/filter/PingFilter.java jetrix/trunk/src/java/net/jetrix/filter/PuzzleFilter.java jetrix/trunk/src/java/net/jetrix/filter/PuzzleGenerator.java jetrix/trunk/src/java/net/jetrix/filter/RandomFilter.java jetrix/trunk/src/java/net/jetrix/filter/StartFilter.java jetrix/trunk/src/java/net/jetrix/filter/StatsFilter.java jetrix/trunk/src/java/net/jetrix/filter/SuddenDeathFilter.java jetrix/trunk/src/java/net/jetrix/filter/SurvivalFilter.java jetrix/trunk/src/java/net/jetrix/filter/TetrisFilter.java jetrix/trunk/src/java/net/jetrix/filter/package.html jetrix/trunk/src/java/net/jetrix/listeners/ClientListener.java jetrix/trunk/src/java/net/jetrix/listeners/HttpListener.java jetrix/trunk/src/java/net/jetrix/listeners/IRCListener.java jetrix/trunk/src/java/net/jetrix/listeners/TSpecListener.java jetrix/trunk/src/java/net/jetrix/listeners/TetrinetListener.java jetrix/trunk/src/java/net/jetrix/listeners/interceptor/AccessInterceptor.java jetrix/trunk/src/java/net/jetrix/listeners/interceptor/ClientInterceptor.java jetrix/trunk/src/java/net/jetrix/listeners/interceptor/ClientValidationException.java jetrix/trunk/src/java/net/jetrix/listeners/interceptor/MotdInterceptor.java jetrix/trunk/src/java/net/jetrix/listeners/interceptor/NameCheckInterceptor.java jetrix/trunk/src/java/net/jetrix/listeners/interceptor/OnlineUsersInterceptor.java jetrix/trunk/src/java/net/jetrix/listeners/interceptor/ServerStatsInterceptor.java jetrix/trunk/src/java/net/jetrix/listeners/package.html jetrix/trunk/src/java/net/jetrix/messages/AddLineMessage.java jetrix/trunk/src/java/net/jetrix/messages/AddPlayerMessage.java jetrix/trunk/src/java/net/jetrix/messages/BlockBombMessage.java jetrix/trunk/src/java/net/jetrix/messages/BlockQuakeMessage.java jetrix/trunk/src/java/net/jetrix/messages/ChannelMessage.java jetrix/trunk/src/java/net/jetrix/messages/ClearLineMessage.java jetrix/trunk/src/java/net/jetrix/messages/ClearSpecialsMessage.java jetrix/trunk/src/java/net/jetrix/messages/ClientInfoMessage.java jetrix/trunk/src/java/net/jetrix/messages/CommandMessage.java jetrix/trunk/src/java/net/jetrix/messages/DisconnectedMessage.java jetrix/trunk/src/java/net/jetrix/messages/EndGameMessage.java jetrix/trunk/src/java/net/jetrix/messages/FieldMessage.java jetrix/trunk/src/java/net/jetrix/messages/FourLinesAddedMessage.java jetrix/trunk/src/java/net/jetrix/messages/GmsgMessage.java jetrix/trunk/src/java/net/jetrix/messages/GravityMessage.java jetrix/trunk/src/java/net/jetrix/messages/IngameMessage.java jetrix/trunk/src/java/net/jetrix/messages/JoinMessage.java jetrix/trunk/src/java/net/jetrix/messages/LeaveMessage.java jetrix/trunk/src/java/net/jetrix/messages/LevelMessage.java jetrix/trunk/src/java/net/jetrix/messages/NewGameMessage.java jetrix/trunk/src/java/net/jetrix/messages/NoConnectingMessage.java jetrix/trunk/src/java/net/jetrix/messages/NoopMessage.java jetrix/trunk/src/java/net/jetrix/messages/NukeFieldMessage.java jetrix/trunk/src/java/net/jetrix/messages/OneLineAddedMessage.java jetrix/trunk/src/java/net/jetrix/messages/PauseMessage.java jetrix/trunk/src/java/net/jetrix/messages/PlayerLostMessage.java jetrix/trunk/src/java/net/jetrix/messages/PlayerNumMessage.java jetrix/trunk/src/java/net/jetrix/messages/PlayerSwitchMessage.java jetrix/trunk/src/java/net/jetrix/messages/PlayerWonMessage.java jetrix/trunk/src/java/net/jetrix/messages/PlineActMessage.java jetrix/trunk/src/java/net/jetrix/messages/PlineMessage.java jetrix/trunk/src/java/net/jetrix/messages/RandomClearMessage.java jetrix/trunk/src/java/net/jetrix/messages/ResumeMessage.java jetrix/trunk/src/java/net/jetrix/messages/ShutdownMessage.java jetrix/trunk/src/java/net/jetrix/messages/SmsgMessage.java jetrix/trunk/src/java/net/jetrix/messages/SpecialMessage.java jetrix/trunk/src/java/net/jetrix/messages/SpectatorListMessage.java jetrix/trunk/src/java/net/jetrix/messages/StartGameMessage.java jetrix/trunk/src/java/net/jetrix/messages/StopGameMessage.java jetrix/trunk/src/java/net/jetrix/messages/SwitchFieldsMessage.java jetrix/trunk/src/java/net/jetrix/messages/TeamMessage.java jetrix/trunk/src/java/net/jetrix/messages/TextMessage.java jetrix/trunk/src/java/net/jetrix/messages/TwoLinesAddedMessage.java jetrix/trunk/src/java/net/jetrix/messages/WinlistMessage.java jetrix/trunk/src/java/net/jetrix/messages/package.html jetrix/trunk/src/java/net/jetrix/package.html jetrix/trunk/src/java/net/jetrix/protocols/AbstractProtocol.java jetrix/trunk/src/java/net/jetrix/protocols/ConsoleProtocol.java jetrix/trunk/src/java/net/jetrix/protocols/IRCCommand.java jetrix/trunk/src/java/net/jetrix/protocols/IRCMessage.java jetrix/trunk/src/java/net/jetrix/protocols/IRCProtocol.java jetrix/trunk/src/java/net/jetrix/protocols/IRCReply.java jetrix/trunk/src/java/net/jetrix/protocols/QueryProtocol.java jetrix/trunk/src/java/net/jetrix/protocols/TetrifastProtocol.java jetrix/trunk/src/java/net/jetrix/protocols/TetrinetProtocol.java jetrix/trunk/src/java/net/jetrix/protocols/TspecProtocol.java jetrix/trunk/src/java/net/jetrix/protocols/package.html jetrix/trunk/src/java/net/jetrix/services/AbstractService.java jetrix/trunk/src/java/net/jetrix/services/CronService.java jetrix/trunk/src/java/net/jetrix/services/GhostbusterService.java jetrix/trunk/src/java/net/jetrix/services/PublishingService.java jetrix/trunk/src/java/net/jetrix/services/ScheduledService.java jetrix/trunk/src/java/net/jetrix/services/VersionService.java jetrix/trunk/src/java/net/jetrix/tools/patcher/JetrixUpdate.java jetrix/trunk/src/java/net/jetrix/tools/patcher/UpdateList.java jetrix/trunk/src/java/net/jetrix/tools/patcher/package.html jetrix/trunk/src/java/net/jetrix/winlist/GamePlayer.java jetrix/trunk/src/java/net/jetrix/winlist/GameResult.java jetrix/trunk/src/java/net/jetrix/winlist/Score.java jetrix/trunk/src/java/net/jetrix/winlist/ScoreComparator.java jetrix/trunk/src/java/net/jetrix/winlist/SimpleWinlist.java jetrix/trunk/src/java/net/jetrix/winlist/TetrixWinlist.java jetrix/trunk/src/java/net/jetrix/winlist/Winlist.java jetrix/trunk/src/java/net/jetrix/winlist/WinlistManager.java jetrix/trunk/src/lang/jetrix.properties jetrix/trunk/src/lang/jetrix_de.properties jetrix/trunk/src/lang/jetrix_en.properties jetrix/trunk/src/lang/jetrix_es.properties jetrix/trunk/src/lang/jetrix_fr.properties jetrix/trunk/src/lang/jetrix_it.properties jetrix/trunk/src/lang/jetrix_nl.properties jetrix/trunk/src/lang/jetrix_pt.properties jetrix/trunk/src/site/images/arch1.png jetrix/trunk/src/site/images/command-guide1.png jetrix/trunk/src/site/images/command-guide2.png jetrix/trunk/src/site/images/done.png jetrix/trunk/src/site/images/jetrix-logo.png jetrix/trunk/src/site/images/opensource-110x95.png jetrix/trunk/src/site/images/opensource-75x65.png jetrix/trunk/src/site/images/partial.png jetrix/trunk/src/site/images/planned.png jetrix/trunk/src/site/style.css jetrix/trunk/src/test/net/jetrix/BanlistTest.java jetrix/trunk/src/test/net/jetrix/ChannelManagerTest.java jetrix/trunk/src/test/net/jetrix/ClientRepositoryTest.java jetrix/trunk/src/test/net/jetrix/FieldTest.java jetrix/trunk/src/test/net/jetrix/LanguageTest.java jetrix/trunk/src/test/net/jetrix/MessageTest.java jetrix/trunk/src/test/net/jetrix/ProtocolManagerTest.java jetrix/trunk/src/test/net/jetrix/agent/QueryAgentTest.java jetrix/trunk/src/test/net/jetrix/agent/TSpecAgentTest.java jetrix/trunk/src/test/net/jetrix/commands/CommandManagerTest.java jetrix/trunk/src/test/net/jetrix/config/ChannelConfigTest.java jetrix/trunk/src/test/net/jetrix/config/ConfigurationTest.java jetrix/trunk/src/test/net/jetrix/config/ServerConfigTest.java jetrix/trunk/src/test/net/jetrix/config/SettingsTest.java jetrix/trunk/src/test/net/jetrix/filter/DownstackPuzzleGeneratorTest.java jetrix/trunk/src/test/net/jetrix/messages/CommandMessageTest.java jetrix/trunk/src/test/net/jetrix/protocols/IRCMessageTest.java jetrix/trunk/src/test/net/jetrix/protocols/QueryProtocolTest.java jetrix/trunk/src/test/net/jetrix/protocols/TSpecProtocolTest.java jetrix/trunk/src/test/net/jetrix/protocols/TetrifastProtocolTest.java jetrix/trunk/src/test/net/jetrix/protocols/TetrinetProtocolTest.java jetrix/trunk/src/test/net/jetrix/winlist/GameResultTest.java jetrix/trunk/src/test/net/jetrix/winlist/ScoreComparatorTest.java jetrix/trunk/src/test/net/jetrix/winlist/ScoreTest.java jetrix/trunk/src/test/net/jetrix/winlist/SimpleWinlistTest.java jetrix/trunk/src/test/net/jetrix/winlist/TetrixWinlistTest.java jetrix/trunk/src/test/net/jetrix/winlist/WinlistManagerTest.java Property changes on: jetrix/trunk/build.xml ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/doc/changelog.txt ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/doc/javadoc-stylesheet.css ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/doc/license.txt ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/doc/todo.txt ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/admin/WEB-INF/classes/net/jetrix/servlets/ChannelAction.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/admin/WEB-INF/classes/net/jetrix/servlets/PrecompiledPagesFilter.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/admin/WEB-INF/classes/net/jetrix/servlets/ServerAction.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/admin/WEB-INF/classes/net/jetrix/servlets/SettingsAction.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/admin/WEB-INF/classes/net/jetrix/servlets/UserAction.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/admin/WEB-INF/web.xml ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/admin/channel.jsp ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/admin/field.jsp ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/admin/images/blocks/halfcross.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/images/blocks/leftl.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/images/blocks/leftz.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/images/blocks/line.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/images/blocks/rightl.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/images/blocks/rightz.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/images/blocks/square.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/images/delete16.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/images/specials/a.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/images/specials/b.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/images/specials/c.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/images/specials/g.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/images/specials/n.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/images/specials/o.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/images/specials/q.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/images/specials/r.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/images/specials/s.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/images/tiny/0.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/images/tiny/1.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/images/tiny/2.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/images/tiny/3.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/images/tiny/4.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/images/tiny/5.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/images/tiny/a.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/images/tiny/b.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/images/tiny/background.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/images/tiny/c.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/images/tiny/g.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/images/tiny/n.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/images/tiny/o.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/images/tiny/q.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/images/tiny/r.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/images/tiny/s.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/index.html ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/admin/javascript/server.js ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/admin/javascript/settings.js ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/admin/javascript/tabpane/css/luna/tab.active.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/javascript/tabpane/css/luna/tab.css ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/admin/javascript/tabpane/css/luna/tab.hover.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/javascript/tabpane/css/luna/tab.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/javascript/tabpane/js/tabpane.js ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/admin/javascript/xloadtree/images/blank.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/javascript/xloadtree/images/xp/I.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/javascript/xloadtree/images/xp/L.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/javascript/xloadtree/images/xp/Lminus.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/javascript/xloadtree/images/xp/Lplus.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/javascript/xloadtree/images/xp/T.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/javascript/xloadtree/images/xp/Tminus.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/javascript/xloadtree/images/xp/Tplus.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/javascript/xloadtree/images/xp/file.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/javascript/xloadtree/images/xp/folder.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/javascript/xloadtree/images/xp/openfolder.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/admin/javascript/xloadtree/xloadtree.js ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/admin/javascript/xloadtree/xmlextras.js ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/admin/javascript/xloadtree/xtree.css ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/admin/javascript/xloadtree/xtree.js ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/admin/navigation.jsp ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/admin/navigationChannels.jsp ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/admin/navigationUsers.jsp ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/admin/server.jsp ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/admin/settings.jsp ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/admin/style.css ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/admin/top.html ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/admin/user.jsp ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/admin/winlist.jsp ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/etc/conf/channels.xml ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/etc/conf/server.xml ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/etc/icons/jetrix-16x16.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/etc/icons/jetrix-32x32.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/etc/icons/jetrix-64x64.png ___________________________________________________________________ Modified: svn:mime-type - application/octet-stream + image/png Property changes on: jetrix/trunk/src/java/net/jetrix/AccessLevel.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/Banlist.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/Channel.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/ChannelManager.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/Client.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/ClientRepository.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/Destination.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/Field.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/GameState.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/Language.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/Launcher.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/Listener.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/LogManager.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/Message.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/Protocol.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/ProtocolManager.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/Server.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/Service.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/SystemSignal.java ___________________________________________________________________ Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native Property changes on: jetrix/trunk/src/java/net/jetrix/SystrayManager.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/User.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/agent/Agent.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/agent/ChannelInfo.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/agent/PlayerInfo.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/agent/QueryAgent.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/agent/QueryInfo.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/agent/TSpecAgent.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/clients/ConsoleClient.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/clients/IRCClient.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/clients/QueryClient.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/clients/TSpecClient.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/clients/TetrinetClient.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/clients/package.html ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/commands/AbstractCommand.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/commands/AwayCommand.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/commands/BroadcastCommand.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/commands/Command.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/commands/CommandManager.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/commands/ConfigCommand.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/commands/EmoteCommand.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/commands/GotoCommand.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/commands/HelpCommand.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/commands/IgnoreCommand.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/commands/IpCommand.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/commands/JoinCommand.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/commands/KickCommand.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/commands/LanguageCommand.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/commands/ListCommand.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/commands/ModeCommand.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/commands/MotdCommand.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/commands/MoveCommand.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/commands/OperatorCommand.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/commands/ParameterCommand.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/commands/PauseCommand.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/commands/PetitionCommand.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/commands/PingCommand.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/commands/RandomCommand.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/commands/ReplyCommand.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/commands/SpecListCommand.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/commands/StartCommand.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/commands/StopCommand.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/commands/SummonCommand.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/commands/TeamMessageCommand.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/commands/TeleportCommand.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/commands/TellCommand.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/commands/TimeCommand.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/commands/VersionCommand.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/commands/WhoCommand.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/commands/package.html ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/config/Block.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/config/ChannelConfig.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/config/ChannelsRuleSet.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/config/Configuration.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/config/FilterConfig.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/config/Puzzle.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/config/ServerConfig.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/config/ServerRuleSet.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/config/Settings.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/config/Special.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/config/Statistics.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/config/WinlistConfig.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/config/package.html ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/filter/AmplifierFilter.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/filter/CommandFilter.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/filter/DownstackPuzzleGenerator.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/filter/FilenameComparator.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/filter/FilterException.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/filter/FilterManager.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/filter/FloodFilter.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/filter/GenericFilter.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/filter/LogoFilter.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/filter/MessageFilter.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/filter/PingFilter.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/filter/PuzzleFilter.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/filter/PuzzleGenerator.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/filter/RandomFilter.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/filter/StartFilter.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/filter/StatsFilter.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/filter/SuddenDeathFilter.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Date Author Id Revision HeadURL Property changes on: jetrix/trunk/src/java/net/jetrix/filter/SurvivalFilter.java ___________________________________________________... [truncated message content] |
From: <sm...@us...> - 2009-02-18 18:26:37
|
Revision: 800 http://jetrix.svn.sourceforge.net/jetrix/?rev=800&view=rev Author: smanux Date: 2009-02-18 18:26:28 +0000 (Wed, 18 Feb 2009) Log Message: ----------- Implemented the mail API and its integration in the server configuration Modified Paths: -------------- jetrix/trunk/build.xml jetrix/trunk/doc/todo.txt jetrix/trunk/src/admin/WEB-INF/classes/net/jetrix/servlets/ServerAction.java jetrix/trunk/src/admin/server.jsp jetrix/trunk/src/etc/conf/server.xml jetrix/trunk/src/etc/tetrinet-server.dtd jetrix/trunk/src/java/net/jetrix/Server.java jetrix/trunk/src/java/net/jetrix/config/ServerConfig.java jetrix/trunk/src/java/net/jetrix/config/ServerRuleSet.java Added Paths: ----------- jetrix/trunk/lib/mailapi-1.4.1.jar jetrix/trunk/lib/smtp-1.4.1.jar jetrix/trunk/src/java/net/jetrix/config/MailSessionConfig.java jetrix/trunk/src/java/net/jetrix/mail/ jetrix/trunk/src/java/net/jetrix/mail/MailMessage.java jetrix/trunk/src/java/net/jetrix/mail/MailSessionManager.java Modified: jetrix/trunk/build.xml =================================================================== --- jetrix/trunk/build.xml 2009-02-18 16:28:08 UTC (rev 799) +++ jetrix/trunk/build.xml 2009-02-18 18:26:28 UTC (rev 800) @@ -157,6 +157,8 @@ <antcall target="pack.lib" inheritAll="true"><param name="library" value="servlet-light"/></antcall> <antcall target="pack.lib" inheritAll="true"><param name="library" value="jasper-runtime"/></antcall> <antcall target="pack.lib" inheritAll="true"><param name="library" value="jcrontab-1.4.1-light"/></antcall> + <antcall target="pack.lib" inheritAll="true"><param name="library" value="mailapi-1.4.1"/></antcall> + <antcall target="pack.lib" inheritAll="true"><param name="library" value="smtp-1.4.1"/></antcall> </target> <target name="pack.lib" description="Pack the library specified by the ${library} property"> Modified: jetrix/trunk/doc/todo.txt =================================================================== --- jetrix/trunk/doc/todo.txt 2009-02-18 16:28:08 UTC (rev 799) +++ jetrix/trunk/doc/todo.txt 2009-02-18 18:26:28 UTC (rev 800) @@ -47,3 +47,6 @@ - automatic generation of the commands documentation - java web start demo - compress the files on the patch server + +Code +- split the code in two parts : the core tetrinet classes and the server specific classes Added: jetrix/trunk/lib/mailapi-1.4.1.jar =================================================================== (Binary files differ) Property changes on: jetrix/trunk/lib/mailapi-1.4.1.jar ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: jetrix/trunk/lib/smtp-1.4.1.jar =================================================================== (Binary files differ) Property changes on: jetrix/trunk/lib/smtp-1.4.1.jar ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: jetrix/trunk/src/admin/WEB-INF/classes/net/jetrix/servlets/ServerAction.java =================================================================== --- jetrix/trunk/src/admin/WEB-INF/classes/net/jetrix/servlets/ServerAction.java 2009-02-18 16:28:08 UTC (rev 799) +++ jetrix/trunk/src/admin/WEB-INF/classes/net/jetrix/servlets/ServerAction.java 2009-02-18 18:26:28 UTC (rev 800) @@ -28,6 +28,7 @@ import javax.servlet.ServletException; import net.jetrix.*; +import net.jetrix.mail.*; import net.jetrix.commands.*; import net.jetrix.config.*; @@ -39,7 +40,6 @@ */ public class ServerAction extends HttpServlet { - protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String action = request.getParameter("action"); @@ -64,25 +64,25 @@ else if ("listener.start".equals(action)) { int index = Integer.parseInt(request.getParameter("index")); - Listener listener = (Listener) config.getListeners().get(index); + Listener listener = config.getListeners().get(index); listener.start(); } else if ("listener.stop".equals(action)) { int index = Integer.parseInt(request.getParameter("index")); - Listener listener = (Listener) config.getListeners().get(index); + Listener listener = config.getListeners().get(index); listener.stop(); } else if ("service.start".equals(action)) { int index = Integer.parseInt(request.getParameter("index")); - Service service = (Service) config.getServices().get(index); + Service service = config.getServices().get(index); service.start(); } else if ("service.stop".equals(action)) { int index = Integer.parseInt(request.getParameter("index")); - Service service = (Service) config.getServices().get(index); + Service service = config.getServices().get(index); service.stop(); } else if ("command.remove".equals(action)) @@ -122,6 +122,19 @@ config.addDataSource(datasource); DataSourceManager.getInstance().setDataSource(datasource, datasource.getName()); } + else if ("mailsession.update".equals(action)) + { + MailSessionConfig mailconfig = new MailSessionConfig(); + mailconfig.setHostname(request.getParameter("hostname")); + mailconfig.setPort(Integer.parseInt(request.getParameter("port"))); + mailconfig.setAuth("true".equals(request.getParameter("auth"))); + mailconfig.setUsername(request.getParameter("username")); + mailconfig.setPassword(request.getParameter("password")); + mailconfig.setDebug("true".equals(request.getParameter("debug"))); + + config.setMailSessionConfig(mailconfig); + MailSessionManager.getInstance().setConfiguration(mailconfig); + } else if ("gc".equals(action)) { System.gc(); Modified: jetrix/trunk/src/admin/server.jsp =================================================================== --- jetrix/trunk/src/admin/server.jsp 2009-02-18 16:28:08 UTC (rev 799) +++ jetrix/trunk/src/admin/server.jsp 2009-02-18 18:26:28 UTC (rev 800) @@ -455,8 +455,67 @@ <% } %> </div> - + <div class="tab-page" style="height: 400px"> + <h2 class="tab">Mail</h2> + + <form id="mailsession" action="/servlet/<%= ServerAction.class.getName() %>"> + <input type="hidden" name="action" value="mailsession.update"> + + <table class="thin" style="width: 400px"> + <tr> + <th width="30%">Hostname</th> + <td><input class="thin" type="text" name="hostname" value="<%= conf.getMailSessionConfig().getHostname() %>" style="width: 98%"></td> + </tr> + <tr> + <th>Port</th> + <td><input class="thin" type="text" name="port" value="<%= conf.getMailSessionConfig().getPort() %>" size="5"></td> + </tr> + <tr> + <th>Authentication</th> + <td> + <table> + <tr> + <td><input type="radio" value="true" name="auth" id="auth1" <%= conf.getMailSessionConfig().isAuth() ? "checked" : "" %>></td> + <td><label for="auth1">Enabled</label></td> + <td><input type="radio" value="false" name="auth" id="auth2" <%= !conf.getMailSessionConfig().isAuth() ? "checked" : "" %>></td> + <td><label for="auth2">Disabled</label></td> + </tr> + </table> + </td> + </tr> + <tr> + <th>Username</th> + <td><input class="thin" type="text" name="username" value="<%= conf.getMailSessionConfig().getUsername() %>"></td> + </tr> + <tr> + <th>Password</th> + <td><input class="thin" type="text" name="password" value="<%= conf.getMailSessionConfig().getPassword() %>"></td> + </tr> + <tr> + <th>Debug Mode</th> + <td> + <table> + <tr> + <td><input type="radio" value="true" name="debug" id="debug1" <%= conf.getMailSessionConfig().isDebug() ? "checked" : "" %>></td> + <td><label for="debug1">Enabled</label></td> + <td><input type="radio" value="false" name="debug" id="debug2" <%= !conf.getMailSessionConfig().isDebug() ? "checked" : "" %>></td> + <td><label for="debug2">Disabled</label></td> + </tr> + </table> + </td> + </tr> + </table> + + <br> + + <input type="submit" value="Update"> + + </form> + + </div> + + <div class="tab-page" style="height: 400px"> <h2 class="tab">System</h2> <% Modified: jetrix/trunk/src/etc/conf/server.xml =================================================================== --- jetrix/trunk/src/etc/conf/server.xml 2009-02-18 16:28:08 UTC (rev 799) +++ jetrix/trunk/src/etc/conf/server.xml 2009-02-18 18:26:28 UTC (rev 800) @@ -124,4 +124,7 @@ </datasource> </datasources> + <!-- Mail server parameters --> + <mailserver host="localhost" port="25" auth="false" username="" password="" debug="false"/> + </tetrinet-server> Modified: jetrix/trunk/src/etc/tetrinet-server.dtd =================================================================== --- jetrix/trunk/src/etc/tetrinet-server.dtd 2009-02-18 16:28:08 UTC (rev 799) +++ jetrix/trunk/src/etc/tetrinet-server.dtd 2009-02-18 18:26:28 UTC (rev 800) @@ -23,7 +23,8 @@ <!ELEMENT tetrinet-server (name?, language?, timeout?, max-channels?, max-players?, max-connections?, op-password, admin-password, access-log, - error-log, channels?, listeners, services?, commands, ban?, datasources?)> + error-log, channels?, listeners, services?, commands, ban?, datasources?, + mailserver?)> <!ATTLIST tetrinet-server host CDATA #IMPLIED> <!ELEMENT name (#PCDATA)> @@ -79,3 +80,11 @@ <!ELEMENT password (#PCDATA)> <!ELEMENT min-idle (#PCDATA)> <!ELEMENT max-active (#PCDATA)> + +<!ELEMENT mailserver EMPTY> +<!ATTLIST mailserver host CDATA #REQUIRED> +<!ATTLIST mailserver port CDATA #IMPLIED> +<!ATTLIST mailserver auth CDATA #IMPLIED> +<!ATTLIST mailserver username CDATA #IMPLIED> +<!ATTLIST mailserver password CDATA #IMPLIED> +<!ATTLIST mailserver debug CDATA #IMPLIED> Modified: jetrix/trunk/src/java/net/jetrix/Server.java =================================================================== --- jetrix/trunk/src/java/net/jetrix/Server.java 2009-02-18 16:28:08 UTC (rev 799) +++ jetrix/trunk/src/java/net/jetrix/Server.java 2009-02-18 18:26:28 UTC (rev 800) @@ -24,6 +24,8 @@ import java.util.concurrent.*; import java.util.logging.*; +import javax.mail.MessagingException; + import net.jetrix.clients.*; import net.jetrix.commands.*; import net.jetrix.config.*; @@ -31,6 +33,8 @@ import net.jetrix.messages.channel.*; import net.jetrix.services.VersionService; import net.jetrix.listeners.ShutdownListener; +import net.jetrix.mail.MailSessionManager; +import net.jetrix.mail.MailMessage; /** * Main class, starts the server components and handle the server level messages. @@ -113,6 +117,13 @@ } } + if (config.getMailSessionConfig() != null) + { + log.info("Initializing the mail session..."); + MailSessionManager.getInstance().setConfiguration(config.getMailSessionConfig()); + MailSessionManager.getInstance().checkSession(); + } + // display the systray icon (windows only) SystrayManager.open(); Added: jetrix/trunk/src/java/net/jetrix/config/MailSessionConfig.java =================================================================== --- jetrix/trunk/src/java/net/jetrix/config/MailSessionConfig.java (rev 0) +++ jetrix/trunk/src/java/net/jetrix/config/MailSessionConfig.java 2009-02-18 18:26:28 UTC (rev 800) @@ -0,0 +1,96 @@ +/** + * Jetrix TetriNET Server + * Copyright (C) 2009 Emmanuel Bourg + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +package net.jetrix.config; + +/** + * Configuration of the mail session. + * + * @author Emmanuel Bourg + * @version $Revision$, $Date$ + */ +public class MailSessionConfig +{ + private String hostname; + private int port = 25; + private boolean auth; + private String username; + private String password; + private boolean debug; + + public String getHostname() + { + return hostname; + } + + public void setHostname(String hostname) + { + this.hostname = hostname; + } + + public int getPort() + { + return port; + } + + public void setPort(int port) + { + this.port = port; + } + + public boolean isAuth() + { + return auth; + } + + public void setAuth(boolean auth) + { + this.auth = auth; + } + + public String getUsername() + { + return username; + } + + public void setUsername(String username) + { + this.username = username; + } + + public String getPassword() + { + return password; + } + + public void setPassword(String password) + { + this.password = password; + } + + public boolean isDebug() + { + return debug; + } + + public void setDebug(boolean debug) + { + this.debug = debug; + } +} Property changes on: jetrix/trunk/src/java/net/jetrix/config/MailSessionConfig.java ___________________________________________________________________ Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native Modified: jetrix/trunk/src/java/net/jetrix/config/ServerConfig.java =================================================================== --- jetrix/trunk/src/java/net/jetrix/config/ServerConfig.java 2009-02-18 16:28:08 UTC (rev 799) +++ jetrix/trunk/src/java/net/jetrix/config/ServerConfig.java 2009-02-18 18:26:28 UTC (rev 800) @@ -75,9 +75,12 @@ private int status; private Statistics statistics = new Statistics(); - // datasource configuration + /** Datasources configuration */ private Map<String, DataSourceConfig> datasources = new LinkedHashMap<String, DataSourceConfig>(); + /** Mail session configuration */ + private MailSessionConfig mailSessionConfig; + private URL serverConfigURL; private URL channelsConfigURL; @@ -315,6 +318,28 @@ out.println(); } + if (mailSessionConfig != null) + { + StringBuilder buffer = new StringBuilder(); + buffer.append(" <mailserver host=\"").append(mailSessionConfig.getHostname()).append("\""); + buffer.append(" port=\"").append(mailSessionConfig.getPort()).append("\""); + if (mailSessionConfig.isAuth()) + { + buffer.append(" auth=\"true\""); + buffer.append(" username=\"").append(mailSessionConfig.getUsername()).append("\""); + buffer.append(" password=\"").append(mailSessionConfig.getPassword()).append("\""); + } + if (mailSessionConfig.isDebug()) + { + buffer.append(" debug=\"true\""); + } + buffer.append("/>"); + + out.println(" <!-- Mail server parameters -->"); + out.println(buffer.toString()); + out.println(); + } + out.println("</tetrinet-server>"); @@ -962,4 +987,20 @@ { datasources.put(datasource.getName(), datasource); } + + /** + * @since 0.3 + */ + public MailSessionConfig getMailSessionConfig() + { + return mailSessionConfig; + } + + /** + * @since 0.3 + */ + public void setMailSessionConfig(MailSessionConfig mailSessionConfig) + { + this.mailSessionConfig = mailSessionConfig; + } } Modified: jetrix/trunk/src/java/net/jetrix/config/ServerRuleSet.java =================================================================== --- jetrix/trunk/src/java/net/jetrix/config/ServerRuleSet.java 2009-02-18 16:28:08 UTC (rev 799) +++ jetrix/trunk/src/java/net/jetrix/config/ServerRuleSet.java 2009-02-18 18:26:28 UTC (rev 800) @@ -30,7 +30,6 @@ */ class ServerRuleSet extends RuleSetBase { - public void addRuleInstances(Digester digester) { // server parameters @@ -86,6 +85,21 @@ digester.addCallMethod("*/datasource/password", "setPassword", 0); digester.addCallMethod("*/datasource/min-idle", "setMinIdle", 0); digester.addCallMethod("*/datasource/max-active", "setMaxActive", 0); + + // mail session + digester.addObjectCreate("*/mailserver", "net.jetrix.config.MailSessionConfig"); + digester.addSetNext("*/mailserver", "setMailSessionConfig", "net.jetrix.config.MailSessionConfig"); + digester.addCallMethod("*/mailserver", "setHostname", 1); + digester.addCallParam("*/mailserver", 0, "host"); + digester.addCallMethod("*/mailserver", "setPort", 1, new Class[] {Integer.TYPE}); + digester.addCallParam("*/mailserver", 0, "port"); + digester.addCallMethod("*/mailserver", "setAuth", 1, new Class[] {Boolean.TYPE}); + digester.addCallParam("*/mailserver", 0, "auth"); + digester.addCallMethod("*/mailserver", "setUsername", 1); + digester.addCallParam("*/mailserver", 0, "username"); + digester.addCallMethod("*/mailserver", "setPassword", 1); + digester.addCallParam("*/mailserver", 0, "password"); + digester.addCallMethod("*/mailserver", "setDebug", 1, new Class[] {Boolean.TYPE}); + digester.addCallParam("*/mailserver", 0, "debug"); } - } Added: jetrix/trunk/src/java/net/jetrix/mail/MailMessage.java =================================================================== --- jetrix/trunk/src/java/net/jetrix/mail/MailMessage.java (rev 0) +++ jetrix/trunk/src/java/net/jetrix/mail/MailMessage.java 2009-02-18 18:26:28 UTC (rev 800) @@ -0,0 +1,221 @@ +/** + * Jetrix TetriNET Server + * Copyright (C) 2009 Emmanuel Bourg + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +package net.jetrix.mail; + +import java.io.File; +import java.util.Date; +import java.util.HashSet; +import java.util.Set; +import javax.activation.DataHandler; +import javax.activation.DataSource; +import javax.activation.FileDataSource; +import javax.mail.Address; +import javax.mail.Message; +import javax.mail.MessagingException; +import javax.mail.Multipart; +import javax.mail.Session; +import javax.mail.Transport; +import javax.mail.internet.AddressException; +import javax.mail.internet.InternetAddress; +import javax.mail.internet.MimeBodyPart; +import javax.mail.internet.MimeMessage; +import javax.mail.internet.MimeMultipart; + +/** + * A simple mail message. This class intends to abstract the complexity + * of the JavaMail API for simple usages. It relies on the MailSessionManager + * to provide a valid mail session. + * + * @author Emmanuel Bourg + * @version $Revision$, $Date$ + * @since 0.3 + */ +public class MailMessage +{ + private static final String DEFAULT_CHARSET = "iso-8859-1"; + + private CharSequence subject; + private CharSequence body; + + private InternetAddress from; + + private Set<InternetAddress> recipients = new HashSet<InternetAddress>(); + private Set<InternetAddress> recipientsCC = new HashSet<InternetAddress>(); + private Set<InternetAddress> recipientsBCC = new HashSet<InternetAddress>(); + + private Set<DataSource> attachments = new HashSet<DataSource>(); + + public MailMessage() + { + } + + public void setSubject(CharSequence subject) + { + this.subject = subject; + } + + public void setBody(CharSequence body) + { + this.body = body; + } + + public void setFrom(InternetAddress from) + { + this.from = from; + } + + public void setFrom(String from) throws AddressException + { + this.from = new InternetAddress(from, false); + } + + public void addRecipient(String address) throws AddressException + { + recipients.add(new InternetAddress(address)); + } + + public void addRecipientCC(String address) throws AddressException + { + recipientsCC.add(new InternetAddress(address)); + } + + public void addRecipientBCC(String address) throws AddressException + { + recipientsBCC.add(new InternetAddress(address)); + } + + public void addRecipient(InternetAddress address) + { + recipients.add(address); + } + + public void addRecipientCC(InternetAddress address) + { + recipientsCC.add(address); + } + + public void addRecipientBCC(InternetAddress address) + { + recipientsBCC.add(address); + } + + public void addAttachment(File file) + { + attachments.add(new FileDataSource(file)); + } + + public void addAttachment(DataSource datasource) + { + attachments.add(datasource); + } + + /** + * Send the message, and if requested, asynchronously in a separate thread. + * + * @param asynchronous send the message in a separate thread + */ + public void send(boolean asynchronous) throws MessagingException + { + if (!asynchronous) + { + send(); + } + else + { + new Thread("MailMessage.send()") + { + public void run() + { + try + { + send(); + } + catch (MessagingException e) + { + throw new RuntimeException("An error occured when sending the mail", e); + } + } + }.start(); + } + } + + /** + * Send the message. + */ + public void send() throws MessagingException + { + Session session = MailSessionManager.getInstance().getSession(); + + // build the message + MimeMessage message = new MimeMessage(session); + message.setSubject(subject.toString(), DEFAULT_CHARSET); + message.setFrom(from); + + message.addRecipients(Message.RecipientType.TO, recipients.toArray(new Address[recipients.size()])); + message.addRecipients(Message.RecipientType.CC, recipientsCC.toArray(new Address[recipientsCC.size()])); + message.addRecipients(Message.RecipientType.BCC, recipientsBCC.toArray(new Address[recipientsBCC.size()])); + + message.setHeader("Content-Transfer-Encoding", "8bit"); + message.setSentDate(new Date()); + + MimeBodyPart part1 = new MimeBodyPart(); + if (body.toString().toLowerCase().trim().startsWith("<html") || body.toString().toLowerCase().trim().startsWith("<!doctype html")) + { + part1.setContent(body.toString(), "text/html; charset=" + DEFAULT_CHARSET); + } + else + { + part1.setText(body.toString(), DEFAULT_CHARSET); + } + part1.setHeader("Content-Transfer-Encoding", "8bit"); + + Multipart content = new MimeMultipart(); + content.addBodyPart(part1); + + // add attachments + for (DataSource attachment : attachments) + { + MimeBodyPart part2 = new MimeBodyPart(); + part2.setDataHandler(new DataHandler(attachment)); + part2.setFileName(attachment.getName()); + + content.addBodyPart(part2); + } + + message.setContent(content); + message.saveChanges(); + + // send the message + Transport transport = session.getTransport(); + + try + { + transport.connect(); + transport.sendMessage(message, message.getAllRecipients()); + } + finally + { + if (transport.isConnected()) + { + transport.close(); + } + } + } +} Property changes on: jetrix/trunk/src/java/net/jetrix/mail/MailMessage.java ___________________________________________________________________ Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native Added: jetrix/trunk/src/java/net/jetrix/mail/MailSessionManager.java =================================================================== --- jetrix/trunk/src/java/net/jetrix/mail/MailSessionManager.java (rev 0) +++ jetrix/trunk/src/java/net/jetrix/mail/MailSessionManager.java 2009-02-18 18:26:28 UTC (rev 800) @@ -0,0 +1,124 @@ +/** + * Jetrix TetriNET Server + * Copyright (C) 2009 Emmanuel Bourg + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +package net.jetrix.mail; + +import java.util.Properties; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.mail.*; + +import net.jetrix.config.MailSessionConfig; +import org.apache.commons.lang.StringUtils; + +/** + * Singleton holding the session to send mails. + * + * @author Emmanuel Bourg + * @version $Revision$, $Date$ + * @since 0.3 + */ +public final class MailSessionManager +{ + private Logger log = Logger.getLogger(getClass().getName()); + + private static MailSessionManager instance = new MailSessionManager(); + + private Session session; + + private MailSessionManager() + { + } + + public static MailSessionManager getInstance() + { + return instance; + } + + public Session getSession() + { + return session; + } + + /** + * Initialize the mail session from the specified configuration. + */ + public void setConfiguration(final MailSessionConfig config) + { + try + { + if (!StringUtils.isBlank(config.getHostname())) + { + Properties props = new Properties(); + props.setProperty("mail.transport.protocol", "smtp"); + props.setProperty("mail.smtp.host", config.getHostname()); + props.setProperty("mail.smtp.port", String.valueOf(config.getPort())); + props.setProperty("mail.smtp.auth", String.valueOf(config.isAuth())); + + session = Session.getInstance(props, new Authenticator() + { + protected PasswordAuthentication getPasswordAuthentication() + { + return new PasswordAuthentication(config.getUsername(), config.getPassword()); + } + }); + + // enable the debug mode if requested + if (config.isDebug()) + { + session.setDebug(true); + } + } + else + { + log.warning("Unable to initialize the mail session, the hostname is missing"); + } + } + catch (Exception e) + { + log.log(Level.SEVERE, "Unable to initialize the mail session", e); + } + } + + /** + * Check if the mail session is working properly. + */ + public boolean checkSession() + { + boolean check = false; + + if (session != null) + { + try + { + Transport transport = session.getTransport(); + transport.connect(); + transport.close(); + + check = true; + } + catch (MessagingException e) + { + log.warning("Unable to validate the mail session (" + e.getMessage() + ")"); + } + } + + return check; + } +} Property changes on: jetrix/trunk/src/java/net/jetrix/mail/MailSessionManager.java ___________________________________________________________________ Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sm...@us...> - 2009-02-25 23:19:20
|
Revision: 805 http://jetrix.svn.sourceforge.net/jetrix/?rev=805&view=rev Author: smanux Date: 2009-02-25 22:36:44 +0000 (Wed, 25 Feb 2009) Log Message: ----------- Moved the web admin to port 31460 Fixed a NPE in HttpListener.isRunning() Modified Paths: -------------- jetrix/trunk/doc/changelog.txt jetrix/trunk/src/etc/conf/server.xml jetrix/trunk/src/java/net/jetrix/listeners/HttpListener.java jetrix/trunk/src/site/faq.php jetrix/trunk/src/site/user-guide.php Modified: jetrix/trunk/doc/changelog.txt =================================================================== --- jetrix/trunk/doc/changelog.txt 2009-02-25 21:54:38 UTC (rev 804) +++ jetrix/trunk/doc/changelog.txt 2009-02-25 22:36:44 UTC (rev 805) @@ -18,6 +18,7 @@ - Added a visibility parameter on channels, it's now possible to have an invisible channel on the /list result - Channels can now be created from the administration console - The IP of the server is no longer submitted to tfast.org since the site is dead +- The web administration console has been moved from port 8080 to port 31460 Developer visible changes - added a readLine(Reader) method in the Protocol interface Modified: jetrix/trunk/src/etc/conf/server.xml =================================================================== --- jetrix/trunk/src/etc/conf/server.xml 2009-02-25 21:54:38 UTC (rev 804) +++ jetrix/trunk/src/etc/conf/server.xml 2009-02-25 22:36:44 UTC (rev 805) @@ -41,7 +41,7 @@ <listener class="net.jetrix.listeners.TetrinetListener"/> <listener class="net.jetrix.listeners.TSpecListener"/> <listener class="net.jetrix.listeners.IRCListener" port="31456" auto-start="false"/> - <listener class="net.jetrix.listeners.HttpListener" port="8080"/> + <listener class="net.jetrix.listeners.HttpListener" port="31460"/> </listeners> <!-- Services --> Modified: jetrix/trunk/src/java/net/jetrix/listeners/HttpListener.java =================================================================== --- jetrix/trunk/src/java/net/jetrix/listeners/HttpListener.java 2009-02-25 21:54:38 UTC (rev 804) +++ jetrix/trunk/src/java/net/jetrix/listeners/HttpListener.java 2009-02-25 22:36:44 UTC (rev 805) @@ -39,7 +39,7 @@ private org.mortbay.jetty.Server jetty; private Logger log = Logger.getLogger("net.jetrix"); private boolean initialized; - private int port = 8080; + private int port = 31460; public HttpListener() { @@ -87,39 +87,45 @@ public void start() { - try + if (!isRunning()) { - if (!initialized) + try { - init(); - initialized = true; + if (!initialized) + { + init(); + initialized = true; + } + jetty.start(); + log.info("Web administration console started on port " + getPort()); } - jetty.start(); - log.info("Web administration console started on port " + getPort()); + catch (MultiException e) + { + log.log(Level.SEVERE, "Unable to start the Web administration console on port " + getPort(), e); + } } - catch (MultiException e) - { - log.log(Level.SEVERE, "Unable to start the Web administration console on port " + getPort(), e); - } } public void stop() { - try + if (isRunning()) { - jetty.stop(); - log.info("Web administration console stopped"); + try + { + jetty.stop(); + log.info("Web administration console stopped"); + } + catch (InterruptedException e) + { + e.printStackTrace(); + } } - catch (InterruptedException e) - { - e.printStackTrace(); - } } public void run() { } public boolean isRunning() { - return jetty.isStarted(); + return jetty != null && jetty.isStarted(); } } Modified: jetrix/trunk/src/site/faq.php =================================================================== --- jetrix/trunk/src/site/faq.php 2009-02-25 21:54:38 UTC (rev 804) +++ jetrix/trunk/src/site/faq.php 2009-02-25 22:36:44 UTC (rev 805) @@ -7,9 +7,9 @@ <h3>How do I log on the administration console?</h3> -<p>Open your browser and go to your server on the 8080 port:</p> +<p>Open your browser and go to your server on the 31460 port:</p> -<code>http://tetrinet.yourhostname.net:8080</code> +<code>http://tetrinet.yourhostname.net:31460</code> <p>A username and a password are requested, type <tt>admin</tt>, as username, and use the administrator password defined in the <tt>server.xml</tt> file. The Modified: jetrix/trunk/src/site/user-guide.php =================================================================== --- jetrix/trunk/src/site/user-guide.php 2009-02-25 21:54:38 UTC (rev 804) +++ jetrix/trunk/src/site/user-guide.php 2009-02-25 22:36:44 UTC (rev 805) @@ -126,7 +126,7 @@ <listener class="net.jetrix.listeners.TetrinetListener"/> <listener class="net.jetrix.listeners.TSpecListener"/> <listener class="net.jetrix.listeners.IRCListener" port="31456"/> - <listener class="net.jetrix.listeners.HttpListener" port="8080"/> + <listener class="net.jetrix.listeners.HttpListener" port="31460"/> </listeners> </div> @@ -148,7 +148,7 @@ <p>An administration console is integrated to Jetrix, you can use it with any modern browser to change most of the configuration without restarting the -server. The console is available on the port 8080 of your server. You'll be +server. The console is available on the port 31460 of your server. You'll be prompted for a username and a password, just type in <tt>admin</tt> and the administrator password to enter (<tt>adminpass</tt> by default).</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sm...@us...> - 2009-02-25 23:32:17
|
Revision: 804 http://jetrix.svn.sourceforge.net/jetrix/?rev=804&view=rev Author: smanux Date: 2009-02-25 21:54:38 +0000 (Wed, 25 Feb 2009) Log Message: ----------- Changed the path of the icons in the main jar Modified Paths: -------------- jetrix/trunk/build.xml jetrix/trunk/src/java/net/jetrix/SystrayManager.java Modified: jetrix/trunk/build.xml =================================================================== --- jetrix/trunk/build.xml 2009-02-25 21:22:12 UTC (rev 803) +++ jetrix/trunk/build.xml 2009-02-25 21:54:38 UTC (rev 804) @@ -104,11 +104,9 @@ <fileset dir="${src}/etc"> <include name="tetrinet-server.dtd"/> <include name="tetrinet-channels.dtd"/> + <include name="icons/jetrix-16x16.png"/> + <include name="icons/jetrix-32x32.png"/> </fileset> - <fileset dir="${src}/etc/icons"> - <include name="jetrix-16x16.png"/> - <include name="jetrix-32x32.png"/> - </fileset> </jar> <!-- Create the Launcher JAR --> Modified: jetrix/trunk/src/java/net/jetrix/SystrayManager.java =================================================================== --- jetrix/trunk/src/java/net/jetrix/SystrayManager.java 2009-02-25 21:22:12 UTC (rev 803) +++ jetrix/trunk/src/java/net/jetrix/SystrayManager.java 2009-02-25 21:54:38 UTC (rev 804) @@ -105,7 +105,7 @@ String osname = System.getProperty("os.name"); String iconname = osname.contains("Linux") ? "jetrix-32x32.png" : "jetrix-16x16.png"; ClassLoader loader = Thread.currentThread().getContextClassLoader(); - Image icon = new ImageIcon(loader.getResource(iconname)).getImage(); + Image icon = new ImageIcon(loader.getResource("icons/" + iconname)).getImage(); trayIcon = new TrayIcon(icon, TITLE, menu); trayIcon.setImageAutoSize(true); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sm...@us...> - 2010-01-10 20:47:49
|
Revision: 814 http://jetrix.svn.sourceforge.net/jetrix/?rev=814&view=rev Author: smanux Date: 2010-01-10 20:47:42 +0000 (Sun, 10 Jan 2010) Log Message: ----------- Replaced Jetty with Winstone for the web administration console Modified Paths: -------------- jetrix/trunk/build.xml jetrix/trunk/pom.xml jetrix/trunk/src/admin/WEB-INF/classes/net/jetrix/servlets/PrecompiledPagesFilter.java jetrix/trunk/src/admin/WEB-INF/web.xml jetrix/trunk/src/admin/channel.jsp jetrix/trunk/src/admin/server.jsp jetrix/trunk/src/java/net/jetrix/listeners/HttpListener.java Added Paths: ----------- jetrix/trunk/lib/jsp-api-2.1.jar jetrix/trunk/lib/jsp-api-light.jar jetrix/trunk/lib/winstone-lite-0.9.10.jar Removed Paths: ------------- jetrix/trunk/lib/jetty.jar jetrix/trunk/lib/servlet-light.jar jetrix/trunk/lib/servlet.jar Modified: jetrix/trunk/build.xml =================================================================== --- jetrix/trunk/build.xml 2009-09-13 22:00:05 UTC (rev 813) +++ jetrix/trunk/build.xml 2010-01-10 20:47:42 UTC (rev 814) @@ -151,8 +151,8 @@ <antcall target="pack.lib" inheritAll="true"><param name="library" value="commons-lang-2.0-light"/></antcall> <antcall target="pack.lib" inheritAll="true"><param name="library" value="commons-pool-1.4"/></antcall> <antcall target="pack.lib" inheritAll="true"><param name="library" value="commons-dbcp-1.2.2"/></antcall> - <antcall target="pack.lib" inheritAll="true"><param name="library" value="jetty"/></antcall> - <antcall target="pack.lib" inheritAll="true"><param name="library" value="servlet-light"/></antcall> + <antcall target="pack.lib" inheritAll="true"><param name="library" value="winstone-lite-0.9.10"/></antcall> + <antcall target="pack.lib" inheritAll="true"><param name="library" value="jsp-api-light"/></antcall> <antcall target="pack.lib" inheritAll="true"><param name="library" value="jasper-runtime"/></antcall> <antcall target="pack.lib" inheritAll="true"><param name="library" value="jcrontab-1.4.1-light"/></antcall> <antcall target="pack.lib" inheritAll="true"><param name="library" value="mailapi-1.4.1"/></antcall> Deleted: jetrix/trunk/lib/jetty.jar =================================================================== (Binary files differ) Added: jetrix/trunk/lib/jsp-api-2.1.jar =================================================================== (Binary files differ) Property changes on: jetrix/trunk/lib/jsp-api-2.1.jar ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: jetrix/trunk/lib/jsp-api-light.jar =================================================================== (Binary files differ) Property changes on: jetrix/trunk/lib/jsp-api-light.jar ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Deleted: jetrix/trunk/lib/servlet-light.jar =================================================================== (Binary files differ) Deleted: jetrix/trunk/lib/servlet.jar =================================================================== (Binary files differ) Added: jetrix/trunk/lib/winstone-lite-0.9.10.jar =================================================================== (Binary files differ) Property changes on: jetrix/trunk/lib/winstone-lite-0.9.10.jar ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: jetrix/trunk/pom.xml =================================================================== --- jetrix/trunk/pom.xml 2009-09-13 22:00:05 UTC (rev 813) +++ jetrix/trunk/pom.xml 2010-01-10 20:47:42 UTC (rev 814) @@ -127,12 +127,11 @@ <artifactId>commons-dbcp</artifactId> <version>1.2.2</version> </dependency> - + <dependency> - <groupId>jetty</groupId> - <artifactId>jetty</artifactId> - <version>4.1-rc1</version> - <optional>true</optional> + <groupId>net.sourceforge.winstone</groupId> + <artifactId>winstone</artifactId> + <version>0.9.10</version> </dependency> <dependency> Modified: jetrix/trunk/src/admin/WEB-INF/classes/net/jetrix/servlets/PrecompiledPagesFilter.java =================================================================== --- jetrix/trunk/src/admin/WEB-INF/classes/net/jetrix/servlets/PrecompiledPagesFilter.java 2009-09-13 22:00:05 UTC (rev 813) +++ jetrix/trunk/src/admin/WEB-INF/classes/net/jetrix/servlets/PrecompiledPagesFilter.java 2010-01-10 20:47:42 UTC (rev 814) @@ -31,7 +31,6 @@ */ public class PrecompiledPagesFilter implements Filter { - public void init(FilterConfig filterConfig) throws ServletException { } public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException Modified: jetrix/trunk/src/admin/WEB-INF/web.xml =================================================================== --- jetrix/trunk/src/admin/WEB-INF/web.xml 2009-09-13 22:00:05 UTC (rev 813) +++ jetrix/trunk/src/admin/WEB-INF/web.xml 2010-01-10 20:47:42 UTC (rev 814) @@ -2,34 +2,37 @@ <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> - <display-name>Jetrix Administration</display-name> - <description>Web administration console for Jetrix</description> + <display-name>Jetrix Administration</display-name> + <description>Web administration console for Jetrix</description> - <filter> - <filter-name>precomp</filter-name> - <filter-class>net.jetrix.servlets.PrecompiledPagesFilter</filter-class> - </filter> + <filter> + <filter-name>precomp</filter-name> + <filter-class>net.jetrix.servlets.PrecompiledPagesFilter</filter-class> + </filter> - <filter-mapping> - <filter-name>precomp</filter-name> - <url-pattern>*.jsp</url-pattern> - </filter-mapping> + <filter-mapping> + <filter-name>precomp</filter-name> + <url-pattern>*.jsp</url-pattern> + </filter-mapping> - <security-constraint> - <web-resource-collection> - <web-resource-name/> - <url-pattern>/</url-pattern> - <url-pattern>*.html</url-pattern> - <url-pattern>*.jsp</url-pattern> - </web-resource-collection> - <auth-constraint> - <role-name>admin</role-name> - </auth-constraint> - </security-constraint> + <security-constraint> + <web-resource-collection> + <web-resource-name/> + <url-pattern>/*</url-pattern> + </web-resource-collection> + <auth-constraint> + <role-name>admin</role-name> + </auth-constraint> + </security-constraint> - <login-config> - <auth-method>BASIC</auth-method> - <realm-name>Jetrix Admin</realm-name> - </login-config> + <login-config> + <auth-method>BASIC</auth-method> + <realm-name>Jetrix Administration</realm-name> + </login-config> + + <security-role> + <description>Jetrix Administrator</description> + <role-name>admin</role-name> + </security-role> </web-app> Modified: jetrix/trunk/src/admin/channel.jsp =================================================================== --- jetrix/trunk/src/admin/channel.jsp 2009-09-13 22:00:05 UTC (rev 813) +++ jetrix/trunk/src/admin/channel.jsp 2010-01-10 20:47:42 UTC (rev 814) @@ -125,7 +125,7 @@ <div class="tab-page" style="height: 400px"> <h2 class="tab">Settings</h2> - <jsp:include page="/servlet/org.apache.jsp.settings_jsp"/> + <%@ include file="settings.jsp"%> </div> <div class="tab-page" style="height: 400px"> Modified: jetrix/trunk/src/admin/server.jsp =================================================================== --- jetrix/trunk/src/admin/server.jsp 2009-09-13 22:00:05 UTC (rev 813) +++ jetrix/trunk/src/admin/server.jsp 2010-01-10 20:47:42 UTC (rev 814) @@ -57,7 +57,6 @@ <td> <select name="host"> <option value="[ALL]">All Interfaces</option> - <% Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces(); while (interfaces.hasMoreElements()) @@ -166,7 +165,7 @@ <div class="tab-page" style="height: 400px"> <h2 class="tab">Settings</h2> - <jsp:include page="/servlet/org.apache.jsp.settings_jsp"/> + <%@ include file="settings.jsp" %> </div> <div class="tab-page" style="height: 400px"> @@ -288,8 +287,8 @@ </tr> <% } %> <tr> - <td><input type="text" name="pattern" style="thin"></td> - <td><input type="text" name="expires" style="thin"></td> + <td><input type="text" name="pattern" class="thin"></td> + <td><input type="text" name="expires" class="thin"></td> <td width="50" align="center"> <select name="type"> <option value="0">Host</option> Modified: jetrix/trunk/src/java/net/jetrix/listeners/HttpListener.java =================================================================== --- jetrix/trunk/src/java/net/jetrix/listeners/HttpListener.java 2009-09-13 22:00:05 UTC (rev 813) +++ jetrix/trunk/src/java/net/jetrix/listeners/HttpListener.java 2010-01-10 20:47:42 UTC (rev 814) @@ -1,6 +1,6 @@ /** * Jetrix TetriNET Server - * Copyright (C) 2001-2003 Emmanuel Bourg + * Copyright (C) 2010 Emmanuel Bourg * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -19,15 +19,18 @@ package net.jetrix.listeners; -import java.io.*; -import java.util.logging.*; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; -import org.mortbay.http.*; -import org.mortbay.util.*; - -import net.jetrix.*; +import net.jetrix.Listener; +import net.jetrix.Server; import net.jetrix.services.AbstractService; +import winstone.Launcher; + /** * Web administration console. * @@ -36,40 +39,10 @@ */ public class HttpListener extends AbstractService implements Listener { - private org.mortbay.jetty.Server jetty; + private winstone.Launcher server; private Logger log = Logger.getLogger("net.jetrix"); - private boolean initialized; private int port = 31460; - public HttpListener() - { - // configure the log file - System.setProperty("LOG_CLASSES", "org.mortbay.util.OutputStreamLogSink"); - System.setProperty("LOG_FILE", "log/jetty.log"); - System.setProperty("LOG_DATE_FORMAT", "[yyyy-MM-dd HH:mm:ss] "); - } - - private void init() - { - // authentication realm - HashUserRealm realm = new HashUserRealm("Jetrix Admin"); - realm.put("admin", Server.getInstance().getConfig().getAdminPassword()); - realm.addUserToRole("admin", "admin"); - - jetty = new org.mortbay.jetty.Server(); - jetty.addRealm(realm); - - try - { - jetty.addListener(new InetAddrPort(getPort())); - jetty.addWebApplication("/", "./lib/jetrix-admin-@version@.war"); - } - catch (IOException e) - { - e.printStackTrace(); - } - } - public String getName() { return "web admin"; @@ -91,15 +64,29 @@ { try { - if (!initialized) - { - init(); - initialized = true; - } - jetty.start(); + Map<String, String> args = new HashMap<String, String>(); + args.put("warfile", "./lib/jetrix-admin-@version@.war"); + args.put("httpPort", String.valueOf(getPort())); + //args.put("ajp13Port", "-1"); + args.put("argumentsRealm.passwd.admin", Server.getInstance().getConfig().getAdminPassword()); + args.put("argumentsRealm.roles.admin", "admin"); + //args.put("accessLoggerClassName", "winstone.accesslog.SimpleAccessLogger"); + //args.put("simpleAccessLogger.file", "./log/webadmin_access.log"); + //args.put("simpleAccessLogger.format", "resin"); + args.put("logfile", "./log/webadmin.log"); + args.put("useInvoker", "true"); + args.put("invokerPrefix", "/servlet/"); + args.put("debug", "5"); + args.put("commonLibFolder", "./lib/shared"); + //args.put("useServletReloading", "true"); + + Launcher.initLogger(args); + + server = new Launcher(args); + log.info("Web administration console started on port " + getPort()); } - catch (MultiException e) + catch (IOException e) { log.log(Level.SEVERE, "Unable to start the Web administration console on port " + getPort(), e); } @@ -110,15 +97,8 @@ { if (isRunning()) { - try - { - jetty.stop(); - log.info("Web administration console stopped"); - } - catch (InterruptedException e) - { - e.printStackTrace(); - } + server.shutdown(); + log.info("Web administration console stopped"); } } @@ -126,6 +106,6 @@ public boolean isRunning() { - return jetty != null && jetty.isStarted(); + return server != null && server.isRunning(); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sm...@us...> - 2010-05-03 15:29:50
|
Revision: 846 http://jetrix.svn.sourceforge.net/jetrix/?rev=846&view=rev Author: smanux Date: 2010-05-03 15:29:44 +0000 (Mon, 03 May 2010) Log Message: ----------- Modularization of the resource bundles Modified Paths: -------------- jetrix/trunk/build.xml jetrix/trunk/pom.xml jetrix/trunk/src/java/net/jetrix/Language.java jetrix/trunk/src/java/net/jetrix/commands/ModeCommand.java jetrix/trunk/src/lang/jetrix_en.properties jetrix/trunk/src/lang/jetrix_fr.properties jetrix/trunk/src/lang/jetrix_nl.properties jetrix/trunk/src/lang/jetrix_pt.properties jetrix/trunk/src/test/net/jetrix/LanguageTest.java Added Paths: ----------- jetrix/trunk/src/lang/command/ jetrix/trunk/src/lang/command/mode_en.properties jetrix/trunk/src/lang/command/mode_fr.properties jetrix/trunk/src/lang/command/mode_nl.properties jetrix/trunk/src/lang/command/mode_pt.properties Removed Paths: ------------- jetrix/trunk/src/lang/jetrix.properties Modified: jetrix/trunk/build.xml =================================================================== --- jetrix/trunk/build.xml 2010-05-03 15:12:26 UTC (rev 845) +++ jetrix/trunk/build.xml 2010-05-03 15:29:44 UTC (rev 846) @@ -186,7 +186,7 @@ <include name="lib/jetrix-launcher-${version}.jar" /> </fileset> <fileset dir="${src}"> - <include name="lang/*.properties" /> + <include name="lang/**/*.properties" /> </fileset> </copy> <copy todir="${build}/dist/lib"> Modified: jetrix/trunk/pom.xml =================================================================== --- jetrix/trunk/pom.xml 2010-05-03 15:12:26 UTC (rev 845) +++ jetrix/trunk/pom.xml 2010-05-03 15:29:44 UTC (rev 846) @@ -173,7 +173,7 @@ <directory>src/lang</directory> <targetPath>./</targetPath> <includes> - <include>*.properties</include> + <include>**/*.properties</include> </includes> </testResource> <testResource> Modified: jetrix/trunk/src/java/net/jetrix/Language.java =================================================================== --- jetrix/trunk/src/java/net/jetrix/Language.java 2010-05-03 15:12:26 UTC (rev 845) +++ jetrix/trunk/src/java/net/jetrix/Language.java 2010-05-03 15:29:44 UTC (rev 846) @@ -1,6 +1,6 @@ /** * Jetrix TetriNET Server - * Copyright (C) 2001-2004 Emmanuel Bourg + * Copyright (C) 2001-2004,2010 Emmanuel Bourg * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -30,13 +30,19 @@ */ public class Language { + /** The names of the resource bundles imported. */ + private Set<String> bundleNames = new HashSet<String>(); + + private Map<Locale, MultiResourceBundle> bundles = new HashMap<Locale, MultiResourceBundle>(); + private static Language instance = new Language(); - private Map<Locale,ResourceBundle> bundles; - private static String resource = "jetrix"; + /** The default resource bundle containing the server messages. */ + private static final String DEFAULT_RESOURCE = "jetrix"; + private Language() { - bundles = new HashMap<Locale, ResourceBundle>(); + addResources(DEFAULT_RESOURCE); } /** @@ -48,29 +54,30 @@ } /** + * Register an extra set of localized messages. + * + * @param name the base name of the resource bundle + * @since 0.3 + */ + public void addResources(String name) + { + bundleNames.add(name); + } + + /** * Load and return the <tt>ResourceBundle</tt> for the specified locale. * Bundles are cached in a local Map. * * @param locale the locale of the returned bundle if available */ - public ResourceBundle load(Locale locale) + protected ResourceBundle load(Locale locale) { - ResourceBundle bundle = PropertyResourceBundle.getBundle(resource, locale); + MultiResourceBundle bundle = new MultiResourceBundle(locale); bundles.put(locale, bundle); return bundle; } /** - * Return the <tt>ResourceBundle</tt> for the specified locale. - * - * @param locale the locale of the bundle to return - */ - public ResourceBundle getResourceBundle(Locale locale) - { - return bundles.get(locale); - } - - /** * Tell if the specified locale has a corresponding resource file available. * * @param locale the locale to test @@ -79,12 +86,12 @@ */ public static boolean isSupported(Locale locale) { - ResourceBundle bundle = instance.getResourceBundle(locale); + MultiResourceBundle bundle = instance.bundles.get(locale); if (bundle == null) { - bundle = PropertyResourceBundle.getBundle(resource, locale); + bundle = instance.new MultiResourceBundle(locale); } - return (bundle != null && bundle.getLocale().equals(locale)); + return bundle.isSupported(); } /** @@ -116,7 +123,7 @@ { try { - ResourceBundle bundle = instance.getResourceBundle(locale); + ResourceBundle bundle = instance.bundles.get(locale); if (bundle == null) { bundle = instance.load(locale); @@ -145,18 +152,99 @@ // localize the arguments Object[] arguments2 = new Object[arguments.length]; for (int i = 0; i < arguments.length; i++) + { + arguments2[i] = getLocalizedArgument(locale, arguments[i]); + } + + return MessageFormat.format(getText(key, locale), arguments2); + } + + /** + * Transforms a localized argument into its actual value. Localized + * arguments start with the "key:" prefix and refers to another message + * in the resource bundle. + * + * @since 0.3 + * + * @param locale the target locale + * @param argument the argument to transform + */ + private static Object getLocalizedArgument(Locale locale, Object argument) + { + if (argument instanceof String && ((String) argument).startsWith("key:")) { - if (arguments[i] instanceof String && ((String) arguments[i]).startsWith("key:")) + return getText(((String) argument).substring(4), locale); + } + else + { + return argument; + } + } + + /** + * A resource bundle merging several property based resource bundles. + * + * @since 0.3 + */ + private class MultiResourceBundle extends ResourceBundle + { + private Locale locale; + + private MultiResourceBundle(Locale locale) + { + this.locale = locale; + } + + private PropertyResourceBundle getPropertyResourceBundle(String name) { + try { - arguments2[i] = getText(((String) arguments[i]).substring(4), locale); + return (PropertyResourceBundle) PropertyResourceBundle.getBundle(name, locale); } - else + catch (MissingResourceException e) { - arguments2[i] = arguments[i]; + return null; } } - return MessageFormat.format(getText(key, locale), arguments2); + protected Object handleGetObject(String key) + { + for (String name : bundleNames) + { + PropertyResourceBundle bundle = getPropertyResourceBundle(name); + if (bundle != null) + { + Object value = bundle.handleGetObject(key); + if (value != null) + { + return value; + } + } + } + + return null; + } + + public Enumeration<String> getKeys() + { + return null; + } + + /** + * Checks if at least one of the underlying resource bundles supports + * the locale assigned to this bundle. + */ + public boolean isSupported() + { + for (String name : bundleNames) + { + PropertyResourceBundle bundle = getPropertyResourceBundle(name); + if (bundle != null && bundle.getLocale().equals(locale)) + { + return true; + } + } + + return false; + } } - } Modified: jetrix/trunk/src/java/net/jetrix/commands/ModeCommand.java =================================================================== --- jetrix/trunk/src/java/net/jetrix/commands/ModeCommand.java 2010-05-03 15:12:26 UTC (rev 845) +++ jetrix/trunk/src/java/net/jetrix/commands/ModeCommand.java 2010-05-03 15:29:44 UTC (rev 846) @@ -50,6 +50,11 @@ {0, 0, 0, 0, 0, 0, 100,1, 1} }; + static + { + Language.getInstance().addResources("command.mode"); + } + public String getAlias() { return "mode"; Added: jetrix/trunk/src/lang/command/mode_en.properties =================================================================== --- jetrix/trunk/src/lang/command/mode_en.properties (rev 0) +++ jetrix/trunk/src/lang/command/mode_en.properties 2010-05-03 15:29:44 UTC (rev 846) @@ -0,0 +1,18 @@ +# +# English resource bundle for the /mode command in Jetrix +# +# @author Emmanuel Bourg +# @version $Revision$, $Date$ + +command.mode.description=Change the channel's configuration. +command.mode.message0=PURE 15% sticks +command.mode.message1=COOKIES 1:1 (1 line cleared yields one special block) +command.mode.message2=PURE 20% sticks +command.mode.message3=COOKIE 2:1 (2 lines cleared yield one special block) +command.mode.message4=PURE 25% sticks +command.mode.message5=NO STICKS (0% stick) +command.mode.message6=ALL STICKS (100% stick) +command.mode.message7=COOKIES 1:1 with Z blocks only +command.mode.message8=COOKIES 1:1 with L blocks only +command.mode.message9=COOKIES 1:1 with T blocks only +command.mode.enabled=<gray>Configuration changed to <b>{0}</b> Property changes on: jetrix/trunk/src/lang/command/mode_en.properties ___________________________________________________________________ Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native Added: jetrix/trunk/src/lang/command/mode_fr.properties =================================================================== --- jetrix/trunk/src/lang/command/mode_fr.properties (rev 0) +++ jetrix/trunk/src/lang/command/mode_fr.properties 2010-05-03 15:29:44 UTC (rev 846) @@ -0,0 +1,18 @@ +# +# French resource bundle for the /mode command in Jetrix +# +# @author Emmanuel Bourg +# @version $Revision$, $Date$ + +command.mode.description=Change la configuration du channel. +command.mode.message0=PURE 15% de lignes +command.mode.message1=COOKIES 1:1 (1 ligne effac\xE9e donne 1 bloc special) +command.mode.message2=PURE 20% de lignes +command.mode.message3=COOKIE 2:1 (2 lignes effac\xE9es donnent 1 bloc sp\xE9cial) +command.mode.message4=PURE 25% de lignes +command.mode.message5=SANS LIGNES (0% lignes) +command.mode.message6=TOUT LIGNES (100% lignes) +command.mode.message7=COOKIES 1:1 avec seulement des blocs Z +command.mode.message8=COOKIES 1:1 avec seulement des blocs L +command.mode.message9=COOKIES 1:1 avec seulement des blocs T +command.mode.enabled=<gray>Configuration chang\xE9e en <b>{0}</b> Property changes on: jetrix/trunk/src/lang/command/mode_fr.properties ___________________________________________________________________ Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native Added: jetrix/trunk/src/lang/command/mode_nl.properties =================================================================== --- jetrix/trunk/src/lang/command/mode_nl.properties (rev 0) +++ jetrix/trunk/src/lang/command/mode_nl.properties 2010-05-03 15:29:44 UTC (rev 846) @@ -0,0 +1,19 @@ +# +# Dutch resource bundle for the /mode command in Jetrix +# +# @author Tim Van Wassenhove +# @author "Sobi" (so...@te...) +# @version $Revision$, $Date$ + +command.mode.description=Verander de configuratie van het kanaal. +command.mode.message0=PURE 15% sticks +command.mode.message1=COOKIES 1:1 (voor elke verwijderde regel krijg je 1 "special block") +command.mode.message2=PURE 20% sticks +command.mode.message3=COOKIE 2:1 (waneer je 2 regels verwijdert krijg je 1 "special block") +command.mode.message4=PURE 25% sticks +command.mode.message5=NO STICKS (0% stick) +command.mode.message6=ALL STICKS (100% stick) +command.mode.message7=COOKIES 1:1 alleen Z blocks +command.mode.message8=COOKIES 1:1 alleen L blocks +command.mode.message9=COOKIES 1:1 alleen T blocks +command.mode.enabled=<gray>Configuratie is veranderd naar <b>{0}</b> Property changes on: jetrix/trunk/src/lang/command/mode_nl.properties ___________________________________________________________________ Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native Added: jetrix/trunk/src/lang/command/mode_pt.properties =================================================================== --- jetrix/trunk/src/lang/command/mode_pt.properties (rev 0) +++ jetrix/trunk/src/lang/command/mode_pt.properties 2010-05-03 15:29:44 UTC (rev 846) @@ -0,0 +1,20 @@ +# +# Portuguese resource bundle for the /mode command in Jetrix +# +# @author V\xEDtor Melo +# @author "Scooter" (Tetridome player) +# @author "Luminoso" <lum...@gm...> +# @version $Revision$, $Date$ + +command.mode.description=Mude as configura\xE7\xF5es do canal. +command.mode.message0=PURE 15% sticks +command.mode.message1=COOKIES 1:1 (1 linha feita 1 special block) +command.mode.message2=PURE 20% sticks +command.mode.message3=COOKIE 2:1 (2 linhas feitas 1 special block) +command.mode.message4=PURE 25% sticks +command.mode.message5=SEM STICKS (0% stick) +command.mode.message6=S\xD3 STICKS (100% stick) +command.mode.message7=COOKIES 1:1 s\xF3 blocos Z +command.mode.message8=COOKIES 1:1 s\xF3 blocos L +command.mode.message9=COOKIES 1:1 s\xF3 blocos T +command.mode.enabled=<gray>Configura\xE7\xF5es mudadas para <b>{0}</b> Property changes on: jetrix/trunk/src/lang/command/mode_pt.properties ___________________________________________________________________ Added: svn:keywords + Date Author Id Revision HeadURL Added: svn:eol-style + native Deleted: jetrix/trunk/src/lang/jetrix.properties =================================================================== --- jetrix/trunk/src/lang/jetrix.properties 2010-05-03 15:12:26 UTC (rev 845) +++ jetrix/trunk/src/lang/jetrix.properties 2010-05-03 15:29:44 UTC (rev 846) @@ -1,41 +0,0 @@ -# -# This is the default english resource bundle file that will be used by Jetrix -# if a resource bundle for a specific Locale cannot be found. -# -# Additional locales can be specified by creating a new resource file in this -# directory that follows the following convention : -# -# jetrix_<language code>.properties -# -# for example : -# jetrix_fr.properties (French resources) -# jetrix_de.properties (German resources) -# jetrix_ja.properties (Japanese resources) -# -# The two digit language code must be lower case. A full list of language codes -# can be found at http://www-old.ics.uci.edu/pub/ietf/http/related/iso639.txt -# -# In order to enable a specific locale you must edit the Jetrix configuration -# file (config.xml) and insert the language code into the "language" tag : -# -# <tetrinet-server> -# ... -# <language>fr</language> -# ... -# </tetrinet-server> -# -# Some property strings are parameterized using braces, for example : -# -# "{0} has joined channel {1}" -# -# This will be converted into something like : -# -# "Smanux has joined channel #jetrix" -# -# You can also use style codes like [red], [green], [b]...[/b] -# -# Feel free to send your translation to sm...@lf... to make it available -# to all Jetrix users ! -# -# @author Emmanuel Bourg -# @version $Revision$, $Date$ Modified: jetrix/trunk/src/lang/jetrix_en.properties =================================================================== --- jetrix/trunk/src/lang/jetrix_en.properties 2010-05-03 15:12:26 UTC (rev 845) +++ jetrix/trunk/src/lang/jetrix_en.properties 2010-05-03 15:29:44 UTC (rev 846) @@ -167,19 +167,6 @@ command.list.status.open=OPEN command.list.status.full=FULL -command.mode.description=Change the channel's configuration. -command.mode.message0=PURE 15% sticks -command.mode.message1=COOKIES 1:1 (1 line cleared yields one special block) -command.mode.message2=PURE 20% sticks -command.mode.message3=COOKIE 2:1 (2 lines cleared yield one special block) -command.mode.message4=PURE 25% sticks -command.mode.message5=NO STICKS (0% stick) -command.mode.message6=ALL STICKS (100% stick) -command.mode.message7=COOKIES 1:1 with Z blocks only -command.mode.message8=COOKIES 1:1 with L blocks only -command.mode.message9=COOKIES 1:1 with T blocks only -command.mode.enabled=<gray>Configuration changed to <b>{0}</b> - command.motd.description=Display the message of the day. command.move.description=Move a player to a new slot. Modified: jetrix/trunk/src/lang/jetrix_fr.properties =================================================================== --- jetrix/trunk/src/lang/jetrix_fr.properties 2010-05-03 15:12:26 UTC (rev 845) +++ jetrix/trunk/src/lang/jetrix_fr.properties 2010-05-03 15:29:44 UTC (rev 846) @@ -131,19 +131,6 @@ command.list.status.open=OUVERT command.list.status.full=COMPLET -command.mode.description=Change la configuration du channel. -command.mode.message0=PURE 15% de lignes -command.mode.message1=COOKIES 1:1 (1 ligne effac\xE9e donne 1 bloc special) -command.mode.message2=PURE 20% de lignes -command.mode.message3=COOKIE 2:1 (2 lignes effac\xE9es donnent 1 bloc sp\xE9cial) -command.mode.message4=PURE 25% de lignes -command.mode.message5=SANS LIGNES (0% lignes) -command.mode.message6=TOUT LIGNES (100% lignes) -command.mode.message7=COOKIES 1:1 avec seulement des blocs Z -command.mode.message8=COOKIES 1:1 avec seulement des blocs L -command.mode.message9=COOKIES 1:1 avec seulement des blocs T -command.mode.enabled=<gray>Configuration chang\xE9e en <b>{0}</b> - command.motd.description=Affiche le message du jour. command.move.description=D\xE9place un joueur \xE0 un autre emplacement. @@ -209,7 +196,7 @@ filter.flood.blocked=<red>Flot de messages bloqu\xE9 en provenance de <b>{0} -filter.puzzle.announce=<b><brown>Niveay <aqua>{0}</aqua> : <purple>"{1}"</purple> <i>Con\xE7u par</i> <aqua>{2}</aqua>. +filter.puzzle.announce=<b><brown>Niveau <aqua>{0}</aqua> : <purple>"{1}"</purple> <i>Con\xE7u par</i> <aqua>{2}</aqua>. filter.puzzle.cleared=<b><red>F\xE9licitations ! Puzzle r\xE9solu ! filter.tetris.start_message=Le premier joueur qui r\xE9alise {0} tetris gagne ! Modified: jetrix/trunk/src/lang/jetrix_nl.properties =================================================================== --- jetrix/trunk/src/lang/jetrix_nl.properties 2010-05-03 15:12:26 UTC (rev 845) +++ jetrix/trunk/src/lang/jetrix_nl.properties 2010-05-03 15:29:44 UTC (rev 846) @@ -125,19 +125,6 @@ command.list.status.open=OPEN command.list.status.full=VOL -command.mode.description=Verander de configuratie van het kanaal. -command.mode.message0=PURE 15% sticks -command.mode.message1=COOKIES 1:1 (voor elke verwijderde regel krijg je 1 "special block") -command.mode.message2=PURE 20% sticks -command.mode.message3=COOKIE 2:1 (waneer je 2 regels verwijdert krijg je 1 "special block") -command.mode.message4=PURE 25% sticks -command.mode.message5=NO STICKS (0% stick) -command.mode.message6=ALL STICKS (100% stick) -command.mode.message7=COOKIES 1:1 alleen Z blocks -command.mode.message8=COOKIES 1:1 alleen L blocks -command.mode.message9=COOKIES 1:1 alleen T blocks -command.mode.enabled=<gray>Configuratie is veranderd naar <b>{0}</b> - command.motd.description=Toont de boodschap van de dag. command.move.description=Verplaatst de speler naar een andere plaats. Modified: jetrix/trunk/src/lang/jetrix_pt.properties =================================================================== --- jetrix/trunk/src/lang/jetrix_pt.properties 2010-05-03 15:12:26 UTC (rev 845) +++ jetrix/trunk/src/lang/jetrix_pt.properties 2010-05-03 15:29:44 UTC (rev 846) @@ -133,19 +133,6 @@ command.list.status.open=ABERTO command.list.status.full=CHEIO -command.mode.description=Mude as configura\xE7\xF5es do canal. -command.mode.message0=PURE 15% sticks -command.mode.message1=COOKIES 1:1 (1 linha feita 1 special block) -command.mode.message2=PURE 20% sticks -command.mode.message3=COOKIE 2:1 (2 linhas feitas 1 special block) -command.mode.message4=PURE 25% sticks -command.mode.message5=SEM STICKS (0% stick) -command.mode.message6=S\xD3 STICKS (100% stick) -command.mode.message7=COOKIES 1:1 s\xF3 blocos Z -command.mode.message8=COOKIES 1:1 s\xF3 blocos L -command.mode.message9=COOKIES 1:1 s\xF3 blocos T -command.mode.enabled=<gray>Configura\xE7\xF5es mudadas para <b>{0}</b> - command.motd.description=Exibe a mensagem do dia. command.move.description=Move um jogador para um novo slot. Modified: jetrix/trunk/src/test/net/jetrix/LanguageTest.java =================================================================== --- jetrix/trunk/src/test/net/jetrix/LanguageTest.java 2010-05-03 15:12:26 UTC (rev 845) +++ jetrix/trunk/src/test/net/jetrix/LanguageTest.java 2010-05-03 15:29:44 UTC (rev 846) @@ -31,6 +31,13 @@ */ public class LanguageTest extends TestCase { + protected void setUp() throws Exception + { + Locale.setDefault(Locale.KOREA); + Language.getInstance().addResources("jetrix"); + Language.getInstance().addResources("foo"); + } + public void testLoad() { Language language = Language.getInstance(); @@ -40,6 +47,7 @@ public void testIsSupported() { assertTrue("french is not supported", Language.isSupported(Locale.FRENCH)); + assertFalse("korean is supported", Language.isSupported(Locale.KOREAN)); } public void testGetText() @@ -50,9 +58,9 @@ public void testGetTextWithParameter() { - Object[] params = new Object[] { "Smanux", "tetrinet1" }; - String englishText = "<gray>Hello Smanux, you are in channel <b>tetrinet1</b>"; - String frenchText = "<gray>Salut Smanux, tu es dans le channel <b>tetrinet1</b>"; + Object[] params = new Object[] { "Smanux", 123 }; + String englishText = "<gray>Hello Smanux, you are in channel <b>123</b>"; + String frenchText = "<gray>Salut Smanux, tu es dans le channel <b>123</b>"; assertEquals("welcome message in english", englishText, Language.getText("channel.welcome", Locale.ENGLISH, params)); assertEquals("welcome message in french", frenchText, Language.getText("channel.welcome", Locale.FRENCH, params)); } @@ -83,4 +91,10 @@ assertTrue("english locale not found", locales.contains(Locale.ENGLISH)); assertTrue("french locale not found", locales.contains(Locale.FRENCH)); } + + public void testAdditionalBundle() + { + Language.getInstance().addResources("command.mode"); + assertEquals("<gray>Configuration changed to <b>yes</b>", Language.getText("command.mode.enabled", Locale.ENGLISH, "key:common.yes")); + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |