Initial import of pts, version 0.20a:
Perl TetriNET Server (pts) is a tetrinet server written in perl. pts has the following features: * Written in Perl. You can run PTS on Windows/Unix/etc. * Supports multiple channels. * Supports TetriNET and TetriFAST clients. (no Tspec, no IRC) * Supports Query (IRC bot's check) access. * 10 level authority. * Game statistics. * User Profile with registered nick (no registered team yet). * Ping. * Async DNS lookup. * Anti flood. * Imperfect detection of cheat programs. Provided in PR pkg/19372 by David Ferlier. The package needs some fixing.
This commit is contained in:
parent
f03373d7e2
commit
0b0798c8a4
9 changed files with 229 additions and 0 deletions
36
pts/DEINSTALL
Normal file
36
pts/DEINSTALL
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# $NetBSD: DEINSTALL,v 1.1.1.1 2003/04/13 08:25:30 jmmv Exp $
|
||||||
|
|
||||||
|
PKGNAME=$1
|
||||||
|
STAGE=$2
|
||||||
|
REMOVED="no"
|
||||||
|
|
||||||
|
LIST="${PKG_PREFIX}/share/pts/game.winlist \
|
||||||
|
${PKG_PREFIX}/share/pts/pts.lmsg \
|
||||||
|
${PKG_PREFIX}/share/pts/pts.profile \
|
||||||
|
${PKG_PREFIX}/share/pts/logs \
|
||||||
|
${PKG_PREFIX}/share/pts/dstats"
|
||||||
|
|
||||||
|
case ${STAGE} in
|
||||||
|
DEINSTALL)
|
||||||
|
for to_trash in ${LIST}; do
|
||||||
|
if [ -e "${to_trash}" ]; then
|
||||||
|
REMOVED="yes"
|
||||||
|
if [ -d "${to_trash}" ]; then
|
||||||
|
rm -rf ${to_trash}/*
|
||||||
|
elif [ -f "${to_trash}" ]; then
|
||||||
|
rm ${to_trash}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
|
||||||
|
POST-DEINSTALL)
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "Unexpected argument: ${STAGE}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
exit 0
|
15
pts/DESCR
Normal file
15
pts/DESCR
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
Perl TetriNET Server (pts) is a tetrinet server written in perl. pts
|
||||||
|
has the following features:
|
||||||
|
* Written in Perl. You can run PTS on Windows/Unix/etc.
|
||||||
|
* Supports multiple channels.
|
||||||
|
* Supports TetriNET and TetriFAST clients. (no Tspec, no IRC)
|
||||||
|
* Supports Query (IRC bot's check) access.
|
||||||
|
* 10 level authority.
|
||||||
|
* Game statistics.
|
||||||
|
* User Profile with registered nick (no registered team yet).
|
||||||
|
* Ping.
|
||||||
|
* Async DNS lookup.
|
||||||
|
* Anti flood.
|
||||||
|
* Imperfect detection of cheat programs.
|
||||||
|
|
||||||
|
Email to : drick@zippy.sonoma.edu
|
40
pts/Makefile
Normal file
40
pts/Makefile
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
# $NetBSD: Makefile,v 1.1.1.1 2003/04/13 08:25:30 jmmv Exp $
|
||||||
|
|
||||||
|
DISTNAME= pts-0.20a
|
||||||
|
CATEGORIES= games
|
||||||
|
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=pts/}
|
||||||
|
|
||||||
|
MAINTAINER= david@netbsd-fr.org
|
||||||
|
HOMEPAGE= http://pts.sourceforge.net
|
||||||
|
COMMENT= Perl TetriNET Server
|
||||||
|
|
||||||
|
DEPENDS+= p5-Config-IniFiles>=2.20:../../devel/p5-Config-IniFiles
|
||||||
|
|
||||||
|
NO_BUILD= YES
|
||||||
|
USE_BUILDLINK2= YES
|
||||||
|
REPLACE_PERL= ${WRKSRC}/pts.pl
|
||||||
|
|
||||||
|
DATADIR= ${PREFIX}/share/pts
|
||||||
|
|
||||||
|
do-install:
|
||||||
|
${INSTALL_DATA_DIR} ${DATADIR}
|
||||||
|
${INSTALL_DATA_DIR} ${DATADIR}/logs
|
||||||
|
${INSTALL_DATA_DIR} ${DATADIR}/dstats
|
||||||
|
${INSTALL_DATA_DIR} ${DATADIR}/locale
|
||||||
|
|
||||||
|
for config_files in pts.ban pts.ini pts.motd \
|
||||||
|
pts.news pts.secure; do \
|
||||||
|
${INSTALL_DATA} ${WRKSRC}/$$config_files \
|
||||||
|
${DATADIR}/$$config_files; \
|
||||||
|
done
|
||||||
|
|
||||||
|
for locales in en.msg ja.msg; do \
|
||||||
|
${INSTALL_DATA} ${WRKSRC}/locale/$$locales \
|
||||||
|
${DATADIR}/locale/$$locales; \
|
||||||
|
done
|
||||||
|
|
||||||
|
${INSTALL_SCRIPT} ${WRKSRC}/pts.pl ${PREFIX}/sbin/pts
|
||||||
|
${INSTALL_SCRIPT} ${FILESDIR}/pts ${PREFIX}/etc/rc.d/pts
|
||||||
|
|
||||||
|
.include "../../lang/perl5/buildlink2.mk"
|
||||||
|
.include "../../mk/bsd.pkg.mk"
|
15
pts/PLIST
Normal file
15
pts/PLIST
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
@comment $NetBSD: PLIST,v 1.1.1.1 2003/04/13 08:25:30 jmmv Exp $
|
||||||
|
sbin/pts
|
||||||
|
share/pts/locale/en.msg
|
||||||
|
share/pts/locale/ja.msg
|
||||||
|
share/pts/pts.ban
|
||||||
|
share/pts/pts.ini
|
||||||
|
share/pts/pts.motd
|
||||||
|
share/pts/pts.news
|
||||||
|
share/pts/pts.secure
|
||||||
|
@exec ${MKDIR} %D/share/pts/logs
|
||||||
|
@dirrm share/pts/logs
|
||||||
|
@dirrm share/pts/locale
|
||||||
|
@exec ${MKDIR} %D/share/pts/dstats
|
||||||
|
@dirrm share/pts/dstats
|
||||||
|
@dirrm share/pts
|
7
pts/distinfo
Normal file
7
pts/distinfo
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
$NetBSD: distinfo,v 1.1.1.1 2003/04/13 08:25:29 jmmv Exp $
|
||||||
|
|
||||||
|
SHA1 (pts-0.20a.tar.gz) = 93014af696a0be2c30bac8d3c1ea8f6edc2d5326
|
||||||
|
Size (pts-0.20a.tar.gz) = 104052 bytes
|
||||||
|
SHA1 (patch-aa) = 090fd176701146181bdf3c405f4a1cc01290dbdc
|
||||||
|
SHA1 (patch-ab) = 304652ebd87000694eaa7e7dbd71ad699fdc3768
|
||||||
|
SHA1 (patch-ac) = b561aeaa51821469b2b168a35129f467651d389b
|
16
pts/files/pts
Normal file
16
pts/files/pts
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# PROVIDE: pts
|
||||||
|
# REQUIRE: DAEMON LOGIN network
|
||||||
|
|
||||||
|
. /etc/rc.subr
|
||||||
|
|
||||||
|
name="pts"
|
||||||
|
rcvar=$name
|
||||||
|
procname="perl:"
|
||||||
|
command="/usr/pkg/sbin/${name}"
|
||||||
|
pidfile="/var/run/${name}.pid"
|
||||||
|
required_files="/usr/pkg/share/pts/pts.ini"
|
||||||
|
|
||||||
|
load_rc_config $name
|
||||||
|
run_rc_command "$1"
|
71
pts/patches/patch-aa
Normal file
71
pts/patches/patch-aa
Normal file
|
@ -0,0 +1,71 @@
|
||||||
|
$NetBSD: patch-aa,v 1.1.1.1 2003/04/13 08:25:30 jmmv Exp $
|
||||||
|
|
||||||
|
--- pts.pl.orig Sat Jun 15 01:27:49 2002
|
||||||
|
+++ pts.pl Sun Jan 26 13:39:03 2003
|
||||||
|
@@ -24,16 +24,16 @@
|
||||||
|
use strict;
|
||||||
|
|
||||||
|
# path
|
||||||
|
-use constant BANFILE => "./pts.ban"; # ban list file
|
||||||
|
-use constant BACKUPSUFFIX => ".old"; # winlist old data file suffix
|
||||||
|
-use constant CONFIGFILE => "./pts.ini"; # config file
|
||||||
|
-use constant DAILYFILE => "./dstats/%y%m.log"; # daily stats file (%y = year, %m = month, %d = month day)
|
||||||
|
-use constant LMSGFILE => "./pts.lmsg"; # left message file
|
||||||
|
-use constant LOGFILE => "./logs/%y%m.log"; # log file (%y = year, %m = month, %d = month day)
|
||||||
|
-use constant PIDFILE => "./pts.pid"; # pid file
|
||||||
|
-use constant PROFILEFILE => "./pts.profile"; # profile file
|
||||||
|
+use constant BANFILE => "/usr/pkg/share/pts/pts.ban"; # ban list file
|
||||||
|
+use constant BACKUPSUFFIX => "/usr/pkg/share/pts/winlist_old"; # winlist old data file suffix
|
||||||
|
+use constant CONFIGFILE => "/usr/pkg/share/pts/pts.ini"; # config file
|
||||||
|
+use constant DAILYFILE => "/usr/pkg/share/pts/dstats/%y%m.log"; # daily stats file (%y = year, %m = month, %d = month day)
|
||||||
|
+use constant LMSGFILE => "/usr/pkg/share/pts/pts.lmsg"; # left message file
|
||||||
|
+use constant LOGFILE => "/usr/pkg/share/pts/logs/%y%m.log"; # log file (%y = year, %m = month, %d = month day)
|
||||||
|
+use constant PIDFILE => "/var/run/pts.pid"; # pid file
|
||||||
|
+use constant PROFILEFILE => "/usr/pkg/share/pts/pts.profile"; # profile file
|
||||||
|
use constant RELAUNCH => "perl $PROGRAM_NAME"; # shell command to re-launch the server
|
||||||
|
-use constant SECUREFILE => "./pts.secure"; # secure (password) file
|
||||||
|
+use constant SECUREFILE => "/usr/pkg/share/pts/pts.secure"; # secure (password) file
|
||||||
|
|
||||||
|
# system
|
||||||
|
use constant DAEMON => 0; # run as daemon (fork() should be available)
|
||||||
|
@@ -5214,7 +5214,7 @@
|
||||||
|
$Misc{writable} = IO::Select->new();
|
||||||
|
@COLOR_CODES = ("\x04","\x06","\x0F","\x11","\x05","\x03","\x17","\x0E","\x0C","\x10","\x14","\x08","\x13","\x19","\x18","\x02","\x16","\x1F","\x0B","\x15");
|
||||||
|
@COLOR_NAMES = qw[black gray lgray dblue blue lblue dgreen lgreen teal rust red pink purple yellow white bold italic underline];
|
||||||
|
- $PROGRAM_NAME = 'Perl TetriNET Server v' . VERSION;
|
||||||
|
+ $PROGRAM_NAME = 'pts ' . VERSION;
|
||||||
|
ResetPTime();
|
||||||
|
|
||||||
|
WriteLog("Starting $PROGRAM_NAME...");
|
||||||
|
@@ -5270,7 +5270,7 @@
|
||||||
|
|
||||||
|
print "Completed!\n";
|
||||||
|
|
||||||
|
- if (DAEMON) {
|
||||||
|
+ if ($Config->val('Main', 'Background')) {
|
||||||
|
if ( my $result = Daemon() ) {
|
||||||
|
Report('error', undef, undef, "ERROR: Cannot be daemon: $result");
|
||||||
|
die "Cannot be daemon: $result\n";
|
||||||
|
@@ -5308,8 +5308,8 @@
|
||||||
|
# open(STDERR, "+>&STDIN");
|
||||||
|
open(STDERR, "+>&STDIN") if not DEBUG; # DEBUGGING
|
||||||
|
|
||||||
|
- open(STDOUT, ">> ./logs/debug.log") if DEBUG; # DEBUGGING
|
||||||
|
- open(STDERR, ">> ./logs/debug.log") if DEBUG; # DEBUGGING
|
||||||
|
+ open(STDOUT, ">> /usr/pkg/share/pts/logs/debug.log") if DEBUG; # DEBUGGING
|
||||||
|
+ open(STDERR, ">> /usr/pkg/share/pts/logs/debug.log") if DEBUG; # DEBUGGING
|
||||||
|
|
||||||
|
return undef;
|
||||||
|
}
|
||||||
|
@@ -5347,9 +5347,9 @@
|
||||||
|
'[Main] MessagePenalty' => 100,
|
||||||
|
'[Main] PenaltyPerSecond' => 50,
|
||||||
|
'[Locale] Default' => 'en',
|
||||||
|
- '[Locale] en' => './locale/en.msg',
|
||||||
|
+ '[Locale] en' => '/usr/pkg/share/pts/locale/en.msg',
|
||||||
|
# '[Locale] ja' => './locale/ja.msg',
|
||||||
|
- '[FilePath] motd' => './pts.motd',
|
||||||
|
+ '[FilePath] motd' => '/usr/pkg/share/pts/pts.motd',
|
||||||
|
# '[FilePath] news' => './pts.news',
|
||||||
|
'[Authority] User' => 0,
|
||||||
|
'[Authority] Moderator' => 1,
|
21
pts/patches/patch-ab
Normal file
21
pts/patches/patch-ab
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
$NetBSD: patch-ab,v 1.1.1.1 2003/04/13 08:25:30 jmmv Exp $
|
||||||
|
|
||||||
|
--- pts.ini.orig Sun Oct 20 22:40:56 2002
|
||||||
|
+++ pts.ini Sun Oct 20 22:42:21 2002
|
||||||
|
@@ -51,3 +51,3 @@
|
||||||
|
Default=en
|
||||||
|
-en=./locale/en.msg
|
||||||
|
+en=/usr/pkg/share/pts/locale/en.msg
|
||||||
|
# ja=./locale/ja.msg
|
||||||
|
@@ -55,4 +55,4 @@
|
||||||
|
[FilePath]
|
||||||
|
-motd=./pts.motd
|
||||||
|
-news=./pts.news
|
||||||
|
+motd=/usr/pkg/share/pts/pts.motd
|
||||||
|
+news=/usr/pkg/share/pts/pts.news
|
||||||
|
|
||||||
|
@@ -203,3 +203,3 @@
|
||||||
|
[Winlist0]
|
||||||
|
-File=./game.winlist
|
||||||
|
+File=/usr/pkg/share/pts/game.winlist
|
||||||
|
# PlayerOnly [0] - Points are added to players even if players teams up
|
8
pts/patches/patch-ac
Normal file
8
pts/patches/patch-ac
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
$NetBSD: patch-ac,v 1.1.1.1 2003/04/13 08:25:30 jmmv Exp $
|
||||||
|
|
||||||
|
--- pts.ini.orig Mon Oct 21 01:04:13 2002
|
||||||
|
+++ pts.ini Mon Oct 21 01:04:20 2002
|
||||||
|
@@ -9,2 +9,3 @@
|
||||||
|
UsersFromSameIP=0
|
||||||
|
+Background=1
|
||||||
|
|
Loading…
Reference in a new issue