Add dancer-ircd, an irc daemon based on hybrid ircd.

This is the ircd designed for use on freenode.net, based on the hybrid
ircd used by efnet.

This port/package is configured for use on a small network or
standalone, and the escape code filter is disabled.  To use it on a
large and/or Western language only network, please re-configure
config.h and rebuild.
This commit is contained in:
Akinori MUSHA 2003-04-19 12:01:34 +00:00
parent 253d4c8ad2
commit 778a627a7c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=79271
10 changed files with 393 additions and 0 deletions

View file

@ -5,6 +5,7 @@
SUBDIR += blackened SUBDIR += blackened
SUBDIR += bnc SUBDIR += bnc
SUBDIR += bobot++ SUBDIR += bobot++
SUBDIR += dancer-ircd
SUBDIR += darkbot SUBDIR += darkbot
SUBDIR += dcc SUBDIR += dcc
SUBDIR += dircproxy SUBDIR += dircproxy

59
irc/dancer-ircd/Makefile Normal file
View file

@ -0,0 +1,59 @@
# New ports collection makefile for: dancer-ircd
# Date Created: 14 April 2003
# Whom: Akinori MUSHA aka knu <knu@idaemons.org>
#
# $FreeBSD$
#
PORTNAME= dancer-ircd
PORTVERSION= 1.0.31m8
CATEGORIES= irc
MASTER_SITES= http://www.doc.ic.ac.uk/~aps100/dancer/%SUBDIR%/
MASTER_SITE_SUBDIR= ${PORTNAME}/stable/releases
DISTNAME= ${PORTNAME}-${PORTVERSION:S/m/+maint/}
MAINTAINER= knu@FreeBSD.org
COMMENT= An irc daemon based on hybrid ircd
USE_REINPLACE= yes
USE_GMAKE= yes
GNU_CONFIGURE= yes
.if !defined(PACKAGE_BUILDING) && !defined(BATCH)
IS_INTERACTIVE= yes
.endif
post-patch:
${REINPLACE_CMD} 's:@@prefix@@:${PREFIX}:g' ${WRKSRC}/include/config.h
pre-install:
.if !defined(PACKAGE_BUILDING) && !defined(BATCH)
@${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
.endif
post-install:
${INSTALL} -d -m 700 -o ircd -g ircd \
${PREFIX}/etc/dancer-ircd \
/var/log/dancer-ircd \
/var/run/dancer-ircd
${INSTALL_DATA} ${WRKSRC}/doc/example.conf ${PREFIX}/etc/dancer-ircd/ircd.conf.sample
.for f in kline.conf dline.conf motd ohelp omotd
${TOUCH} ${PREFIX}/etc/dancer-ircd/${f}.sample
.endfor
.for f in ircd.conf kline.conf dline.conf motd ohelp omotd
if [ ! -f ${PREFIX}/etc/dancer-ircd/${f} ]; then \
${CP} ${PREFIX}/etc/dancer-ircd/${f}.sample ${PREFIX}/etc/dancer-ircd/${f}; \
fi
.endfor
${CHMOD} -R ${SHAREMODE} ${PREFIX}/etc/dancer-ircd
${CHOWN} -R ircd:ircd ${PREFIX}/etc/dancer-ircd
${SED} -e "s,%PREFIX%,${PREFIX},g" ${FILESDIR}/dancer-ircd.sh \
> ${WRKDIR}/dancer-ircd.sh
${INSTALL_SCRIPT} ${WRKDIR}/dancer-ircd.sh ${PREFIX}/etc/rc.d/
${SED} -e "s,/usr/local/,${PREFIX}/,g" ${PKGMESSAGE}
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
${CP} -R ${WRKSRC}/doc/* ${DOCSDIR}/
.endif
.include <bsd.port.mk>

1
irc/dancer-ircd/distinfo Normal file
View file

@ -0,0 +1 @@
MD5 (dancer-ircd-1.0.31+maint8.tar.gz) = a6a3af5c396db56744a77b5630302ef8

View file

@ -0,0 +1,25 @@
#!/bin/sh
#
# $FreeBSD$
case "$1" in
start)
if [ -x %PREFIX%/bin/dancer-ircd ]; then
su -fm ircd -c %PREFIX%/bin/dancer-ircd && echo ' dancer-ircd'
fi
;;
stop)
if [ -f /var/run/dancer-ircd.pid ]; then
kill `cat /var/run/dancer-ircd.pid`
else
# oh well
killall dancer-ircd
fi
;;
*)
echo "usage: $0 {start|stop}" >&2
exit 64
;;
esac

View file

@ -0,0 +1,105 @@
--- include/config.h.orig Fri Apr 12 05:04:53 2002
+++ include/config.h Tue Apr 15 15:53:06 2003
@@ -66,8 +66,8 @@
* system limits. If you know what you are doing, increase them now
*/
-#define HARD_FDLIMIT_ 256 /* was 256 */
-#define INIT_MAXCLIENTS 200 /* was 200 */
+#define HARD_FDLIMIT_ 512 /* was 256 */
+#define INIT_MAXCLIENTS 400 /* was 200 */
/*
* This is how many 'buffer connections' we allow...
@@ -125,15 +125,15 @@
*/
#define DPATH "/"
-#define SPATH "bin/dancer-ircd"
-#define CPATH "etc/dancer-ircd/ircd.conf"
-#define KPATH "var/lib/dancer-ircd/kline.conf"
-#define DLPATH "var/lib/dancer-ircd/dline.conf"
-#define MPATH "etc/dancer-ircd/motd"
-#define LPATH "var/log/dancer-ircd/ircd.log"
-#define PPATH "var/run/dancer-ircd.pid"
-#define HPATH "etc/dancer-ircd/ohelp"
-#define OPATH "etc/dancer-ircd/omotd"
+#define SPATH "@@prefix@@/bin/dancer-ircd"
+#define CPATH "@@prefix@@/etc/dancer-ircd/ircd.conf"
+#define KPATH "@@prefix@@/etc/dancer-ircd/kline.conf"
+#define DLPATH "@@prefix@@/etc/dancer-ircd/dline.conf"
+#define MPATH "@@prefix@@/etc/dancer-ircd/motd"
+#define LPATH "/var/log/dancer-ircd/ircd.log"
+#define PPATH "/var/run/dancer-ircd/dancer-ircd.pid"
+#define HPATH "@@prefix@@/etc/dancer-ircd/ohelp"
+#define OPATH "@@prefix@@/etc/dancer-ircd/omotd"
/* HIDE_OPS
* Define this to prevent non chanops from seeing what ops a channel has
@@ -173,12 +173,12 @@
/* NETWORK_NAME
* Displayed in place of the servername when SERVERHIDE is enabled
*/
-#define NETWORK_NAME "irc.openprojects.net"
+#define NETWORK_NAME "irc.example.net"
/* NETWORK_DESC
* Displayed in place of the server info when SERVERHIDE is enabled
*/
-#define NETWORK_DESC "http://www.openprojects.net/"
+#define NETWORK_DESC "http://www.example.net/"
/* USE_SERVICES
* Defines whether or not you're using services on your network
@@ -246,7 +246,7 @@
*/
#define SAVE_MAXCLIENT
#ifdef SAVE_MAXCLIENT
-# define MXPATH "etc/dancer-ircd/ircd.max"
+# define MXPATH "@@prefix@@/etc/dancer-ircd/ircd.max"
# define SAVE_TIME 3600
#endif
@@ -683,7 +683,7 @@
* the net. for a leaf, 2 is fine. If the number of servers seen
* on the net gets less than 2, a split is deemed to have happened.
*/
-#define SPLIT_SMALLNET_SIZE 2
+#define SPLIT_SMALLNET_SIZE 0
/*
* SPLIT_SMALLNET_USER_SIZE defines how many global users on the
@@ -693,7 +693,7 @@
* number of users seen on net > SPLIT_SMALLNET_USER_SIZE start
* counting down the SERVER_SPLIT_RECOVERY_TIME
*/
-#define SPLIT_SMALLNET_USER_SIZE 2 /* was 10000 */
+#define SPLIT_SMALLNET_USER_SIZE 0 /* was 10000 */
/*
* SPLIT_PONG will send a PING to a server after the connect burst.
@@ -703,13 +703,13 @@
* you should be able to crank DEFAULT_SERVER_SPLIT_RECOVERY_TIME
* down to 1.
*/
-#define SPLIT_PONG
+#undef SPLIT_PONG
/*
* DEFAULT_SERVER_SPLIT_RECOVERY_TIME - determines how long to delay split
* status after resyncing
*/
-#define DEFAULT_SERVER_SPLIT_RECOVERY_TIME 1
+#define DEFAULT_SERVER_SPLIT_RECOVERY_TIME 0
/* LIMIT_UH
* If this is defined, Y line limit is made against the actual
@@ -864,7 +864,7 @@
* it will show up in /list
*/
-#define MIN_USERS_FOR_LIST 4
+#define MIN_USERS_FOR_LIST 2
/* USE_KNOCK
* KNOCK allows users to send a "knock" to a +i channel.

View file

@ -0,0 +1,21 @@
This patch prevents ircd from stripping topics etc. of escape
characters, which is commonly used by Asian languages.
--- src/irc_string.c.orig Sun Apr 7 08:16:04 2002
+++ src/irc_string.c Tue Apr 15 23:52:28 2003
@@ -131,6 +131,7 @@
char* strip_colour(char* string)
{
+#if 0
char *c = string;
char *c2 = string;
char *last_non_space = c2;
@@ -165,6 +166,7 @@
*c2 = '\0';
if (last_non_space)
*last_non_space = '\0';
+#endif
return string;
}

View file

@ -0,0 +1,9 @@
This is the ircd designed for use on freenode.net, based on the hybrid
ircd used by efnet.
This port/package is configured for use on a small network or
standalone, and the escape code filter is disabled. To use it on a
large and/or Western language only network, please re-configure
config.h and rebuild.
WWW: http://freenode.net/dancer_ircd.shtml

View file

@ -0,0 +1,91 @@
#!/bin/sh
# This script is a modified copy of the pkg-install script from the
# original ircd-hybrid port, by desmo@bandwidth.org.
if [ "x$2" != "xPRE-INSTALL" ]; then
exit 0;
fi
ask() {
local question default answer
question=$1
default=$2
if [ -z "${PACKAGE_BUILDING}" ]; then
read -p "${question} [${default}]? " answer
fi
if [ x${answer} = x ]; then
answer=${default}
fi
echo ${answer}
}
yesno() {
local dflt question answer
question=$1
dflt=$2
while :; do
answer=$(ask "${question}" "${dflt}")
case "${answer}" in
[Yy]*) return 0;;
[Nn]*) return 1;;
esac
echo "Please answer yes or no."
done
}
if which -s pw ; then
:
else
cat <<EOF
Your system does not include the "pw" utility. You should upgrade
to a newer version of FreeBSD. Without "pw" this script will not
run.
EOF
exit 1
fi
echo ""
if pw groupshow ircd 2> /dev/null ; then
echo "You already have a group \"ircd\", so I will use it."
else
if pw groupshow 72 2> /dev/null ; then
echo "You already have a gid \"72\". Please create a user \"ircd\""
echo "with a default group of \"ircd\"."
exit 1
fi
echo "You need a group \"ircd\"."
if which -s pw && yesno "Would you like me to create it" y; then
pw groupadd ircd -g 72 || exit
echo "Done."
else
echo "Please create it, and try again."
if ! pw usershow ircd 2> /dev/null ; then
echo "While you're at it, please create a user \"ircd\""
echo 'too, with a default group of "ircd".'
fi
exit 1
fi
fi
if pw usershow ircd 2> /dev/null ; then
echo "You already have a user \"ircd\", so I will use it."
else
if pw usershow 72 2> /dev/null ; then
echo "You already have a uid \"72\". Please create a user \"irc
d\""
echo "with a default group of \"ircd\"."
exit 1
fi
echo "You need a user \"ircd\"."
if which -s pw && yesno "Would you like me to create it" y; then
pw useradd ircd -g ircd -u 72 -h - -d /nonexistent \
-s /nonexistent -c "IRC Daemon" || exit
echo "Done."
else
echo "Please create it, and try again."
exit 1
fi
fi

View file

@ -0,0 +1,8 @@
dancer-ircd has now been installed.
You should now edit /usr/local/etc/dancer-ircd/ircd.conf
to suit your needs.
You may then start the server by running:
/usr/local/etc/rc.d/dancer-ircd.sh start

73
irc/dancer-ircd/pkg-plist Normal file
View file

@ -0,0 +1,73 @@
bin/dancer-ircd
bin/mkpasswd
bin/viconf
@unexec if cmp -s %D/etc/dancer-ircd/ircd.conf %D/etc/dancer-ircd/ircd.conf.sample; then rm -f %D/etc/dancer-ircd/ircd.conf; fi
etc/dancer-ircd/ircd.conf.sample
@exec if [ ! -f %B/ircd.conf ]; then cp %B/%f %B/ircd.conf; fi
@unexec if cmp -s %D/etc/dancer-ircd/motd %D/etc/dancer-ircd/motd.sample; then rm -f %D/etc/dancer-ircd/motd; fi
etc/dancer-ircd/motd.sample
@exec if [ ! -f %B/motd ]; then cp %B/%f %B/motd; fi
@unexec if cmp -s %D/etc/dancer-ircd/kline.conf %D/etc/dancer-ircd/kline.conf.sample; then rm -f %D/etc/dancer-ircd/kline.conf; fi
etc/dancer-ircd/kline.conf.sample
@exec if [ ! -f %B/kline.conf ]; then cp %B/%f %B/kline.conf; fi
@unexec if cmp -s %D/etc/dancer-ircd/dline.conf %D/etc/dancer-ircd/dline.conf.sample; then rm -f %D/etc/dancer-ircd/dline.conf; fi
etc/dancer-ircd/dline.conf.sample
@exec if [ ! -f %B/dline.conf ]; then cp %B/%f %B/dline.conf; fi
@unexec if cmp -s %D/etc/dancer-ircd/ohelp %D/etc/dancer-ircd/ohelp.sample; then rm -f %D/etc/dancer-ircd/ohelp; fi
etc/dancer-ircd/ohelp.sample
@exec if [ ! -f %B/ohelp ]; then cp %B/%f %B/ohelp; fi
@unexec if cmp -s %D/etc/dancer-ircd/omotd %D/etc/dancer-ircd/omotd.sample; then rm -f %D/etc/dancer-ircd/omotd; fi
etc/dancer-ircd/omotd.sample
@exec if [ ! -f %B/omotd ]; then cp %B/%f %B/omotd; fi
etc/rc.d/dancer-ircd.sh
@exec install -d -o ircd -g ircd -m 700 /var/log/dancer-ircd /var/run/dancer-ircd
@unexec rmdir %D/etc/dancer-ircd /var/log/dancer-ircd /var/run/dancer-ircd 2>/dev/null || echo "If you are permanently removing this port, you should do a ``rm -rf ${PKG_PREFIX}/etc/dancer-ircd /var/log/dancer-ircd /var/run/dancer-ircd`` to remove any configuration files and log files left." | fmt
%%PORTDOCS%%%%DOCSDIR%%/CIDR.txt
%%PORTDOCS%%%%DOCSDIR%%/INSTALL.hybrid-6
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/README.FIRST.hybrid-6
%%PORTDOCS%%%%DOCSDIR%%/README.TSora
%%PORTDOCS%%%%DOCSDIR%%/README.small_nets
%%PORTDOCS%%%%DOCSDIR%%/README.umodes
%%PORTDOCS%%%%DOCSDIR%%/RELNOTES.hybrid-6
%%PORTDOCS%%%%DOCSDIR%%/Tao-of-IRC.940110
%%PORTDOCS%%%%DOCSDIR%%/blalloc.txt
%%PORTDOCS%%%%DOCSDIR%%/example.conf
%%PORTDOCS%%%%DOCSDIR%%/hybrid/ChangeLog.hybrid-6.gz
%%PORTDOCS%%%%DOCSDIR%%/hybrid/README
%%PORTDOCS%%%%DOCSDIR%%/hybrid/example.conf
%%PORTDOCS%%%%DOCSDIR%%/hybrid/example.conf.trillian
%%PORTDOCS%%%%DOCSDIR%%/hybrid/mtrie.txt
%%PORTDOCS%%%%DOCSDIR%%/hybrid/opermyth.txt
%%PORTDOCS%%%%DOCSDIR%%/hybrid/opers.txt
%%PORTDOCS%%%%DOCSDIR%%/hybrid/server-version-info
%%PORTDOCS%%%%DOCSDIR%%/hybrid/simple.conf
%%PORTDOCS%%%%DOCSDIR%%/ircd.8
%%PORTDOCS%%%%DOCSDIR%%/old/Authors
%%PORTDOCS%%%%DOCSDIR%%/old/Etiquette
%%PORTDOCS%%%%DOCSDIR%%/old/README
%%PORTDOCS%%%%DOCSDIR%%/rfc1459.txt
%%PORTDOCS%%%%DOCSDIR%%/sgml/Makefile
%%PORTDOCS%%%%DOCSDIR%%/sgml/README
%%PORTDOCS%%%%DOCSDIR%%/sgml/dancer-oper-guide/Makefile
%%PORTDOCS%%%%DOCSDIR%%/sgml/dancer-oper-guide/cmodes.sgml
%%PORTDOCS%%%%DOCSDIR%%/sgml/dancer-oper-guide/commands.sgml
%%PORTDOCS%%%%DOCSDIR%%/sgml/dancer-oper-guide/config.sgml
%%PORTDOCS%%%%DOCSDIR%%/sgml/dancer-oper-guide/dancer-oper-guide.ced
%%PORTDOCS%%%%DOCSDIR%%/sgml/dancer-oper-guide/dancer-oper-guide.sgml
%%PORTDOCS%%%%DOCSDIR%%/sgml/dancer-oper-guide/intro.sgml
%%PORTDOCS%%%%DOCSDIR%%/sgml/dancer-oper-guide/umodes.sgml
%%PORTDOCS%%%%DOCSDIR%%/sgml/dancer-user-guide/Makefile
%%PORTDOCS%%%%DOCSDIR%%/sgml/dancer-user-guide/changes.sgml
%%PORTDOCS%%%%DOCSDIR%%/sgml/dancer-user-guide/channels.sgml
%%PORTDOCS%%%%DOCSDIR%%/sgml/dancer-user-guide/dancer-user-guide.ced
%%PORTDOCS%%%%DOCSDIR%%/sgml/dancer-user-guide/dancer-user-guide.sgml
%%PORTDOCS%%%%DOCSDIR%%/sgml/dancer-user-guide/intro.sgml
%%PORTDOCS%%%%DOCSDIR%%/sgml/dancer-user-guide/umodes.sgml
%%PORTDOCS%%%%DOCSDIR%%/sgml/fdl.sgml
%%PORTDOCS%%@dirrm %%DOCSDIR%%/sgml/dancer-user-guide
%%PORTDOCS%%@dirrm %%DOCSDIR%%/sgml/dancer-oper-guide
%%PORTDOCS%%@dirrm %%DOCSDIR%%/sgml
%%PORTDOCS%%@dirrm %%DOCSDIR%%/old
%%PORTDOCS%%@dirrm %%DOCSDIR%%/hybrid
%%PORTDOCS%%@dirrm %%DOCSDIR%%