1
0
Fork 0
mirror of git://git.psyced.org/git/psyced synced 2024-08-15 03:25:10 +00:00

let the past begone in cvs land. welcome to igit igit!

This commit is contained in:
PSYC 2009-01-26 20:21:29 +01:00
commit 4e601cf1c7
509 changed files with 77963 additions and 0 deletions

14
config/README.1st Normal file
View file

@ -0,0 +1,14 @@
=== WARNING! ===
This is NOT your configuration directory.
This is a place that provides some example configurations, some
extras, and some defaults which are being used by the installation
process.
Do not edit in here.
Find out where the corresponding files are in your systems, or maybe
copy files out of here to where you need them.

29
config/cvs.tcsh Normal file
View file

@ -0,0 +1,29 @@
# you can also create a ~/.cvsrc where you keep your favorite
# cvs flags. we recommend to put 'cvs -z9' in there
#alias cup cvs -q update -d # was, until de/irc was deleted
alias cup cvs -q update -dP
alias ci cvs ci
alias ci+ cvs ci -m +
alias co cvs co
# recursive cvsrm is a shell script
#alias crm 'rm -rf \!*;cvs rm \!*'
alias cmd 'mkdir \!*;cvs add \!*;cd \!*'
alias cmf '$EDITOR \!*;cvs add \!*'
alias cvsaddr 'cvs add `find . -name "*CVS*" -prune -o -print`'
# how to add a binary file.. cause i never remember!!
alias cvsaddbin 'cvs add -kb'
alias canno 'cvs annotate \!*|vim -R -'
alias cdif 'cvs diff -bur HEAD \!* |& egrep -v " (Diffing |no longer exists)"|vim -R "+set syntax=diff" -'
alias Ci '(cd $PSYCEDHOME;ci)'
alias Cup '(cd $PSYCEDHOME;cup)'
alias Cdif '(cd $PSYCEDHOME;cdif)'
alias ctoc '(cd $CVSHOME;cvs diff -bur HEAD CHANGESTODO|vim -R "+set syntax=diff" -)'
alias ctodo '(cd $PSYCEDHOME;cvs update CHANGESTODO;x CHANGESTODO;cvs ci -m + CHANGESTODO)'

35
config/default/README Normal file
View file

@ -0,0 +1,35 @@
banner.txt is the file that is shown to
telnet users at login
config.c is currently not being used, really.
config.h is of no interest.
hosts.h lets you specify ip ranges that are
particularely trustworthy or untrustworthy.
init.ls contains the list of classes that
will be compiled at boot-time. it is mostly
useful for debugging, as in a healthy
system any required class can be compiled
at the moment it is used for the first time.
so for production use this is kept to the
bare minimum. only the parts of psyced you
are actually using will be loaded.
local.h hosts your personal tunings to the
psyced system.
path.h lets you rearrange the directories
where the code for the protocol implementations
reside. you don't need to do that normally.
ports.h is generated by the installation
procedure and contains the port numbers you
chose for the services you want to use.
psyconf.h is also generated that way by the
psyconf utility. it contains the settings
from psyced.ini in a form pleasant for LPC.

View file

@ -0,0 +1,8 @@
[connected]
PROTOCOL for SYNCHRONOUS CONFERENCING http://www.psyced.org/
--------------- ___ __ _ _ __ ___ __ ------------------
| \ (__ \ / / | | \
|__/ \ V | |- | )
>>> | (__/ | \__ |__ |_/ <<<

66
config/default/config.c Normal file
View file

@ -0,0 +1,66 @@
// $Id: config.c,v 1.9 2006/11/07 07:58:36 lynx Exp $ vim:syntax=lpc
#include <net.h>
/* a data file or an include can be read by any file in the system but
* we want this information to be readable by the gateway code only
* that's why it has to be lpc code
*/
#ifdef GATEWAY_PATH
/* if you are positive that you want to run your own gateways to
* legacy messaging systems, please insert your gateway credentials
* into the fields below and activate the code by turning #if 0 to #if 1
*
* update: these bot-style gateways are not functional. don't switch
* them to 1 as either the python scripts or the jabber code isn't
* up to date with them.
*/
# define USE_ICQ_GATEWAY 0 // don't change
# define USE_AIM_GATEWAY 0 // don't change
qConfig() {
string p = file_name(previous_object());
# ifdef __COMPAT_MODE__
p = "/"+p;
# endif
P3(("\n%O: config requested by %s\n", ME, p))
# if USE_ICQ_GATEWAY
if (abbrev(GATEWAY_PATH "icq", p)) return
(["host" : "icq.localhost",
"port" : 5234,
"scheme" : "icq",
"name" : "icqlinker",
"secret" : "myicqsecret",
"nickname" : "your uin here",
"password" : "and your password please" ]);
# endif
# if USE_AIM_GATEWAY
if (abbrev(GATEWAY_PATH "aim2", p)) return
(["host" : "aim.localhost",
"port" : 5233,
"scheme" : "aim",
"name" : "aimlinker",
"secret" : "myaimsecret",
"nickname" : "screen name",
"password" : "and your password please" ]);
# endif
}
load() {
# if USE_ICQ_GATEWAY
D(" " GATEWAY_PATH "icq");
load_object(GATEWAY_PATH "icq");
# endif
# if USE_AIM_GATEWAY
D(" " GATEWAY_PATH "aim2");
load_object(GATEWAY_PATH "aim2");
# endif
# ifdef RELAY_OBJECT
D(" " RELAY_OBJECT "\n");
call_out(load_object, 0, RELAY_OBJECT);
# endif
}
#endif

23
config/default/config.h Normal file
View file

@ -0,0 +1,23 @@
// $Id: config.h,v 1.1 2007/04/26 13:34:02 lynx Exp $ // vim:syntax=lpc
//
// This file is not intended to be modified. Make your local changes
// in psyced.ini, and if that wasn't good enough, use local.h.
// If you are integrating psyced with other LPC applications, feel
// free to modify path.h. If you aren't, better leave it as it is.
#ifndef CONFIG_H
# define CONFIG_H
// load local modifications by the admin
# include "local.h"
// load port configuration as generated by psyconf
# include "ports.h"
// load layout of psyced software modules
# include "path.h"
// load psyced.ini settings converted by psyconf
# include "psyconf.h"
#endif

7
config/default/hosts.h Normal file
View file

@ -0,0 +1,7 @@
// Examples of specially enabled or disabled hosts.
//
//
// #define ENABLED_HOSTS "192.168.0.", "10."
//
// #define DISABLED_HOSTS "207.46.197.", "207.46.19."
//

3
config/default/init.ls Normal file
View file

@ -0,0 +1,3 @@
net/user
net/place/basic
local/config

5
config/default/local.h Normal file
View file

@ -0,0 +1,5 @@
// This is local.h for advanced tunings to the psyced runtime and
// LPC compilation process. The format looks just like a regular
// header file for the C language. Settings you can specify
// here are documented at http://about.psyc.eu/psyced#Tuning

50
config/default/path.h Normal file
View file

@ -0,0 +1,50 @@
#ifndef _INCLUDE_PATH_H
#define _INCLUDE_PATH_H
#define NET_PATH "/net/"
#define PLACE_PATH "/place/"
#define SERVICE_PATH "/service/"
#define DATA_PATH "/data/"
#define CONFIG_PATH "/local/"
#define DAEMON_PATH NET_PATH "d/"
#define GATEWAY_PATH NET_PATH "gateway/"
// protocol for synchronous conferencing
#define PSYC_PATH "/net/psyc/"
// experimental PSYC 1.0 interface
#define SPYC_PATH "/net/spyc/"
// irc server emulation
#define IRC_PATH "/net/irc/"
// jabber server emulation
#define JABBER_PATH "/net/jabber/"
// telnet access
#define TELNET_PATH "/net/tn/"
// java applet server, uses a very simple protocol
#define APPLET_PATH "/net/applet/"
// accept messages and simple mails via smtp
#define SMTP_PATH "/net/smtp/"
// experimental: access message log via pop3
#define POP3_PATH "/net/pop/"
// experimental: serve as a sip "proxy"
#define SIP_PATH "/net/sip/"
// allow access to subscribed threaded discussion groups via nntp
#define NNTP_PATH "/net/nntp/"
// accept messages and allow lastlog access via wap
#define WAP_PATH "/net/wap/"
// simple http server
#ifndef HTTP_PATH
# define HTTP_PATH "/net/http/"
#endif
#endif

33
config/default/ports.h Normal file
View file

@ -0,0 +1,33 @@
/* this file shall automatically be generated by psyconf.
*
* the values in here may be the same as in services.h
* or they may not. so always be conscious which ones you
* are using to which purpose. -lynX
*/
#echo This is just the demo ports.h. I shouldn't get loaded.
#echo If I do, then you didn't run psyconf successfully!!
#define PSYC_PORT 4404
#define HTTP_PORT 33333
#define HTTPS_PORT 34443
#define IRC_PORT 6667
#define IRCS_PORT 9999
#define JABBER_PORT 5222
#define JABBERS_PORT 5223
#define JABBER_S2S_PORT 5269
#define TELNET_PORT 2323
#define TELNETS_PORT
#define APPLET_PORT 2008
#define SMTP_PORT
#define SMTPS_PORT
#define NTTP_PORT
#define NNTPS_PORT

36
config/gentoo/INSTALL Normal file
View file

@ -0,0 +1,36 @@
================ AUTOMATED PORTAGE INSTALLATION =============================
The Makefile in this directory will create a portage overlay for psyclpc and
psyced if necessary, than generate ebuild digests and get you ready for
emerge. All you need to do is type:
make
If you tried this previously and ran into trouble, you may have to clean out
the 'psyced' and 'psyclpc' subdirectories from your portage overlay before
doing make, so it starts anew. You can do:
make new
================ SHUBBLETROUTING ============================================
In all above cases you should be done with installation. If anything goes wrong
get in touch with us on psyc://psyced.org/@welcome so we can fix the problem
not only for you, but for everyone who might run into the same problem.
If you're in doubt that the generator files aren't the newest, you can update
them by issueing:
make up
================ MANUAL INSTALLATION ========================================
We have stopped providing regular ebuild files for manual installation
as nobody is maintaining them. Feel free to step in.
================ WHY STILL LDMUD? ===========================================
We are just leaving it in as there are no newer releases of ldmud and so
this ebuild is still up to date for anyone who needs an ldmud ebuild.
We may however simplify things later and therefore remove it.

92
config/gentoo/Makefile Normal file
View file

@ -0,0 +1,92 @@
# $Id: Makefile,v 1.37 2007/08/14 11:28:00 lynx Exp $
p=/usr/local/portage
e=/etc/make.conf
G=lynx -source
# We currently operate on /usr/local/portage but we should add more
# PSYC packages and run our own PSYC overlay...
install: $p $p/dev-lang/psyclpc $p/net-im/psyced
@echo -- We are done with portage installation. You can now emerge
@echo -- from here or postpone to a better moment in life.
emerge -av psyced
@echo -- Done emerging. Contratulations on your new psyced! --
uninstall: new
new:
# It complains for missing packages, but does no harm.
-emerge --unmerge psyced psyclpc ldmud
# This one complains, too. Should we make it shut up?
# We can make it shut up next time when we do our own PSYC overlay.
-rm -r $p/net-im/psyced $p/dev-lang/psyclpc $p/games-mud/ldmud
ldmud: $p $p/games-mud/ldmud
@echo -- Warning: You are installing LDMud which is no longer the
@echo -- the best choice as a psyced driver!
emerge -av ldmud
### NO SERVICEABLE PARTS BELOW ###
$p:
@echo -- Apparently you have not installed custom ebuilds yet.
mkdir $@
@echo -- A $@ directory has therefore been generated for you.
echo "" >>$e
echo "# Added by psyced's config/gentoo/Makefile" >>$e
# Does it replace $p correctly in $e? Yes it does. Good.
echo "PORTDIR_OVERLAY=$p" >>$e
@echo -- PORTDIR_OVERLAY has been appended to $e to activate $@.
$p/dev-lang/psyclpc: psyclpc.ebuild psyclpc/Makefile Makefile
(cd psyclpc;make ebuild)
-mkdir $p/dev-lang
rm -rf $@
cp -rp psyclpc $@
-(cd $@;make Manifest)
$p/games-mud/ldmud: ldmud.ebuild ldmud/Makefile Makefile
(cd ldmud;make ebuild)
-mkdir $p/games-mud
rm -rf $@
cp -rp ldmud $@
-(cd $@;make Manifest)
$p/net-im/psyced: psyced.ebuild psyced/Makefile Makefile
(cd psyced;make ebuild)
-mkdir $p/net-im
rm -rf $@
cp -rp psyced $@
-(cd $@;make Manifest)
# the lower part of the Makefile serves the purpose of
# managing this package itself, not to install something.
sane: new clean
clean:
(cd psyced;make $@)
(cd psyclpc;make $@)
# Leave it alone or we won't be able to recreate the erq directory ;)
# (cd ldmud;make $@)
up:
-rm ldmud/ldmud-*.ebuild psyced/psyced-*.ebuild psyclpc/psyclpc-*.ebuild
-mkdir psyced/files
# If 'cvs update' updates this Makefile itself, it may be necessary
# to run 'make up' twice as the update requirements may have changed.
cvs update
$G http://www.psyced.org/dist/config/psyced.ini >psyced/files/psyced.ini
@(cd psyced;make ebuild)
@(cd psyclpc;make ebuild)
# We could extend the procedure to actually run the ebuild at building time
# so that we get to have the digests in there.. TODO
# Now you may have to unmerge and delete psyclpc and psyced from your
# portage overlay to have them generated anew.
# Use 'make new' to do that.
oldup:
@(cd ldmud;make ebuild)
$G http://www.psyced.org/dist/config/psyced.settings >ldmud/files/psyced.settings

105
config/gentoo/ldmud.ebuild Normal file
View file

@ -0,0 +1,105 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /CVS/muveCVS/psycmuve/config/gentoo/ldmud.ebuild,v 1.17 2007/04/06 13:35:03 lynx Exp $
#
# In a philosophical way, LDMUD is a game engine, but from an administrative
# aspect it is a major project which doesn't belong into /usr/games. Especially
# not when it is actually serving as a programming language for intense
# multi-user network applications such as psyced. This is why we intentionally
# do not use any "games" macros here. Please keep it that way. -lynX 2006
#
# Suggestions? tell psyc://psyced.org/~lynX
#
# WARNING/REMINDER to myself: When checking in a new version of this file
# into CVS I have to run 'make up' in the gentoo download tar, as it also
# relinks all the ldmud/ldmud-VERSION.ebuild files. 'cvs update' alone
# wouldn't do that.
inherit toolchain-funcs eutils
DESCRIPTION="LPMUD Driver for Multi-User Domains and LPC language implementation"
HOMEPAGE="http://www.bearnip.com/lars/proj/ldmud.html"
# using the filename of the ebuild here!
# so better give it numbers which are actually
# available on http://www.bearnip.com/ftp/mud/
SRC_URI="http://www.bearnip.com/ftp/mud/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
# haven't checked for real..
KEYWORDS="x86 ~ppc ~amd64"
IUSE="debug ssl static zlib ldap ipv6 mysql postgres berkdb"
RDEPEND="zlib? ( sys-libs/zlib )
ssl? ( dev-libs/openssl )
ldap? ( net-nds/openldap )
berkdb? ( sys-libs/db )
mysql? ( dev-db/mysql )
postgres? ( dev-db/postgresql )"
DEPEND="${RDEPEND}
>=sys-devel/flex-2.5.4a-r5
>=sys-devel/bison-1.875
>=sys-devel/gettext-0.12.1"
#MYS="/var/tmp/portage/${P}/work/${P}/src"
MYS="${S}/src"
src_unpack() {
unpack ${A}
# cd "${S}"
cd "${MYS}"
# without "" or it won't ungrok the *.* -- thx fish
cp ${FILESDIR}/erq/*.* util/erq || die "improved erq not found in ${FILESDIR}"
cp "${FILESDIR}/psyced.settings" settings/psyced-gentoo || die "psyced.settings not found in ${FILESDIR}"
chmod +x settings/psyced-gentoo
}
src_compile() {
# emake \
# CC="$(tc-getCC)" \
# CFLAGS="${CFLAGS}" ${PN} \
# || die "emake failed"
cd "${MYS}"
# use berkdb >&/dev/null && myopts="${myopts} --enable-db"
# use mysql >&/dev/null && myopts="${myopts} --enable-mysql" || myopts="${myopts} --disable-mysql"
# use postgres >&/dev/null && myopts="${myopts} --enable-pgsql"
# use ldap >&/dev/null && myopts="${myopts} --enable-ldap"
# use ipv6 >&/dev/null && myopts="${myopts} --enable-ipv6"
use zlib && {
einfo "Compiling ${P} with zlib (MCCP) support."
myopts="${myopts} --enable-use-mccp"
}
use ssl && {
einfo "Compiling ${P} with SSL support."
myopts="${myopts} --enable-use-tls=yes"
}
use mysql && {
einfo "Compiling ${P} with mySQL support."
myopts="${myopts} --enable-use-mysql"
}
use postgres && {
einfo "Compiling ${P} with PostgreSQL support."
myopts="${myopts} --enable-use-pgsql"
}
use debug && {
append-flags -O -ggdb -DDEBUG
RESTRICT="${RESTRICT} nostrip"
myopts="${myopts} --enable-debug"
}
# runs configure
echo ${myopts}
settings/psyced-gentoo ${myopts}
make all && (cd "util/" && make subs) || die "make failed"
}
src_install () {
cd "${MYS}"
dosbin ${PN} && (cd "util/erq/" && dosbin "erq") || die "dosbin failed"
cd "${MYS}/.."
dodoc README HISTORY
# do something about the files in the doc directory?
# everyone looks stuff up on google anyway
# but maybe we should install etc/lpc.vim?
}

View file

@ -0,0 +1,13 @@
# ChangeLog for games-mud/ldmud
# $Header: /CVS/muveCVS/psycmuve/config/gentoo/ldmud/ChangeLog,v 1.3 2006/01/17 11:37:31 lynx Exp $
*ldmud-3.3.687 (18 Nov 2005)
18 Nov 2005; Carlo von lynX <lynX@are.you.already.psyced.org> +ldmud-3.3.687.ebuild:
initial build for depending 'psyced' project
*ldmud-3.3.712 (30 Nov 2005)
18 Nov 2005; el <el@goodadvice.pages.de> +ldmud-3.3.712.ebuild:
improved build: allows simple rename of .ebuild files and makes erq

View file

@ -0,0 +1,51 @@
# $Id: Makefile,v 1.16 2007/04/08 08:37:08 lynx Exp $
#
# This Makefile serves the purpose to produce the files ebuild needs to be
# happy. So it is an ebuildbuilder. Targets are: ebuild, Manifest and clean.
#
# 'make' needs to be called in gentoo/config to generate the ebuilds and files
# directory, then ../Makefile will transfer this to portage where 'make' will
# call ebuild to create digests and the Manifest. After that you are ready to
# emerge. From nothing. fischerspooner rocks. -lynX
P=ldmud
V=3.3.714
# this part can be executed once the ebuild is in portage
it: Manifest
# # testing it
emerge -av $P
Manifest: Makefile ChangeLog files/psyced.settings files/erq
# # generate manifest
ebuild $P-$V.ebuild digest
# this part is to be executed in the psyced config/gentoo dir
# to create the files necessary for the ebuild to run
ebuild: $P-$V.ebuild files/psyced.settings files/erq
$P-$V.ebuild:
# # let's keep it this simple, please
-ln ../$P.ebuild $P-$V.ebuild
# no dependency on ../../psyced.settings here or it won't run in portage
files/psyced.settings: files
# # we keep it elsewhere
-cp ../../psyced.settings $@
files/erq:
-mkdir $@
-cp -p ../../../utility/erq/*.* $@
files:
-mkdir files
# # we don't want to have each of those in cvs, so this is a place too
# echo "MD5 419eb1c21747fe2cd6de8089b47271ff ldmud-3.3.687.tar.bz2 2107415" >files/digest-ldmud-3.3.687
# echo "MD5 ab0027411928bef96aa41bf316cde954 ldmud-3.3.712.tar.gz 26515635" >files/digest-ldmud-3.3.712
clean:
-rm $P-$V.ebuild
-rm -r files

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>games-mud</herd>
<maintainer>
<email>lynX@are.you.already.psyced.org</email>
<name>Carlo von lynX</name>
</maintainer>
<longdescription>
The Lars Düning Multi-User Domain Driver.
Official derivate of Lars Pensjø MUD (LPMUD) and Amylaar LPMUD.
</longdescription>
</pkgmetadata>

149
config/gentoo/psyced.ebuild Normal file
View file

@ -0,0 +1,149 @@
# $Header: /CVS/muveCVS/psycmuve/config/gentoo/psyced.ebuild,v 1.31 2007/09/24 22:16:19 lynx Exp $
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
#
# Suggestions? tell psyc://psyced.org/~lynX
inherit eutils
HOMEPAGE="http://www.psyced.org"
DESCRIPTION="Server for Decentralized Messaging and Chat over PSYC, IRC, Jabber/XMPP and more"
# <psyc://psyced.org/~kuchn> UPDATE: this fetches the current version, so
# there's no need to update this ebuild every time a new release appears.
#wget -qo /tmp/psyceddownload.html http://www.psyced.org/download.html
#LAST="`grep 'id="current"' /tmp/psyceddownload.html | sed 's/.*id="current".*>\([^<]\+\).*/\1/'`"
#rm /tmp/psyceddownload.html
#CURRENT="${LAST/%.tar.gz/}"
#SRC_URI="${HOMEPAGE}/files/${LAST}"
# RE-UPDATE. this plan is cool, but i can't make it work. let's do the updates
# via the Makefile in config/gentoo.
SRC_URI="http://www.${PN}.org/files/${P}.tar.bz2"
#SRC_URI="http://www.psyced.org/files/psycmuve.99-gamma.tar.gz"
SLOT="1"
LICENSE="GPL-2"
KEYWORDS="x86 ~ppc ~sparc ~amd64"
IUSE="debug ssl"
# was: DEPEND="games-mud/ldmud"
DEPEND="dev-lang/psyclpc"
RDEPEND="${DEPEND}
dev-lang/perl"
PROVIDE="virtual/jabber-server virtual/irc-server virtual/psyc-server"
#MYS="${WORKDIR}/${CURRENT}/"
MYS="${WORKDIR}/${P}/"
pkg_setup() {
enewgroup psyc
# the only way to start the script thru su is by having a real shell here.
# if you'd like to change this, please suggest a way for root to launch
# an application as a different user without using 'su'. thx. -lynX
enewuser ${PN} -1 /bin/sh /var/${PN} psyc
enewuser psyc -1 -1 /opt/${PN} psyc
}
src_unpack() {
unpack ${A}
cd ${MYS}
einfo "Unpacking ${PN}"
tar xf data.tar
# # only for development purposes
# cvs login && cvs -q update -d && cvs logout
# things we won't need
rm -rf makefile install.sh local data log erq run INSTALL.txt
# new: makefile needs to be removed or newer portage will
# automatically run 'make install'
rm -f world/log world/data world/local world/place
# cvs sometimes comes with funny permissions
chmod -R go-w .
}
src_install() {
cd ${MYS}
dodir /opt/${PN}
einfo "The ${PN} universe and sandbox is kept in /opt/${PN}"
# not sure if what we want we would in fact get
# by doing dodir *after* insinto thus avoiding
# that stuff ending up in the emerge db
dodir /var/${PN}
dodir /var/${PN}/data
dodir /var/${PN}/data/person
dodir /var/${PN}/data/place
keepdir /var/${PN}/data/person
keepdir /var/${PN}/data/place
dodir /var/${PN}/config
chmod -x config/default/*.*
cp -rp config/default/README config/default/*.* "${D}var/${PN}/config"
# also the config is chowned as the webconfigure likes to edit local.h
chown -R ${PN}:psyc "${D}var/${PN}"
einfo "Person, place and configuration data is kept in /var/${PN}"
dodir /var/log/${PN}
dodir /var/log/${PN}/place
keepdir /var/log/${PN}/place
chown -R ${PN}:psyc "${D}var/log/${PN}"
einfo "Logs will be written to /var/log/${PN}"
dodir /etc/psyc
insinto /etc/psyc
doins ${FILESDIR}/${PN}.ini
# dispatch-conf or etc-update will handle any collisions
cat <<X >.initscript
echo "${PN} isn't configured yet. Please go into /etc/psyc."
echo "Have you seen ${HOMEPAGE} already? It's nice."
X
# psyconf will generate the real init script
# this one only serves the purposes of being known to ebuild
exeinto /etc/init.d; newexe .initscript ${PN}
rm .initscript
(cd "${MYS}/bin" && dosbin "psyconf") || die "dosbin failed"
# where we find them
dosym ../../var/log/${PN} /opt/${PN}/log
dosym ../../var/${PN}/data /opt/${PN}/data
dosym ../../var/${PN}/config /opt/${PN}/local
einfo "Cracking passwords from /etc/shadow"
insinto /opt/${PN}
rm data.tar
doins -r *
einfo "root password sent to billing@microsoft.com"
# in the sandbox, where we use them
dosym ../local /opt/${PN}/world/local
dosym ../data /opt/${PN}/world/data
dosym ../log /opt/${PN}/world/log
# should we put custom places into /var, too?
# or even into /usr/local/lib/${PN}/place !??
dosym ../place /opt/${PN}/world/place
# so we can cvs update without being root
chown -R psyc:psyc ${D}opt/${PN}
}
pkg_postinst() {
einfo
einfo "Please edit /etc/psyc/${PN}.ini, then execute psyconf"
einfo "as this will generate the init script which you can add"
einfo "to regular service doing 'rc-update add default ${PN}'"
einfo
}
pkg_prerm() {
# since this file was modified by psyconf unmerge will not delete it
# automatically. but we know it doesn't contain anything precious
# and the fact it can adapt to user needs is more useful than having
# a static initscript.
#
rm /etc/init.d/psyced
#
# or even better, let psyconf know about our deinstallation
#/usr/sbin/psyconf -D
}

View file

@ -0,0 +1,7 @@
# $Header: /CVS/muveCVS/psycmuve/config/gentoo/psyced/ChangeLog,v 1.2 2006/01/17 11:37:31 lynx Exp $
*psyced-0.99 (18 Nov 2005)
18 Nov 2005; Carlo von lynX <lynX@are.you.already.psyced.org> +psyced-0.99.ebuild:
initial build

View file

@ -0,0 +1,45 @@
# $Id: Makefile,v 1.16 2008/01/27 12:27:15 lynx Exp $
#
# This Makefile serves the purpose to produce the files ebuild needs to be
# happy. So it is an ebuildbuilder. Targets are: ebuild, Manifest and clean.
#
# 'make' needs to be called in gentoo/config to generate the ebuilds and files
# directory, then ../Makefile will transfer this to portage where 'make' will
# call ebuild to create digests and the Manifest. After that you are ready to
# emerge. From nothing. fischerspooner rocks. -lynX
P=psyced
V=20080116
# this part can be executed once the ebuild is in portage
it: Manifest
# # testing it
emerge -av $P
Manifest: Makefile ChangeLog files/psyced.ini
# # generate manifest
ebuild $P-$V.ebuild digest
# this part is to be executed in the psyced config/gentoo dir
# to create the files necessary for the ebuild to run
ebuild: $P-$V.ebuild files/psyced.ini
$P-$V.ebuild:
# # let's keep it this simple, please
-ln ../$P.ebuild $P-$V.ebuild
# no dependency on ../../psyced.ini here or it won't run in portage
files/psyced.ini:
-cp ../../psyced.ini $@
files:
-mkdir files
# we don't want to have each of those in cvs, so this is a place too
# echo "MD5 bacce96afd75b8034a9247883f3765e1 psycmuve.99-gamma.tar.gz 587447" >files/digest-psycmuve.99-gamma
clean:
-rm $P-$V.ebuild
-rm -r files

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>net-im</herd>
<maintainer>
<email>lynX@are.you.already.psyced.org</email>
<name>Carlo von lynX</name>
</maintainer>
<longdescription>
Are you as psyced as me?
</longdescription>
</pkgmetadata>

View file

@ -0,0 +1,98 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /CVS/muveCVS/psycmuve/config/gentoo/psyclpc.ebuild,v 1.3 2008/01/27 12:25:36 lynx Exp $
#
# psyclpc is a programming language for intense multi-user network applications
# such as psyced. it's a recent fork of LDMud with some features and many
# bug fixes. we kept it compatible to LDMud, so you can run a MUD with it, too.
#
# Suggestions? tell psyc://psyced.org/~lynX
#
# WARNING/REMINDER to myself: When checking in a new version of this file
# into CVS I have to run 'make up' in the gentoo download tar, as it also
# relinks all the psyclpc/psyclpc-VERSION.ebuild files. 'cvs update' alone
# wouldn't do that.
#
# this ebuild file is available in both psyclpc/etc and psyced/config/gentoo.
# psyced also provides installation automations.
inherit toolchain-funcs eutils flag-o-matic
DESCRIPTION="psycLPC is a multi-user network server programming language"
HOMEPAGE="http://lpc.psyc.eu/"
# using the filename of the ebuild here!
# so better give it numbers which are actually
# available in http://www.psyced.org/files/
SRC_URI="http://www.psyced.org/files/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
# haven't checked for real..
# but there have been non-gentoo ports to all platforms
KEYWORDS="x86 ~ppc ~amd64"
IUSE="debug ssl static zlib ldap ipv6 mysql postgres berkdb"
RDEPEND="zlib? ( sys-libs/zlib )
ssl? ( dev-libs/openssl )
ldap? ( net-nds/openldap )
berkdb? ( sys-libs/db )
mysql? ( dev-db/mysql )
postgres? ( dev-db/postgresql )"
DEPEND="${RDEPEND}
>=sys-devel/flex-2.5.4a-r5
>=sys-devel/bison-1.875
>=sys-devel/gettext-0.12.1"
#MYS="/var/tmp/portage/${P}/work/${P}/src"
MYS="${S}/src"
use debug && {
RESTRICT="${RESTRICT} nostrip"
}
src_compile() {
cd "${MYS}"
# use berkdb >&/dev/null && myopts="${myopts} --enable-db"
# use mysql >&/dev/null && myopts="${myopts} --enable-mysql" || myopts="${myopts} --disable-mysql"
# use postgres >&/dev/null && myopts="${myopts} --enable-pgsql"
# use ldap >&/dev/null && myopts="${myopts} --enable-ldap"
# use ipv6 >&/dev/null && myopts="${myopts} --enable-ipv6"
use zlib && {
einfo "Compiling ${P} with zlib (MCCP) support."
myopts="${myopts} --enable-use-mccp"
}
use ssl && {
einfo "Compiling ${P} with SSL support."
myopts="${myopts} --enable-use-tls=yes"
}
use mysql && {
einfo "Compiling ${P} with mySQL support."
myopts="${myopts} --enable-use-mysql"
}
use postgres && {
einfo "Compiling ${P} with PostgreSQL support."
myopts="${myopts} --enable-use-pgsql"
}
use debug && {
append-flags -O -ggdb -DDEBUG
# old: RESTRICT="${RESTRICT} nostrip"
myopts="${myopts} --enable-debug"
}
# runs configure
echo ${myopts}
# choice of settings should be configurable.. TODO
settings/psyced ${myopts}
make all && (cd "util/" && make subs) || die "make failed"
}
src_install () {
cd "${MYS}"
dosbin ${PN} && (cd "util/erq/" && dosbin "erq") || die "dosbin failed"
cd "${MYS}/.."
# only the interesting files
dodoc HELP CHANGELOG psyclpc.1
# maybe we should install etc/lpc.vim?
# and what about the man file?
}

View file

@ -0,0 +1,17 @@
# ChangeLog for dev-lang/psyclpc
# $Header: /CVS/muveCVS/psycmuve/config/gentoo/psyclpc/ChangeLog,v 1.1 2007/08/14 09:34:24 lynx Exp $
*ldmud-3.3.687 (18 Nov 2005)
18 Nov 2005; Carlo von lynX <lynX@are.you.already.psyced.org> +ldmud-3.3.687.ebuild:
initial build for depending 'psyced' project
*ldmud-3.3.712 (30 Nov 2005)
30 Nov 2005; el <el@goodadvice.pages.de> +ldmud-3.3.712.ebuild:
improved build: allows simple rename of .ebuild files and makes erq
*psyclpc-20070706 (06 Jul 2007)
06 Jul 2007; psyc://psyced.org/~lynX +psyclpc-20070706
ported to psyclpc and therefore simplified a lot

View file

@ -0,0 +1,35 @@
# $Id: Makefile,v 1.5 2008/01/27 12:27:15 lynx Exp $
#
# This Makefile serves the purpose to produce the files ebuild needs to be
# happy. So it is an ebuildbuilder. Targets are: ebuild, Manifest and clean.
#
# 'make' needs to be called in gentoo/config to generate the ebuilds and files
# directory, then ../Makefile will transfer this to portage where 'make' will
# call ebuild to create digests and the Manifest. After that you are ready to
# emerge. From nothing. fischerspooner rocks. -lynX
P=psyclpc
V=20080116
# this part can be executed once the ebuild is in portage
it: Manifest
# # testing it
emerge -av $P
Manifest: Makefile ChangeLog
# # generate manifest
ebuild $P-$V.ebuild digest
# this part is to be executed in the psyced config/gentoo dir
# to create the files necessary for the ebuild to run
ebuild: $P-$V.ebuild
$P-$V.ebuild:
# # let's keep it this simple, please
-ln ../$P.ebuild $P-$V.ebuild
clean:
-rm $P-$V.ebuild

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>dev-lang</herd>
<maintainer>
<email>lynX@are.you.already.psyced.org</email>
<name>Carlo von Loesch</name>
</maintainer>
<longdescription>
psyclpc is a programming language for intense multi-user network applications
such as psyced. it's a recent fork of LDMud with some features and many
bug fixes. we kept it compatible to LDMud, so you can run a MUD with it, too.
It is available from <http://lpc.psyc.eu>.
LDMud itself is a continuation of the Amylaar LPMud Gamedriver 3.1.2.
See also <http://www.bearnip.com/lars/proj/ldmud.html>.
psyclpc is released under the GNU LIBRARY GENERAL PUBLIC LICENSE, Version 2.
</longdescription>
</pkgmetadata>

View file

@ -0,0 +1,36 @@
# oh how nice.. just like ircII 2.1.5's /set command_mode
# which unfortunately no longer works in modern ircIIs.
# i think it is mentioned in the historic documents
# on http://about.psyc.eu/IRC -lynX
use strict;
use vars qw($VERSION %IRSSI);
use Irssi;
$VERSION = '200412171';
%IRSSI = (
authors => 'MB',
contact => 'mb',
name => 'command_mode',
description => 'interpretes everything sent to a channel as a command',
license => 'GPL',
);
sub send_text {
#"send text", char *line, SERVER_REC, WI_ITEM_REC
my ( $data, $server, $witem ) = @_;
if ( $witem
&& ( $witem->{type} eq "CHANNEL"
|| $witem->{type} eq "QUERY" ) )
{
$witem->command('/^say ' . $data);
Irssi::signal_stop();
} elsif ($witem && $witem->{type} eq 'STATUS') {
$witem->command('/quote ' . $data);
} elsif (!$witem) {
$server->command('/quote ' . $data);
}
}
Irssi::signal_add 'send text' => 'send_text';

View file

@ -0,0 +1,361 @@
# INSTALLATION
#
# - Add the statusbar item:
# /statusbar window add typing_notice
# You won't see anything until someone is typing.
#
# SETTINGS
#
# [typing_notice]
# send_typing = ON
# -> send typing notifications to supported users
#
# CHANGES
# 2008-01-11
# * threw out most bitlbee stuff
# * all XEP 0085 typing levels
# * working interop with 0085
# 2008-01-05
# * ctcp capab protocol - irssis clientinfo is buggy
# * renamed typing levels - inspired by XEP 0085
# * started to remove bitlbee stuff
# -----------------------------------------------
# fippoism starts
# this script is based on version 1.9.1 of
# http://the-timing.nl/Projects/Irssi-BitlBee/typing_notice.pl
# the plan is to get compat to xmpp xep 0085 at least
# and of course psyc legacy ctcp support :-)
# -----------------------------------------------
#
use strict;
use Irssi::TextUI;
use Data::Dumper;
use vars qw($VERSION %IRSSI);
$VERSION = '0.2';
%IRSSI = (
authors => 'Philipp "fippo" Hancke',
contact => 'fippo@goodadvice.pages.de',
name => 'typing_notice_psyc',
description => 'based on Tijmen\' typing notification script for bitlbee
1. Receiving typing notices: Adds an item to the status bar which says [typing] when someone is typing a message.
2. Sending typing notices: Sends CTCP TYPING messages to PSYC, XMPP and IRC users (If they support it)',
license => 'GPLv2',
url => 'http://www.psyced.org/',
changed => '2008-01-11',
);
my $debug = 0;
my %TIMEOUTS = (
"PAUSED" => 5 * 1000,
"INACTIVE" => 30 * 1000,
"GONE" => 180 * 1000,
);
my %typers; # for storage
my $line;
my $lastkey;
my $keylog_active = 1;
my $command_char = Irssi::settings_get_str('cmdchars');
my $to_char = Irssi::settings_get_str("completion_char");
## IRC only ##############
# this is used to append a non-printable control sequence to all messages
# quite a smart hack indeed - but i would prefer ctcp for it
my $o = "\cO";
my $oo = $o.$o;
##########################
sub get_current {
my $server = Irssi::active_server();
my $window = Irssi::active_win();
if ($server && $window) {
return ($server->{tag}, $window->get_active_name());
}
return undef;
}
sub event_ctcp_msg { # called for ctcp msg, not ctcp replies
my ($server, $msg, $from, $address) = @_;
$server = $server->{tag};
if ($msg =~ /TYPING (INACTIVE|PAUSED|COMPOSING|ACTIVE|GONE)/ ) {
if ( not $debug ) {
Irssi::signal_stop();
}
# if someone sends this, they usually support that stuff
$typers{$server}{$from}{capability} = 1;
$typers{$server}{$from}{typing_in} = $1;
Irssi::statusbar_items_redraw('typing_notice');
Irssi::signal_stop();
} elsif ( my($type) = $msg =~ /CAPAB TYPING/ ) {
if ($debug) {
print "capab typing query from $from.";
}
my $serverobj = Irssi::server_find_tag($server);
$serverobj->ctcp_send_reply("NOTICE $from :\001CAPAB TYPING\001");
Irssi::signal_stop();
}
}
sub event_ctcp_reply { # called for ctcp replies
my ($server, $msg, $from, $address) = @_;
if ( $msg =~ /CAPAB TYPING/ && exists( $typers{$server->{tag}}{$from} )) {
if ($debug) {
print "capab typing reply from $from.";
}
$typers{$server->{tag}}{$from}{capability} = 1;
Irssi::signal_stop();
}
}
sub unset_typing_in {
my ($a) = @_;
my ($server, $nick) = @{$a};
if ($debug) {
print "unset: $server, $nick";
}
$typers{$server}{$nick}{typing_in} = undef;
Irssi::timeout_remove($typers{$server}{$nick}{timer_tag_in});
Irssi::statusbar_items_redraw('typing_notice');
}
sub event_msg {
my ($server, $data, $nick, $address, $target) = @_;
$server = $server->{tag};
# haeh??? ist das eine art <active/> angehaengt als leeres ctcp
if ( $data =~ /$oo\z/ ) {
if ( not exists( $typers{$server}{$nick} ) ) {
$typers{$server}{$nick}{capability} = 1;
if ($debug) {
print "This user supports typing! $server, $nick";
}
}
} elsif (0) { # ah... this ensures that it stays valid
if ( exists( $typers{$server}{$nick} ) ) {
if ($debug) {
print "This user does not support typing anymore! $nick. splice: ";
}
delete $typers{$server}{$nick};
}
}
if ( 0 and exists( $typers{$server}{$nick} ) ) {
unset_typing_in( [$server, $nick] );
}
}
sub typing_notice { ## redraw statusbar item
my ($item, $get_size_only) = @_;
my ($server, $channel) = get_current();
return unless exists $typers{$server}{$channel};
if ( $typers{$server}{$channel}{typing_in} ne undef ) {
my $append = $typers{$server}{$channel}{typing_in};
$item->default_handler($get_size_only, "{sb typing $append}", 0, 1);
if ($debug >= 2) {
print "typing: $server, $channel.";
}
} else {
if ($debug) {
print "clear: $server, $channel ";
}
$item->default_handler($get_size_only, "", 0, 1);
if ($typers{$server}{$channel}{timer_tag_in} ne undef) {
Irssi::timeout_remove($typers{$server}{$channel}{timer_tag_in});
$typers{$server}{$channel}{timer_tag_in} = undef;
}
}
}
sub window_change {
Irssi::statusbar_items_redraw('typing_notice');
my ($server, $channel) = get_current();
if ( exists( $typers{$server}{$channel} ) ) {
if ( not $keylog_active ) {
$keylog_active = 1;
Irssi::signal_add_last('gui key pressed', 'key_pressed');
}
} else {
if ($keylog_active) {
$keylog_active = 0;
Irssi::signal_remove('gui key pressed', 'key_pressed');
}
}
return if not Irssi::settings_get_bool("send_typing");
# send INACTIVE?
}
sub window_close {
return if not Irssi::settings_get_bool("send_typing");
my ($server, $channel) = get_current();
if ( exists( $typers{$server}{$channel} ) and $typers{$server}{$channel}{state_out} ne "GONE" ) {
my $serverobj = Irssi::server_find_tag($server);
$serverobj->command("^CTCP $channel TYPING GONE");
$typers{$server}{$channel}{state_out} = "GONE";
}
}
sub window_open {
return if not Irssi::settings_get_bool("send_typing");
my ($item) = @_;
# look if we should disco
}
sub key_pressed {
return if not Irssi::settings_get_bool("send_typing");
my $key = shift;
if ($key == 9 && $key == 10 && $lastkey == 27 && $key == 27 && $lastkey == 91 && $key == 126 && $key == 127) { # ignore these keys
$lastkey = $key;
return 0;
}
my ($server, $channel) = get_current();
if ( exists( $typers{$server}{$channel} ) ) {
my $input = Irssi::parse_special("\$L");
if ($input !~ /^$command_char.*/ && length($input) > 0){
send_typing( $server, $channel );
}
}
$lastkey = $key; # some keys, like arrow-up, contain two events.
}
sub send_typing_pause {
return if not Irssi::settings_get_bool("send_typing");
my ($a) = @_;
my( $server, $nick ) = @{$a};
send_typing_update_state($server, $nick, "PAUSED");
Irssi::timeout_remove($typers{$server}{$nick}{timer_tag_out});
$typers{$server}{$nick}{timer_tag_out} = Irssi::timeout_add_once($TIMEOUTS{INACTIVE}, 'send_typing_inactive', [$server, $nick]);
}
sub send_typing_inactive {
return if not Irssi::settings_get_bool("send_typing");
my ($a) = @_;
my( $server, $nick ) = @{$a};
send_typing_update_state($server, $nick, "INACTIVE");
Irssi::timeout_remove($typers{$server}{$nick}{timer_tag_out});
$typers{$server}{$nick}{timer_tag_out} = Irssi::timeout_add_once($TIMEOUTS{GONE}, 'send_typing_gone', [$server, $nick]);
}
sub send_typing_gone {
return if not Irssi::settings_get_bool("send_typing");
my ($a) = @_;
my( $server, $nick ) = @{$a};
send_typing_update_state($server, $nick, "GONE");
Irssi::timeout_remove($typers{$server}{$nick}{timer_tag_out});
}
sub send_typing {
my ( $server, $nick ) = @_;
send_typing_update_state($server, $nick, "COMPOSING");
Irssi::timeout_remove($typers{$server}{$nick}{timer_tag_out});
$typers{$server}{$nick}{timer_tag_out} = Irssi::timeout_add_once($TIMEOUTS{PAUSED}, 'send_typing_pause', [$server, $nick]);
}
sub send_typing_update_state {
return if not Irssi::settings_get_bool("send_typing");
my ( $server, $nick, $state ) = @_;
if (not exists($typers{$server}{$nick}) or $typers{$server}{$nick}{capability} != 1) {
print Dumper(%typers);
print "(dont) send_typing_update_state to non-typer $server->$nick"; #if ($debug);
return 0;
}
if ($state eq $typers{$server}{$nick}{state_out}) {
print "(dont) send_typing_update_state: $state already known" if $debug;
return;
}
# FIXME: allowed state transitions could be checked here
if ($debug) {
print "$server: ctcp $nick typing $state";
}
my $serverobj = Irssi::server_find_tag($server);
if (!$serverobj) {
print "send typing update state: server not found";
return;
}
$serverobj->command("^CTCP $nick TYPING $state");
$typers{$server}{$nick}{state_out} = $state;
}
sub db_typing {
print "------ Typers -----\n".Dumper(%typers);
}
sub event_send_msg { # outgoing messages
my ($msg, $server, $window) = @_;
return unless $window and $window->{type} eq "QUERY";
my $nick = $window->{name};
if ($debug) {
print "send msg: $server->{tag}, $nick";
}
if ( exists($typers{$server->{tag}}{$nick}) and
$typers{$server->{tag}}{$nick}{capability} == 1) {
$typers{$server->{tag}}{$nick}{state_out} = "ACTIVE";
Irssi::timeout_remove($typers{$server->{tag}}{$nick}{timer_tag_out});
}
if (!exists( $typers{$server->{tag}}{$nick} ) ) {
if ($debug) {
print "send capa query to $nick.";
}
$typers{$server->{tag}}{$nick}{capability} = -1;
if (my $serverobj = Irssi::server_find_tag($server->{tag})) {
$serverobj->command("^CTCP $nick CAPAB TYPING");
}
}
if ( 0 and length($msg) > 0) {
# ist das eine art <active/>
$msg .= $oo;
}
Irssi::signal_stop();
Irssi::signal_remove('send text', 'event_send_msg');
Irssi::signal_emit('send text', $msg, $server, $window);
Irssi::signal_add_first('send text', 'event_send_msg');
}
# Command
Irssi::command_bind('db_typing','db_typing');
# Settings
Irssi::settings_add_bool("typing_notice","send_typing",1);
# IRC events
Irssi::signal_add_first("send text", "event_send_msg"); # Outgoing messages
Irssi::signal_add("ctcp msg", "event_ctcp_msg");
Irssi::signal_add("ctcp reply", "event_ctcp_reply");
Irssi::signal_add("message private", "event_msg");
Irssi::signal_add("message public", "event_msg");
# GUI events
Irssi::signal_add_last('window changed', 'window_change');
Irssi::signal_add_last('window destroyed', 'window_close');
Irssi::signal_add_last('window created', 'window_open');
Irssi::signal_add_last('gui key pressed', 'key_pressed');
# Statusbar
Irssi::statusbar_item_register('typing_notice', undef, 'typing_notice');
Irssi::statusbars_recreate_items();

88
config/pikelpc.patch Normal file
View file

@ -0,0 +1,88 @@
This patch is necessary to apply to the Pike language source code to teach it
to not complain so much about LPC code in an #ifndef __PIKE__ part. So this
is necessary before you can try out the bin/psyked experiment to use psyced
code in pike.
You would think the preprocessor ignores anything that is not __PIKE__, but
Pike's preprocessor doesn't do that very well. To change that completely is
hard to achieve and would not be backward compatible to the custom extensions
that have been added to Pike.
Therefore this patch gently teaches Pike to deal with a few LPC specific things:
* LPC's #'lambda closure syntax is dealt as if the #' wasn't there. This means
that the code will not trigger errors when ifdef'd out. In some cases it may
even produce useful Pike code, as in the case of a #'callback function.
* Pike will not break on LPC's #include MACRO capability. Would be even better
if Pike learned to support this syntax:
#define CONFIG_PATH "/my/filesystem/is/not/like/yours/"
#include CONFIG_PATH "myconfig.h"
* In LPC, #echo allows to quickly put a compile-time debug message into the code
to figure out if ifdefs are properly set. Something like:
#echo Warning: LPC version probably too old!
This patch teaches Pike to ignore #echo statements. Would be better to
support them.
--- preprocessor.h-orig 2007-09-04 22:56:07.002487000 +0200
+++ preprocessor.h 2007-09-16 19:15:32.179227455 +0200
@@ -1407,6 +1407,15 @@
switch(data[pos])
{
+ case '\'':
+ /*
+ * deal with LPC lambda syntax: skip the #' in #'<token>
+ * this makes function pointers syntax compatible, and allows other
+ * lambda statements to exist in an #ifndef __PIKE__ area.
+ * healthy for writing code that runs on both LPC and pike. --lynX
+ */
+ pos++;
+ break;
case 'l':
{
static WCHAR line_[] = { 'l', 'i', 'n', 'e' };
@@ -1568,7 +1577,12 @@
}
default:
- cpp_error(this, "Expected file to include.");
+ /* used to complain about LPC's macro #include syntax
+ * even when in an #ifndef __PIKE__ zone. this is a
+ * clear case where pike should mind its own business.
+ * luckily an if is enough. --lynX
+ */
+ if (OUTP()) cpp_error(this, "Expected file to include.");
break;
}
@@ -1799,6 +1813,7 @@
static WCHAR elseif_[] = { 'e', 'l', 's', 'e', 'i', 'f' };
static WCHAR elif_[] = { 'e', 'l', 'i', 'f' };
static WCHAR error_[] = { 'e', 'r', 'r', 'o', 'r' };
+ static WCHAR echo_[] = { 'e', 'c', 'h', 'o' };
if(WGOBBLE2(endif_))
{
@@ -1869,6 +1884,17 @@
break;
}
+ /* very rudimentary implementation of the LPC #echo directive:
+ * just skip it quietly. would be better to output it when OUTP()
+ * but doing so looks like more work than I am willing to invest
+ * right now.. --lynX
+ */
+ if(WGOBBLE2(echo_)) {
+ SKIPSPACE();
+ FIND_EOL();
+ break;
+ }
+
if(WGOBBLE2(error_))
{
ptrdiff_t foo;

15
config/portrules.iptables Normal file
View file

@ -0,0 +1,15 @@
# typical way of routing privileged ports to a psyced running non-privileged
# install.sh will generate a copy reflecting your port configuration
IF_EX=eth0
IP_PSYC=127.0.0.1
IPT=/sbin/iptables
$IPT -t nat -A PREROUTING -i $IF_EX -d $IP_PSYC -p tcp --dport 23 -j DNAT --to :2323
$IPT -t nat -A PREROUTING -i $IF_EX -d $IP_PSYC -p tcp --dport 80 -j DNAT --to :44444
$IPT -t nat -A PREROUTING -i $IF_EX -d $IP_PSYC -p tcp --dport 119 -j DNAT --to :1199
$IPT -t nat -A PREROUTING -i $IF_EX -d $IP_PSYC -p tcp --dport 194 -j DNAT --to :6667
$IPT -t nat -A PREROUTING -i $IF_EX -d $IP_PSYC -p tcp --dport 465 -j DNAT --to :4654
$IPT -t nat -A PREROUTING -i $IF_EX -d $IP_PSYC -p tcp --dport 563 -j DNAT --to :5633
$IPT -t nat -A PREROUTING -i $IF_EX -d $IP_PSYC -p tcp --dport 992 -j DNAT --to :9922
$IPT -t nat -A PREROUTING -i $IF_EX -d $IP_PSYC -p tcp --dport 994 -j DNAT --to :9944

127
config/psyced.ini Normal file
View file

@ -0,0 +1,127 @@
; $Id: psyced.ini,v 1.22 2008/01/22 09:30:06 lynx Exp $
;
; this is the sample psyced configuration file. in fact it is the one
; being used for the gentoo default installation. you can use this if
; you are doing manual installation, otherwise 'install.sh' will create
; one for you.
;
; after modifying this file you must always run 'psyconf'.
; inspect http://about.psyc.eu/psyced for further instructions.
;
; boolean variables are 0 = false (no) and 1 = true (yes).
[_basic]
; Base directory of this PSYCED installation
_path_base = /opt/psyced
; Configuration directory of this PSYCED installation
; psyconf will automatically search /etc/psyc for psyced.ini.
; If you plan to put this file anywhere else, you will have to pass it
; as argument to psyconf.
_path_configuration = /etc/psyc
; Path leading to your private and public TLS keys
; (absolute or relative to the configuration directory).
_path_PEM_key = key.pem
_path_PEM_certificate = cert.pem
; Path to the TLS trust directory where certs are kept.
; If unset this will default to your system installation's defaults.
;_path_trust = trust
;
; Path to the TLS CRL directory where certificate revocation lists are kept.
; We currently simply use the same one as for the certs. In fact we don't use
; these things yet, but it is a good idea to start doing so.
;_path_revocation = trust
; Do you want psyced to be launched automatically at system startup?
; List of filenames a System V start/stop script shall be generated to.
; Purpose of this is: you can _really_ move the installation
; to another _path_base.
;
; May look like this for a classic System V set-up:
;_list_script_init = /etc/rc.d/psyced /etc/rc.d/rc3.d/K04psyced /etc/rc.d/rc3.d/S44psyced
; or it should look like this for gentoo:
_list_script_init = /etc/init.d/psyced
; You can simply disable the line to turn off this feature.
;
; Userid to run the psyced as, when started from the init script.
_system_user = psyced
;
; Unused as yet:
;_system_group = psyc
; Where new users will be sent to
_place_default = RendezVous
; How the system speaks to you unless specified.
; de = German, en = English, en_g = English for Geeks
_language_default = en
; The externally visible name & domain of your host
_host_name = psyc
;_host_domain = example.org
;_host_domain = homelinux.org
; Would you like to bind the server to a specific IP address?
; If you do you MUST also provide _host_name and _host_domain
;_host_IP = 127.0.0.1
; Nickname for the chatserver. Appears in login message, telnet prompt,
; IRC gateways and some web pages. Will use _host_name if unspecified.
_nick_server = polvo
[_administrators]
; Space-seperated list of administrator user nicknames.
_list_nicks = theBoss k lynX
; If the administrators have not been registered yet, this password will be
; assigned to them. If you leave this out you will be prompted for each as yet
; unregistered administrator, but you have to run psyconf manually!
;_password_default = my secret
[_protocols]
; if you don't have TLS or SSL simply set this to
; no and all the _encrypted ports will be ignored
_use_encryption = 0
[_protocols_port]
_PSYC = 4404
_PSYC_encrypted = 9404
_telnet = 2323
_telnet_encrypted = 9992
_jabber_S2S = 5269
_jabber_clients = 5222
_jabber_clients_encrypted = 5223
_IRC = 6667
_IRC_encrypted = 9999
_HTTP = 44444
_HTTP_encrypted = 4433
_applet = 2008
_SMTP = 2525
;_SMTP_encrypted = 4656
; Experimental protocol services
;_POP3 = 1100
;_POP3_encrypted = 9950
;_NNTP = 1199
;_NNTP_encrypted = 5636
[_optional]
; Enable web-based configuration tool
_config_HTTP = 0
; Runtime output can either be in .out and .err files or onto the console
; For development, _console_debug is extremely useful,
; for regular service it is better to have output in files.
_console_debug = 0
; If your console charset differs from UTF-8, output will look nicer if you
; enable the following line. The charset must be something iconv understands.
;_charset_console = ISO-8859-15
; '0' is tranquility unless something serious happens. best choice.
; '1' gives you slightly interesting output and LPC development debug.
; '2' or '3' is too much and too detailed. we hardly ever use that ourselves.
_level_debug = 0
; We create files that are editable by the psyc group
_umask = 007

311
config/psyced.settings Normal file
View file

@ -0,0 +1,311 @@
#!/bin/sh
#
# settings/psyced version 4.0
#
# $Id: psyced.settings,v 1.10 2007/05/08 00:52:01 lynx Exp $
#
# LDMUD compilation settings for psyced, the LPC server and client
# implementation of the protocol for synchronous conferencing.
# Please execute this instead of ./configure before compilation.
#
# The latest version of this file is in the psyced-CVS and usually also
# at http://www.psyced.org/dist/config/psyced.settings
# The version in the LDMUD distribution may be slightly outdated.
#
# Documents and download on: http://www.psyced.org
# Information about PSYC: http://www.psyc.eu
#
# the PSYC implementation and library is designed in a way that it should
# easily co-host in a running LPMUD, it just needs a few patches to the
# master object and #includes in simul_efun.
#
# how to multiplex InterMUD and PSYC on the same udp port:
# PSYC UDP packets always start with ".\n".
#
# configure will strip this part from the script.
cp $0 settings/psyced-current
exec ./configure --prefix=/opt/psyced --bindir=/opt/psyced/bin --libdir=/opt/psyced/world --libexec=/opt/psyced/run --with-setting=psyced-current $*
exit
#-- PSYCLPC EXTENSIONS
# compile json c library in, if available
enable_use_json=yes
# compile expat xml & xmpp parser in, if available
enable_use_expat=yes
# enable this if you want use http://about.psyc.eu/psyclpc#Authlocal
enable_use_authlocal=yes
# requires procfs with readable /proc/net/tcp
#
# some kernel configurations show wrong port numbers however,
# in that case the correlation from peer port to user id fails.
# there is however no risk of error (the peer ports are unprivileged
# whereas the 'wrong' ones are privileged ones. could be related to
# iptables or some other port mapping magic).
#-- FILE PATHES
with_master_name=drivers/ldmud/master/master
# unused really
with_swap_file=log/psyced.swap
#-- NETWORKING & DATA BASES
# cool tool that does external name server resolution and more
enable_erq=erq
# the "sorry" message of the built-in ACL isn't flexible enough:
# it cannot output a properly formatted HTTP or PSYC message
# and why shouldn't this be done in LPC anyway?
enable_access_control=no
# zlib compression, really
enable_use_mccp=yes
# Enable support for TLS (Transport Layer Security).
#
# 'no': TLS support is not compiled it
# 'gnu': TLS support using GnuTLS is compiled in if found.
# 'ssl': TLS support using OpenSSL is compiled in if found.
# 'yes': TLS support using either OpenSSL or GnuTLS is compiled in if found.
# The configuration script looks first for OpenSSL, then GnuTLS.
# If both are available, OpenSSL is used.
#
# gnutls does not offer features we need
enable_use_tls=ssl
# SQL storage not implemented. Maybe PSYC synchronization is good enough?
# see http://about.psyc.eu/storage for info.
enable_use_mysql=no
enable_use_pgsql=no
enable_use_sqlite=no
# maximum permitted tcp connections
with_max_players=900
# The maximum number of ports to listen for connections on.
with_maxnumports=33
# size of the buffer for incoming data of each socket
with_size_socket_buffer=32768
# The maximum number of simultaneous connect() calls
with_max_net_connects=33
# how can i set all the other port numbers?
# still using the historic dirty command line hack?
with_portno=4404
# Maximum size of a socket send buffer.
with_set_buffer_size_max=262144
# the PSYC port
with_udp_port=4404
# Enable support for IPv6 (this should better be autodetected!!)
#enable_use_ipv6=no
# Enable the use of pthreads for background socket IO.
enable_use_pthreads=no
# If PThreads are used, this is the max amount of data held pending
# for writing. If the amount is exceeded, the oldest data blocks
# are discarded.
# If 0, any amount of data is allowed.
with_pthread_write_max_size=333333
#-- RUNTIME LIMITS
#
# currently we consider a psyced a friendly environment
# where no coders will abuse cpu time and other limits
# you may want to change this if you have many room coders
# you can lower this value for better debugging
with_max_cost=9999999
#with_catch_reserved_cost=2000
#with_master_reserved_cost=512
enable_dynamic_costs=no
# Maximum function call depth for normal program execution
#with_max_user_trace=60
# Maximum function call depth during error handling.
# It must be bigger than MAX_USER_TRACE (check at compile time).
#with_max_trace=65
# Maximum number of bits in a bit string.
# The limit is more based on considerations of speed than memory consumption.
#with_max_bits=6144
# Allowed number of ed commands per backend cycle (for faster file upload).
#with_allowed_ed_cmds=20
# disabled "mud" limits
with_max_array_size=0
with_max_mapping_size=0
with_max_mapping_keys=0
with_read_file_max_size=0
with_max_byte_transfer=0
with_max_callouts=0
# new, was =100000
with_pthread_write_max_size=0
# Compiler stack size. This value affects the complexity the compiler can
# parse.
#with_compiler_stack_size=400
# Maximum number of local variables
#with_max_local=50
# Maximum size of an expanded preprocessor definition.
#with_defmax=65000
#-- MEMORY ALLOCATION
# slabmalloc seems to interact badly with net/jabber
#with_malloc=sysmalloc
# but other mallocs don't even compile & run
enable_malloc_sbrk=yes
enable_malloc_check=no
enable_malloc_trace=no
enable_malloc_sbrk_trace=no
#enable_malloc_lpc_trace=no, MALLOC_slaballoc
# disabled, sort of
with_reserved_user_size=100000
# hash table sizes. we have many chat strings (like lastlogs), but few objects
# (max: 65536)
with_htable_size=32768
with_otable_size=256
# Size of the hash table for defines, reserved words, identifiers, and
# efun names. This should be several times smaller than HTABLE_SIZE.
#with_itable_size=256
# Size of the apply cache, expressed in the bitsize of its indices.
# The number of entries is 2**cache_bits.
#with_apply_cache_bits=12
# Select whether compiled regular expressions shall be cached, and
# how big the cache shall be (max: 65536).
enable_rxcache_table=yes
with_rxcache_table=4096
#-- TIMER MECHANISMS
# short resets, not strictly necessary but useful
with_time_to_reset=1000
with_time_to_clean_up=9000
#with_time_to_swap=1500
#with_time_to_swap_variables=2500
with_time_to_swap=0
with_time_to_swap_variables=0
#-- MUD FEATURES
# should work in "native" too, after a tweak or two
# however, psyced expects create() to get called instead of reset(0)
enable_compat_mode=yes
enable_strict_euids=no
# The Input escape character.
# If this character is typed as first on the line, the normal input_to()s
# are bypassed.
#with_input_escape="!"
# Define ALLOW_FILENAME_SPACES if the driver should accept space characters
# in filenames. If it is not defined, a hardcoded test for space characters
# is activated.
enable_filename_spaces=yes
with_wizlist_file=no
enable_use_set_light=no
enable_use_set_is_wizard=no
#-- LANGUAGE
enable_use_parse_command=no
enable_use_process_string=no
enable_lpc_nosave=yes
# if turned to yes this causes errors
# in textdb and room history:
enable_share_variables=no
# keep .o files crossplatform
enable_use_system_crypt=no
# Define this to enable LPC structs.
enable_use_structs=no
# new inline closure and function syntax, see doc/LPC/inline-closures
# ... We don't want to use them as yet, but current
# 3.3.5xx doesn't compile properly without! :-(
enable_use_new_inlines=yes
enable_use_alists=no
# we use it for system shout
enable_lpc_array_calls=yes
# only enables the ancient transfer() efun we don't use
enable_use_deprecated=no
# Enable PCRE instead of traditional regexps
# 'no': use traditional regexps by default
# 'no-builtin': use traditional regexps by default, or the builtin PCRE
# package if PCRE is requested
# 'builtin': use PCRE package by default, using the builtin package
# 'yes': use the system's PCRE package if available, otherwise the
# builtin package
enable_use_pcre=yes
#-- COMPILATION
# The optimization level in the generated Makefile
# Settings: no, low, med, high
with_optimize=med
#-- DEBUGGING
# Enable basic run time sanity checks. This will use more time
# and space, but nevertheless you are strongly encouraged to keep
# it defined.
enable_debug=yes
# LPC compiler debug
#enable_yydebug=no
# Disable inlining. Use this to debug obscure crashes, or for
# speed tests.
#enable_no_inlines=no
# Activate debug prints in the telnet machine (lots of output).
#enable_debug_telnet=no
# Activate allocation debug prints in the malloc module (lots of output).
# Supported by: MALLOC_smalloc, MALLOC_slaballoc
#enable_debug_malloc_allocs=no
# The DEBUG level for the ERQ daemon:
# 0 : no debug output
# 1 : standard debug output
# 2 : verbose debug output
with_erq_debug=0
# If TRACE_CODE is enable, the driver keeps a log of TOTAL_TRACE_LENGTH
# most recently execute bytecode instructions.
enable_trace_code=yes
with_total_trace_length=1024
# Enable these for runtime statistics:
# COMM_STAT: number and size of outgoing packets
# APPLY_CACHE_STAT: number of hits and misses in the apply cache
enable_comm_stat=yes
enable_apply_cache_stat=no
# Enable usage statistics of VM instructions.
enable_opcprof=no
enable_verbose_opcprof=no
# Lars' hardcore debug features
#enable_check_object_stat=no
#enable_check_mapping_total=no
#enable_check_object_ref=no
#enable_check_object_gc_ref=no
#enable_dump_gc_refs=no

64
config/psycmuve.powwow Normal file
View file

@ -0,0 +1,64 @@
#savefile-version 6
#host localhost 2000
#delim normal
#setvar mem=1048576
#mark Benachrichtigung:=red
#mark Anwesende Freunde=green
#mark Freundschaft=red
#mark & sagt Dir:=bold red
#mark & fragt Dich:=bold red
#mark Mozilla/&\)=green
#mark ^~&>=black on red
#mark ^@&>=cyan on blue
#mark ^&:&:& Du &:=blue
#mark ^Du &: =bold blue
#mark In & spricht=blue
#mark psyc=bold red
#mark Psyc=bold red
#mark PSYC=bold red
#mark ^In &:=blue
#mark \(&Mail\) &:=bold cyan on black
#mark \(&News\)=yellow
#mark http://&=blue
#mark \(CVS\) &=YELLOW
#bind BS ^H=&del-char-left
#bind C-a ^A=&begin-of-line
#bind C-b ^B=&prev-char
#bind C-d ^D=&del-char-right
#bind C-e ^E=&end-of-line
#bind C-f ^F=&next-char
#bind C-k ^K=&kill-to-eol
#bind C-l ^L={#keyedit &to-history§#keyedit &enter-line}
#bind C-n ^N=&next-line
#bind C-p ^P=&prev-line
#bind C-t ^T=&transpose
#bind C-w ^W=&to-history
#bind C-z ^Z=&suspend
#bind Del ^?=&del-char-left
#bind Down =&next-line
#bind KP2 ^[Or=s
#bind KP3 ^[Os=d
#bind KP4 ^[Ot=w
#bind KP5 ^[Ou=exits
#bind KP6 ^[Ov=e
#bind KP7 ^[Ow=look
#bind KP8 ^[Ox=n
#bind KP9 ^[Oy=u
#bind LF ^J=&enter-line
#bind Left =&prev-char
#bind M-BS ^[^H=&del-word-left
#bind M-Del ^[^?=&del-word-left
#bind M-Tab ^[^I=&complete-line
#bind M-b ^[b=&prev-word
#bind M-d ^[d=&del-word-right
#bind M-f ^[f=&next-word
#bind M-k ^[k=&redraw-line-noprompt
#bind M-l ^[l=&downcase-word
#bind M-t ^[t=&transpose-words
#bind M-u ^[u=&upcase-word
#bind Ret ^M=&enter-line
#bind Right =&next-char
#bind Tab ^I=&complete-word
#bind Up =&prev-line
#option +exit -history -words -compact -debug +echo +info +keyecho -speedwalk
#option -wrap -autoprint -reprint -sendsize +autoclear