aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile5
-rwxr-xr-xconfigure2
-rw-r--r--debian/README.Debian22
-rwxr-xr-xdebian/bitlbee.init82
-rw-r--r--debian/changelog307
-rw-r--r--debian/conffiles2
-rwxr-xr-xdebian/config19
-rw-r--r--debian/control13
-rw-r--r--debian/copyright418
-rw-r--r--debian/po/POTFILES.in1
-rw-r--r--debian/po/cs.po44
-rw-r--r--debian/po/de.po45
-rw-r--r--debian/po/es.po61
-rw-r--r--debian/po/fr.po44
-rw-r--r--debian/po/ja.po45
-rw-r--r--debian/po/nl.po44
-rw-r--r--debian/po/pt.po35
-rw-r--r--debian/po/pt_BR.po44
-rw-r--r--debian/po/sv.po43
-rw-r--r--debian/po/templates.pot41
-rw-r--r--debian/po/vi.po32
-rwxr-xr-xdebian/postinst68
-rwxr-xr-xdebian/postrm11
-rwxr-xr-xdebian/prerm8
-rwxr-xr-xdebian/rules83
-rw-r--r--debian/templates8
-rw-r--r--help.c13
-rw-r--r--help.h2
-rw-r--r--lib/Makefile1
-rw-r--r--protocols/Makefile1
-rw-r--r--protocols/jabber/Makefile1
-rw-r--r--protocols/msn/Makefile1
-rw-r--r--protocols/oscar/Makefile1
-rw-r--r--protocols/yahoo/Makefile1
-rw-r--r--set.h7
-rw-r--r--storage_xml.c4
-rw-r--r--tests/Makefile2
-rw-r--r--tests/check.c28
-rw-r--r--tests/check_crypting.c47
-rw-r--r--tests/check_help.c30
-rw-r--r--tests/check_set.c130
-rw-r--r--tests/check_user.c75
-rw-r--r--tests/check_util.c66
-rw-r--r--tests/testsuite.h3
-rw-r--r--unix.c2
-rw-r--r--user.h4
46 files changed, 1931 insertions, 15 deletions
diff --git a/Makefile b/Makefile
index 811e96be..f32dae84 100644
--- a/Makefile
+++ b/Makefile
@@ -49,9 +49,14 @@ distclean: clean $(subdirs)
check: all
$(MAKE) -C tests
+lcov:
gcov: check
gcov *.c
+lcov: check
+ lcov --directory . --capture --output-file bitlbee.info
+ genhtml -o coverage bitlbee.info
+
install-doc:
$(MAKE) -C doc install
diff --git a/configure b/configure
index bb7ddd7d..fec7544e 100755
--- a/configure
+++ b/configure
@@ -71,8 +71,6 @@ Option Description Default
--ipv6=0/1 IPv6 socket support $ipv6
---ldap=0/1/auto LDAP support $ldap
-
--events=... Event handler (glib, libevent) $events
--ssl=... SSL library to use (gnutls, nss, openssl, bogus, auto)
$ssl
diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 00000000..e2102fc8
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,22 @@
+ *** NEWS (Version 1.1 and later) ***
+
+Starting from version 1.1, BitlBee has a forking daemon mode. The Debian
+package now uses this mode by default, instead of inetd mode. If you don't
+want to use this, you can disable the init scripts (best way to do this is
+by editing /etc/default/bitlbee) and restore the inetd.conf entry. This
+should be necessary only once, it won't be touched during upgrades.
+
+--------------------------------------------------------------------------
+
+Debconf should have asked you on what port you want BitlBee to run. If it
+did not, the port number should be 6667 or 6668. (6668 if you already got
+something running at 6667)
+
+Fire up your favourite IRC client and connect to localhost:6667 (or 6668),
+and read the documentation (type help for a list of commands).
+
+Have fun!
+
+The /usr/share/doc/bitlbee/examples/ directory contains some programs and
+scripts you might like or need. They're not really examples but it's quite
+normal behaviour to put small contrib stuff like that in there.
diff --git a/debian/bitlbee.init b/debian/bitlbee.init
new file mode 100755
index 00000000..baf1a0c6
--- /dev/null
+++ b/debian/bitlbee.init
@@ -0,0 +1,82 @@
+#! /bin/sh
+#
+# Init script for BitlBee Debian package. Based on skeleton init script:
+#
+# Version: @(#)skeleton 2.85-23 28-Jul-2004 miquels@cistron.nl
+#
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DESC="BitlBee IRC/IM gateway"
+NAME=bitlbee
+DAEMON=/usr/sbin/$NAME
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+
+# Gracefully exit if the package has been removed.
+[ -x $DAEMON ] || exit 0
+
+# Default value
+BITLBEE_PORT=6667
+DAEMON_OPT=-F
+
+# Read config file if it is present.
+if [ -r /etc/default/$NAME ]; then
+ . /etc/default/$NAME
+fi
+
+[ "$BITLBEE_DISABLED" = "1" ] && exit 0
+
+
+#
+# Function that starts the daemon/service.
+#
+d_start() {
+ # Make sure BitlBee can actually write its PID...
+ touch /var/run/bitlbee.pid
+ chown bitlbee /var/run/bitlbee.pid
+
+ start-stop-daemon --start --quiet --pidfile $PIDFILE \
+ -c bitlbee -g nogroup \
+ --exec $DAEMON -- -p $BITLBEE_PORT -P $PIDFILE $DAEMON_OPT
+}
+
+#
+# Function that stops the daemon/service.
+#
+d_stop() {
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE \
+ --name $NAME
+}
+
+
+case "$1" in
+ start)
+ echo -n "Starting $DESC: $NAME"
+ d_start
+ echo "."
+ ;;
+ stop)
+ echo -n "Stopping $DESC: $NAME"
+ d_stop
+ echo "."
+ ;;
+ #reload)
+ #
+ # No reload target, but there's a REHASH command which we
+ # might use later...
+ #
+ #;;
+ restart|force-reload)
+ echo -n "Restarting $DESC: $NAME"
+ d_stop
+ sleep 1
+ d_start
+ echo "."
+ ;;
+ *)
+ echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 00000000..ae524f73
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,307 @@
+bitlbee (1.1.1dev-0pre) unstable; urgency=low
+
+ * Switched to the new forking daemon mode. Added /etc/default/bitlbee
+ file, an init script. People who want to stick with inetd can do so, see
+ the defaults file.
+ * Got rid of debconf Woody compatibility stuff.
+ * No more MPL code in BitlBee, thanks to the Jabber module rewrite!
+
+ -- Wilmer van der Gaast <wilmer@gaast.net> Fri, 06 Jul 2007 09:09:36 +0100
+
+bitlbee (1.0.3-1.3) unstable; urgency=low
+
+ * Non-maintainer upload to fix a minor error.
+ * Remove extra debian/#rules#
+
+ -- Christian Perrier <bubulle@debian.org> Tue, 20 Feb 2007 07:49:18 +0100
+
+bitlbee (1.0.3-1.2) unstable; urgency=low
+
+ * Non-maintainer upload to fix pending l10n issues.
+ * Debconf translations:
+ - Portuguese. Closes: #386348
+
+ -- Christian Perrier <bubulle@debian.org> Sun, 18 Feb 2007 20:23:28 +0100
+
+bitlbee (1.0.3-1.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * debian/control: Replace netkit-inetd dependency with a versioned
+ dependency on netbase. netbase provides the appropriate inetd
+ dependency. Closes: #382682.
+
+ -- Roger Leigh <rleigh@debian.org> Sun, 20 Aug 2006 17:07:02 +0100
+
+bitlbee (1.0.3-1) unstable; urgency=low
+
+ * New upstream release.
+
+ -- Wilmer van der Gaast <wilmer@gaast.net> Sat, 8 Jul 2006 11:32:57 +0200
+
+bitlbee (1.0.2-2) unstable; urgency=low
+
+ * Added a po-debconf build-dependency, which I forgot when removing the
+ Woody hack from 1.0.2-1. (Closes: #361503)
+
+ -- Wilmer van der Gaast <wilmer@gaast.net> Sat, 8 Apr 2006 22:09:19 +0200
+
+bitlbee (1.0.2-1) unstable; urgency=low
+
+ * New upstream release.
+ * Avoids calling update-inetd if it's unavailable. (Closes: #350463)
+ * Also using userdel instead of deluser now to avoid another bug. :-)
+ * Only creates an inetd.conf entry when installing for the first time.
+ (Closes: #349570) (This unfortunately breaks dpkg-reconfigure, but at
+ least there's a warning...)
+
+ -- Wilmer van der Gaast <wilmer@gaast.net> Sat, 8 Apr 2006 14:17:52 +0200
+
+bitlbee (1.0.1-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Wilmer van der Gaast <wilmer@gaast.net> Tue, 17 Jan 2006 17:26:20 +0100
+
+bitlbee (1.0-1) unstable; urgency=low
+
+ * New upstream release
+ * bitlbee has a useless Build-Depends: on debconf-2.0 (Closes:
+ #341783)
+
+ -- Wilmer van der Gaast <wilmer@gaast.net> Mon, 5 Dec 2005 17:59:07 +0100
+
+bitlbee (0.99-1) unstable; urgency=low
+
+ * Should build on Debian GNU/kFreeBSD now. (Closes: #336965)
+ * New upstream version.
+
+ -- Wilmer van der Gaast <wilmer@gaast.net> Thu, 3 Nov 2005 21:06:53 +0100
+
+bitlbee (0.93a-1) unstable; urgency=low
+
+ * Added Swedish and Spanish translations. (Closes: #333881, #331302)
+ * Changed debconf dependency. (Closes: #331762)
+ * Changed libgnutls dependency. (Closes: #335751)
+ * Fixed one crash-on-disconnect bug in the OSCAR module.
+
+ -- Wilmer van der Gaast <wilmer@gaast.net> Tue, 1 Nov 2005 18:25:56 +0100
+
+bitlbee (0.92-2) unstable; urgency=low
+
+ * Added the patch that allows to connect to alternate Jabber servers.
+ Necessary for connecting to Google Talk. (Closes: #324832)
+ * Also possibly fixes some more problems with losing data when disk is
+ full.
+ * Added Vietnamese and Brazilian DebConf translations. Sorry for being
+ so late. (Closes: #297058, #313158)
+
+ -- Wilmer van der Gaast <lintux@debian.org> Thu, 8 Sep 2005 19:55:56 +0200
+
+bitlbee (0.92-1) unstable; urgency=low
+
+ * New upstream release.
+ * Implemented support for the IRC WATCH command and got rid of the
+ IRC_MAX_ARGS limit. (Closes: #283504)
+ * Added Czech translation. (Closes: #293615)
+
+ -- Wilmer van der Gaast <lintux@debian.org> Thu, 24 Feb 2005 17:11:32 +0100
+
+bitlbee (0.91-3) unstable; urgency=low
+
+ * Fixed a small bug in postrm which caused problems when removing/upgrading.
+
+ -- Wilmer van der Gaast <lintux@debian.org> Sun, 10 Oct 2004 08:59:52 +0200
+
+bitlbee (0.91-2) unstable; urgency=low
+
+ * Removed the part that messes with tcpd configuration files because it
+ causes troubles for some people and because it's no problem for users
+ to edit those files by hand. (Closes: #275418)
+ When upgrading from previous versions, the bitlbee line won't be removed
+ from your tcpd conffiles. (This is only done when purging a BitlBee
+ install) You don't have to worry about BitlBee suddenly opening for the
+ whole world because of the removal of this feature.
+ * Updated German translation. (Closes: #274655)
+ * Removed the unreliable check for an existing BitlBee installation (a
+ /etc/passwd grep) and replaced it with something more reliable.
+
+ -- Wilmer van der Gaast <lintux@debian.org> Sat, 9 Oct 2004 19:06:33 +0200
+
+bitlbee (0.91-1) unstable; urgency=low
+
+ * info-command works for Jabber connections now. (Closes: #232712)
+ * Saner code for duplicate nickname prevention. (Closes: #234285)
+ * Support for Jabber connections over SSL. (Closes: #252458)
+ * If the user chooses for noinetd.conf installation, this setting is now
+ remembered during reinstalls. (Closes: #260533)
+ * An up-to-date Japanse DebConf template. (Closes: #271091)
+
+ -- Wilmer van der Gaast <lintux@debian.org> Sat, 25 Sep 2004 18:18:17 +0200
+
+bitlbee (0.90a-2) unstable; urgency=low
+
+ * Using libgnutls11 now. (Closes: #264740)
+ * postinst no longer appends newlines to hosts.* because grep already
+ makes sure the last line is terminated with a newline. (Closes: #253278)
+ * Added Japanese DebConf templates. (Closes: #259801)
+ * Installing BitlBee in inetd.conf is now optional. (Closes: #260533)
+
+ -- Wilmer van der Gaast <lintux@debian.org> Mon, 6 Sep 2004 20:04:22 +0200
+
+bitlbee (0.90a-1) unstable; urgency=low
+
+ * New upstream release.
+
+ -- Wilmer van der Gaast <lintux@debian.org> Mon, 28 Jun 2004 20:30:26 +0200
+
+bitlbee (0.90-1) unstable; urgency=low
+
+ * New upstream release.
+ * Added German DebConf translation. (Closes: #250787)
+
+ -- Wilmer van der Gaast <lintux@debian.org> Sat, 29 May 2004 11:51:56 +0200
+
+bitlbee (0.85a-1) unstable; urgency=low
+
+ * New upstream release. This one should fix build problems on arm.
+
+ -- Wilmer van der Gaast <lintux@debian.org> Thu, 25 Mar 2004 00:12:33 +0100
+
+bitlbee (0.85-1) unstable; urgency=low
+
+ * New upstream release.
+ * This version has a command line switch to specify alternate configuration
+ files/settings directories. (Closes: #207060)
+
+ -- Wilmer van der Gaast <lintux@debian.org> Sat, 13 Mar 2004 22:19:35 +0100
+
+bitlbee (0.84-2) unstable; urgency=low
+
+ * Converted debconf templates to po2debconf format, without breaking
+ building on older (non-po2debconf) systems. Thanks to Martin Quinson.
+ (Closes: #205816)
+ * Added French debconf templates. Thanks to Christian Perrier.
+ (Closes: #206593)
+
+ -- Wilmer van der Gaast <lintux@debian.org> Wed, 3 Mar 2004 21:19:12 +0100
+
+bitlbee (0.84-1) unstable; urgency=low
+
+ * New upstream release.
+
+ -- Wilmer van der Gaast <lintux@debian.org> Fri, 13 Feb 2004 20:13:53 +0100
+
+bitlbee (0.83-2) unstable; urgency=low
+
+ * Removed libsoup dependency, BitlBee now uses libgnutls directly.
+ (Closes: #208475, #230895)
+ * Now including preprocessed documentation files to save some time on
+ slow buildd's (and fix build problems on archs without a working
+ sgmltools package).
+
+ -- Wilmer van der Gaast <lintux@debian.org> Fri, 6 Feb 2004 01:26:27 +0100
+
+bitlbee (0.83-1) unstable; urgency=low
+
+ * Added bitlbee.conf to conffiles. Should've done that before, sorry.
+ * Sorry, still with MSN support disabled, because Debian's default
+ libsoup package won't work with BitlBee-MSN.
+
+ -- Wilmer van der Gaast <lintux@debian.org> Wed, 31 Dec 2003 00:56:57 +0100
+
+bitlbee (0.82-1) unstable; urgency=low
+
+ * New upstream release.
+ * Disabled MSN support in the Debian version for now, because it needs
+ a patched version of libsoup. If you want MSN support, you'll have to
+ create one yourself and install a patched version of libsoup.
+
+ -- Wilmer van der Gaast <lintux@debian.org> Fri, 31 Oct 2003 21:51:01 +0100
+
+bitlbee (0.81a-1) unstable; urgency=low
+
+ * New upstream release.
+
+ -- Wilmer van der Gaast <lintux@debian.org> Wed, 16 Oct 2003 16:21:31 +0200
+
+bitlbee (0.81-1) unstable; urgency=low
+
+ * New upstream release.
+ * Fixes Yahoo! problems. (Closes: #213876)
+
+ -- Wilmer van der Gaast <lintux@debian.org> Wed, 15 Oct 2003 16:00:00 +0200
+
+bitlbee (0.80-1) unstable; urgency=low
+
+ * New upstream release.
+ * preinst now unlinks the old helpfile while upgrading, see README.Debian
+ for details.
+ * 'Upgraded' to standards 3.5.9.
+ * "jabber: Non-ascii away messages not supported" patch included.
+ (Closes: #195852)
+
+ -- Wilmer van der Gaast <lintux@debian.org> Tue, 24 Jun 2003 20:00:00 +0200
+
+bitlbee (0.74a-1) unstable; urgency=low
+
+ * This one actually does contain the bugfix 0.74 should've had.
+
+ -- Wilmer van der Gaast <lintux@debian.org> Wed, 11 Jun 2003 13:44:01 +0200
+
+bitlbee (0.74-1) unstable; urgency=high
+
+ * Security release, fixing a little not-too-dangerous security bug.
+
+ -- Wilmer van der Gaast <lintux@debian.org> Tue, 10 Jun 2003 22:50:19 +0200
+
+bitlbee (0.73-1) unstable; urgency=low
+
+ * New upstream release.
+
+ -- Wilmer van der Gaast <lintux@debian.org> Sun, 13 Apr 2003 01:20:49 +0200
+
+bitlbee (0.72-2) unstable; urgency=low
+
+ * Now uses '127.0.0.1' as default for hosts.allow instead of 'localhost'.
+ (Closes: #174219)
+ * Fixed some other portability issues. (Closes: #177394)
+ * Added w3m builddep, needed for .txt documentation generation.
+ * Removed jadetex builddep because it seems not to be necessary after all.
+
+ -- Wilmer van der Gaast <lintux@debian.org> Tue, 21 Jan 2003 01:35:46 +0100
+
+bitlbee (0.72-1) unstable; urgency=low
+
+ * BitlBee doesn't have tcpd in it anymore; external tcpd is used now.
+ * Added an examples/ directory.
+ * Fixed arm/ppc/s390 portability issue on char signedness. (Closes: #161026)
+
+ -- Wilmer van der Gaast <lintux@debian.org> Thu, 19 Dec 2002 00:24:29 +0100
+
+bitlbee (0.71-1) unstable; urgency=low
+
+ * New upstream release.
+
+ -- Wilmer van der Gaast <lintux@debian.org> Mon, 16 Sep 2002 01:02:09 +0200
+
+bitlbee (0.7-2) unstable; urgency=low
+
+ * Second try at a good upload.
+
+ -- Wilmer van der Gaast <lintux@debian.org> Thu, 15 Aug 2002 20:14:54 +0200
+
+bitlbee (0.7-1) unstable; urgency=low
+
+ * First public release. (Closes: #153190)
+
+ -- Wilmer van der Gaast <lintux@debian.org> Sat, 10 Aug 2002 04:47:07 +0200
+
+bitlbee (0.6-1) unstable; urgency=low
+
+ * Initial Release. (Testing only, not for release.)
+
+ -- Wilmer van der Gaast <lintux@debian.org> Wed, 10 Jul 2002 11:02:28 +0200
+
+Local variables:
+mode: debian-changelog
+End:
diff --git a/debian/conffiles b/debian/conffiles
new file mode 100644
index 00000000..2ccc958d
--- /dev/null
+++ b/debian/conffiles
@@ -0,0 +1,2 @@
+/etc/bitlbee/motd.txt
+/etc/bitlbee/bitlbee.conf
diff --git a/debian/config b/debian/config
new file mode 100755
index 00000000..3a04813d
--- /dev/null
+++ b/debian/config
@@ -0,0 +1,19 @@
+#!/bin/sh -e
+
+. /usr/share/debconf/confmodule
+
+db_title BitlBee
+
+db_get bitlbee/serveport
+if [ "$RET" = "stillhavetoask" ]; then
+ if netstat -ltn | grep ':6667' 2> /dev/null > /dev/null; then
+ port=6668;
+ else
+ port=6667;
+ fi
+ db_set bitlbee/serveport $port;
+fi
+
+if db_input medium bitlbee/serveport; then
+ db_go;
+fi
diff --git a/debian/control b/debian/control
new file mode 100644
index 00000000..139174a6
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,13 @@
+Source: bitlbee
+Section: net
+Priority: optional
+Maintainer: Wilmer van der Gaast <wilmer@gaast.net>
+Standards-Version: 3.5.9
+Build-Depends: libglib2.0-dev | libglib-dev, libgnutls-dev | libnss-dev (>= 1.6), debconf-2.0, po-debconf
+
+Package: bitlbee
+Architecture: any
+Depends: ${shlibs:Depends}, adduser, net-tools, ${debconf-depends}, debianutils (>= 1.16)
+Description: An IRC to other chat networks gateway
+ This program can be used as an IRC server which forwards everything you
+ say to people on other chat networks: Jabber, ICQ, AIM, MSN and Yahoo.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 00000000..3f2ecc8e
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,418 @@
+This package was debianized by Wilmer van der Gaast <lintux@debian.org> on
+Mon, 8 Jul 2002 13:17:42 +0200.
+
+The source can be downloaded from http://www.bitlbee.org/
+
+Authors: Wilmer van der Gaast, Sjoerd Hemminga, Jelmer Vernooij,
+ Maurits Dijkstra and others.
+
+Mainly Copyright 2002-2004 Wilmer van der Gaast.
+Some parts are borrowed from Gaim (version 0.58) <http://gaim.sf.net/>.
+For the copyrights on those parts, please read the Gaim source code.
+
+BitlBee License:
+
+============================================================================
+ 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 with
+ the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL;
+ if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+ Suite 330, Boston, MA 02111-1307 USA
+============================================================================
+
+
+
+The MD5 generator used for authentication in some modules is written by
+Aladdin Enterprises:
+
+============================================================================
+ Copyright (C) 1999 Aladdin Enterprises. All rights reserved.
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+============================================================================
+
+
+
+The SGML-formatted documentation is written by Jelmer Vernooij
+<jelmer@nl.linux.org> under the GNU Free Documentation License:
+
+============================================================================
+ GNU Free Documentation License
+ Version 1.1, March 2000
+
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+0. PREAMBLE
+
+The purpose of this License is to make a manual, textbook, or other
+written document "free" in the sense of freedom: to assure everyone
+the effective freedom to copy and redistribute it, with or without
+modifying it, either commercially or noncommercially. Secondarily,
+this License preserves for the author and publisher a way to get
+credit for their work, while not being considered responsible for
+modifications made by others.
+
+This License is a kind of "copyleft", which means that derivative
+works of the document must themselves be free in the same sense. It
+complements the GNU General Public License, which is a copyleft
+license designed for free software.
+
+We have designed this License in order to use it for manuals for free
+software, because free software needs free documentation: a free
+program should come with manuals providing the same freedoms that the
+software does. But this License is not limited to software manuals;
+it can be used for any textual work, regardless of subject matter or
+whether it is published as a printed book. We recommend this License
+principally for works whose purpose is instruction or reference.
+
+
+1. APPLICABILITY AND DEFINITIONS
+
+This License applies to any manual or other work that contains a
+notice placed by the copyright holder saying it can be distributed
+under the terms of this License. The "Document", below, refers to any
+such manual or work. Any member of the public is a licensee, and is
+addressed as "you".
+
+A "Modified Version" of the Document means any work containing the
+Document or a portion of it, either copied verbatim, or with
+modifications and/or translated into another language.
+
+A "Secondary Section" is a named appendix or a front-matter section of
+the Document that deals exclusively with the relationship of the
+publishers or authors of the Document to the Document's overall subject
+(or to related matters) and contains nothing that could fall directly
+within that overall subject. (For example, if the Document is in part a
+textbook of mathematics, a Secondary Section may not explain any
+mathematics.) The relationship could be a matter of historical
+connection with the subject or with related matters, or of legal,
+commercial, philosophical, ethical or political position regarding
+them.
+
+The "Invariant Sections" are certain Secondary Sections whose titles
+are designated, as being those of Invariant Sections, in the notice
+that says that the Document is released under this License.
+
+The "Cover Texts" are certain short passages of text that are listed,
+as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+the Document is released under this License.
+
+A "Transparent" copy of the Document means a machine-readable copy,
+represented in a format whose specification is available to the
+general public, whose contents can be viewed and edited directly and
+straightforwardly with generic text editors or (for images composed of
+pixels) generic paint programs or (for drawings) some widely available
+drawing editor, and that is suitable for input to text formatters or
+for automatic translation to a variety of formats suitable for input
+to text formatters. A copy made in an otherwise Transparent file
+format whose markup has been designed to thwart or discourage
+subsequent modification by readers is not Transparent. A copy that is
+not "Transparent" is called "Opaque".
+
+Examples of suitable formats for Transparent copies include plain
+ASCII without markup, Texinfo input format, LaTeX input format, SGML
+or XML using a publicly available DTD, and standard-conforming simple
+HTML designed for human modification. Opaque formats include
+PostScript, PDF, proprietary formats that can be read and edited only
+by proprietary word processors, SGML or XML for which the DTD and/or
+processing tools are not generally available, and the
+machine-generated HTML produced by some word processors for output
+purposes only.
+
+The "Title Page" means, for a printed book, the title page itself,
+plus such following pages as are needed to hold, legibly, the material
+this License requires to appear in the title page. For works in
+formats which do not have any title page as such, "Title Page" means
+the text near the most prominent appearance of the work's title,
+preceding the beginning of the body of the text.
+
+
+2. VERBATIM COPYING
+
+You may copy and distribute the Document in any medium, either
+commercially or noncommercially, provided that this License, the
+copyright notices, and the license notice saying this License applies
+to the Document are reproduced in all copies, and that you add no other
+conditions whatsoever to those of this License. You may not use
+technical measures to obstruct or control the reading or further
+copying of the copies you make or distribute. However, you may accept
+compensation in exchange for copies. If you distribute a large enough
+number of copies you must also follow the conditions in section 3.
+
+You may also lend copies, under the same conditions stated above, and
+you may publicly display copies.
+
+
+3. COPYING IN QUANTITY
+
+If you publish printed copies of the Document numbering more than 100,
+and the Document's license notice requires Cover Texts, you must enclose
+the copies in covers that carry, clearly and legibly, all these Cover
+Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+the back cover. Both covers must also clearly and legibly identify
+you as the publisher of these copies. The front cover must present
+the full title with all words of the title equally prominent and
+visible. You may add other material on the covers in addition.
+Copying with changes limited to the covers, as long as they preserve
+the title of the Document and satisfy these conditions, can be treated
+as verbatim copying in other respects.
+
+If the required texts for either cover are too voluminous to fit
+legibly, you should put the first ones listed (as many as fit
+reasonably) on the actual cover, and continue the rest onto adjacent
+pages.
+
+If you publish or distribute Opaque copies of the Document numbering
+more than 100, you must either include a machine-readable Transparent
+copy along with each Opaque copy, or state in or with each Opaque copy
+a publicly-accessible computer-network location containing a complete
+Transparent copy of the Document, free of added material, which the
+general network-using public has access to download anonymously at no
+charge using public-standard network protocols. If you use the latter
+option, you must take reasonably prudent steps, when you begin
+distribution of Opaque copies in quantity, to ensure that this
+Transparent copy will remain thus accessible at the stated location
+until at least one year after the last time you distribute an Opaque
+copy (directly or through your agents or retailers) of that edition to
+the public.
+
+It is requested, but not required, that you contact the authors of the
+Document well before redistributing any large number of copies, to give
+them a chance to provide you with an updated version of the Document.
+
+
+4. MODIFICATIONS
+
+You may copy and distribute a Modified Version of the Document under
+the conditions of sections 2 and 3 above, provided that you release
+the Modified Version under precisely this License, with the Modified
+Version filling the role of the Document, thus licensing distribution
+and modification of the Modified Version to whoever possesses a copy
+of it. In addition, you must do these things in the Modified Version:
+
+A. Use in the Title Page (and on the covers, if any) a title distinct
+ from that of the Document, and from those of previous versions
+ (which should, if there were any, be listed in the History section
+ of the Document). You may use the same title as a previous version
+ if the original publisher of that version gives permission.
+B. List on the Title Page, as authors, one or more persons or entities
+ responsible for authorship of the modifications in the Modified
+ Version, together with at least five of the principal authors of the
+ Document (all of its principal authors, if it has less than five).
+C. State on the Title page the name of the publisher of the
+ Modified Version, as the publisher.
+D. Preserve all the copyright notices of the Document.
+E. Add an appropriate copyright notice for your modifications
+ adjacent to the other copyright notices.
+F. Include, immediately after the copyright notices, a license notice
+ giving the public permission to use the Modified Version under the
+ terms of this License, in the form shown in the Addendum below.
+G. Preserve in that license notice the full lists of Invariant Sections
+ and required Cover Texts given in the Document's license notice.
+H. Include an unaltered copy of this License.
+I. Preserve the section entitled "History", and its title, and add to
+ it an item stating at least the title, year, new authors, and
+ publisher of the Modified Version as given on the Title Page. If
+ there is no section entitled "History" in the Document, create one
+ stating the title, year, authors, and publisher of the Document as
+ given on its Title Page, then add an item describing the Modified
+ Version as stated in the previous sentence.
+J. Preserve the network location, if any, given in the Document for
+ public access to a Transparent copy of the Document, and likewise
+ the network locations given in the Document for previous versions
+ it was based on. These may be placed in the "History" section.
+ You may omit a network location for a work that was published at
+ least four years before the Document itself, or if the original
+ publisher of the version it refers to gives permission.
+K. In any section entitled "Acknowledgements" or "Dedications",
+ preserve the section's title, and preserve in the section all the
+ substance and tone of each of the contributor acknowledgements
+ and/or dedications given therein.
+L. Preserve all the Invariant Sections of the Document,
+ unaltered in their text and in their titles. Section numbers
+ or the equivalent are not considered part of the section titles.
+M. Delete any section entitled "Endorsements". Such a section
+ may not be included in the Modified Version.
+N. Do not retitle any existing section as "Endorsements"
+ or to conflict in title with any Invariant Section.
+
+If the Modified Version includes new front-matter sections or
+appendices that qualify as Secondary Sections and contain no material
+copied from the Document, you may at your option designate some or all
+of these sections as invariant. To do this, add their titles to the
+list of Invariant Sections in the Modified Version's license notice.
+These titles must be distinct from any other section titles.
+
+You may add a section entitled "Endorsements", provided it contains
+nothing but endorsements of your Modified Version by various
+parties--for example, statements of peer review or that the text has
+been approved by an organization as the authoritative definition of a
+standard.
+
+You may add a passage of up to five words as a Front-Cover Text, and a
+passage of up to 25 words as a Back-Cover Text, to the end of the list
+of Cover Texts in the Modified Version. Only one passage of
+Front-Cover Text and one of Back-Cover Text may be added by (or
+through arrangements made by) any one entity. If the Document already
+includes a cover text for the same cover, previously added by you or
+by arrangement made by the same entity you are acting on behalf of,
+you may not add another; but you may replace the old one, on explicit
+permission from the previous publisher that added the old one.
+
+The author(s) and publisher(s) of the Document do not by this License
+give permission to use their names for publicity for or to assert or
+imply endorsement of any Modified Version.
+
+
+5. COMBINING DOCUMENTS
+
+You may combine the Document with other documents released under this
+License, under the terms defined in section 4 above for modified
+versions, provided that you include in the combination all of the
+Invariant Sections of all of the original documents, unmodified, and
+list them all as Invariant Sections of your combined work in its
+license notice.
+
+The combined work need only contain one copy of this License, and
+multiple identical Invariant Sections may be replaced with a single
+copy. If there are multiple Invariant Sections with the same name but
+different contents, make the title of each such section unique by
+adding at the end of it, in parentheses, the name of the original
+author or publisher of that section if known, or else a unique number.
+Make the same adjustment to the section titles in the list of
+Invariant Sections in the license notice of the combined work.
+
+In the combination, you must combine any sections entitled "History"
+in the various original documents, forming one section entitled
+"History"; likewise combine any sections entitled "Acknowledgements",
+and any sections entitled "Dedications". You must delete all sections
+entitled "Endorsements."
+
+
+6. COLLECTIONS OF DOCUMENTS
+
+You may make a collection consisting of the Document and other documents
+released under this License, and replace the individual copies of this
+License in the various documents with a single copy that is included in
+the collection, provided that you follow the rules of this License for
+verbatim copying of each of the documents in all other respects.
+
+You may extract a single document from such a collection, and distribute
+it individually under this License, provided you insert a copy of this
+License into the extracted document, and follow this License in all
+other respects regarding verbatim copying of that document.
+
+
+7. AGGREGATION WITH INDEPENDENT WORKS
+
+A compilation of the Document or its derivatives with other separate
+and independent documents or works, in or on a volume of a storage or
+distribution medium, does not as a whole count as a Modified Version
+of the Document, provided no compilation copyright is claimed for the
+compilation. Such a compilation is called an "aggregate", and this
+License does not apply to the other self-contained works thus compiled
+with the Document, on account of their being thus compiled, if they
+are not themselves derivative works of the Document.
+
+If the Cover Text requirement of section 3 is applicable to these
+copies of the Document, then if the Document is less than one quarter
+of the entire aggregate, the Document's Cover Texts may be placed on
+covers that surround only the Document within the aggregate.
+Otherwise they must appear on covers around the whole aggregate.
+
+
+8. TRANSLATION
+
+Translation is considered a kind of modification, so you may
+distribute translations of the Document under the terms of section 4.
+Replacing Invariant Sections with translations requires special
+permission from their copyright holders, but you may include
+translations of some or all Invariant Sections in addition to the
+original versions of these Invariant Sections. You may include a
+translation of this License provided that you also include the
+original English version of this License. In case of a disagreement
+between the translation and the original English version of this
+License, the original English version will prevail.
+
+
+9. TERMINATION
+
+You may not copy, modify, sublicense, or distribute the Document except
+as expressly provided for under this License. Any other attempt to
+copy, modify, sublicense or distribute the Document is void, and will
+automatically terminate your rights under this License. However,
+parties who have received copies, or rights, from you under this
+License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+
+10. FUTURE REVISIONS OF THIS LICENSE
+
+The Free Software Foundation may publish new, revised versions
+of the GNU Free Documentation License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns. See
+http://www.gnu.org/copyleft/.
+
+Each version of the License is given a distinguishing version number.
+If the Document specifies that a particular numbered version of this
+License "or any later version" applies to it, you have the option of
+following the terms and conditions either of that specified version or
+of any later version that has been published (not as a draft) by the
+Free Software Foundation. If the Document does not specify a version
+number of this License, you may choose any version ever published (not
+as a draft) by the Free Software Foundation.
+
+
+ADDENDUM: How to use this License for your documents
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and
+license notices just after the title page:
+
+ Copyright (c) YEAR YOUR NAME.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1
+ or any later version published by the Free Software Foundation;
+ with the Invariant Sections being LIST THEIR TITLES, with the
+ Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
+ A copy of the license is included in the section entitled "GNU
+ Free Documentation License".
+
+If you have no Invariant Sections, write "with no Invariant Sections"
+instead of saying which ones are invariant. If you have no
+Front-Cover Texts, write "no Front-Cover Texts" instead of
+"Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
+
+If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License,
+to permit their use in free software.
+============================================================================
diff --git a/debian/po/POTFILES.in b/debian/po/POTFILES.in
new file mode 100644
index 00000000..f17ddcfe
--- /dev/null
+++ b/debian/po/POTFILES.in
@@ -0,0 +1 @@
+[type: gettext/rfc822deb] bitlbee.templates.master
diff --git a/debian/po/cs.po b/debian/po/cs.po
new file mode 100644
index 00000000..558c8602
--- /dev/null
+++ b/debian/po/cs.po
@@ -0,0 +1,44 @@
+#
+# Translators, if you are not familiar with the PO format, gettext
+# documentation is worth reading, especially sections dedicated to
+# this format, e.g. by running:
+# info -n '(gettext)PO Files'
+# info -n '(gettext)Header Entry'
+#
+# Some information specific to po-debconf are available at
+# /usr/share/doc/po-debconf/README-trans
+# or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+# Developers do not need to manually edit POT or PO files.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: bitlbee\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2004-09-25 18:12+0200\n"
+"PO-Revision-Date: 2005-02-04 12:31+0100\n"
+"Last-Translator: Miroslav Kure <kurem@debian.cz>\n"
+"Language-Team: Czech <debian-l10n-czech@debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-2\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: string
+#. Description
+#: ../bitlbee.templates.master:4
+msgid "On what TCP port should BitlBee listen for connections?"
+msgstr "Na kterém TCP portu má BitlBee naslouchat pøíchozím spojením?"
+
+#. Type: string
+#. Description
+#: ../bitlbee.templates.master:4
+msgid ""
+"BitlBee normally listens on the regular IRC port, 6667. This might not be a "
+"very good idea when you're running a real IRC daemon as well. 6668 might be "
+"a good alternative. Leaving this value blank means that BitlBee will not be "
+"run automatically."
+msgstr ""
+"BitlBee normálnì naslouchá na bì¾ném IRC portu 6667. Pokud máte spu¹tìný i "
+"reálný IRC daemon, tak to nemusí být nejlep¹í nápad. Vhodná alternativa mù¾e "
+"být 6668. Ponecháte-li pole prázdné, znamená to, ¾e se BitlBee nebude "
+"spou¹tìt automaticky."
diff --git a/debian/po/de.po b/debian/po/de.po
new file mode 100644
index 00000000..2264bf27
--- /dev/null
+++ b/debian/po/de.po
@@ -0,0 +1,45 @@
+#
+# Translators, if you are not familiar with the PO format, gettext
+# documentation is worth reading, especially sections dedicated to
+# this format, e.g. by running:
+# info -n '(gettext)PO Files'
+# info -n '(gettext)Header Entry'
+# Some information specific to po-debconf are available at
+# /usr/share/doc/po-debconf/README-trans
+# or http://www.debian.org/intl/l10n/po-debconf/README-trans#
+# Developers do not need to manually edit POT or PO files.
+# Erik Schanze <mail@erikschanze.de>, 2004.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: bitlbee_0.90a-2_de\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2004-09-25 18:12+0200\n"
+"PO-Revision-Date: 2004-10-03 14:33+0200\n"
+"Last-Translator: Erik Schanze <mail@erikschanze.de>\n"
+"Language-Team: German <debian-l10n-german@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.3.1\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. Type: string
+#. Description
+#: ../bitlbee.templates.master:4
+msgid "On what TCP port should BitlBee listen for connections?"
+msgstr "An welchem TCP-Port soll BitlBee auf Verbindungen warten?"
+
+#. Type: string
+#. Description
+#: ../bitlbee.templates.master:4
+msgid ""
+"BitlBee normally listens on the regular IRC port, 6667. This might not be a "
+"very good idea when you're running a real IRC daemon as well. 6668 might be "
+"a good alternative. Leaving this value blank means that BitlBee will not be "
+"run automatically."
+msgstr ""
+"BitlBee lauscht normalerweise an dem üblichen IRC-Port 6667. Dies ist aber "
+"keine gute Idee, wenn Sie außerdem noch einen richtigen IRC-Dienst "
+"betreiben. Das Port 6668 ist eine gute Alternative. Wenn Sie keinen Wert "
+"eingeben, wird BitlBee nicht automatisch starten."
diff --git a/debian/po/es.po b/debian/po/es.po
new file mode 100644
index 00000000..44c525b9
--- /dev/null
+++ b/debian/po/es.po
@@ -0,0 +1,61 @@
+# bitlbee po-debconf translation to Spanish
+# Copyright (C) 2005 Software in the Public Interest
+# This file is distributed under the same license as the bitlbee package.
+#
+# Changes:
+# - Initial translation
+# César Gómez Martín <cesar.gomez@gmail.com>
+#
+#
+# Traductores, si no conoce el formato PO, merece la pena leer la
+# documentación de gettext, especialmente las secciones dedicadas a este
+# formato, por ejemplo ejecutando:
+# info -n '(gettext)PO Files'
+# info -n '(gettext)Header Entry'
+# Equipo de traducción al español, por favor, lean antes de traducir
+# los siguientes documentos:
+#
+# - El proyecto de traducción de Debian al español
+# http://www.debian.org/intl/spanish/
+# especialmente las notas de traducción en
+# http://www.debian.org/intl/spanish/notas
+#
+# - La guía de traducción de po's de debconf:
+# /usr/share/doc/po-debconf/README-trans
+# o http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: bitlbee\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2004-09-25 18:12+0200\n"
+"PO-Revision-Date: 2005-08-24 19:37+0100\n"
+"Last-Translator: César Gómez Martín <cesar.gomez@gmail.com>\n"
+"Language-Team: Debian l10n spanish <debian-l10n-spanish@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: Spanish\n"
+"X-Poedit-Country: SPAIN\n"
+"X-Poedit-SourceCharset: utf-8\n"
+
+#. Type: string
+#. Description
+#: ../bitlbee.templates.master:4
+msgid "On what TCP port should BitlBee listen for connections?"
+msgstr "¿En qué puerto TCP quiere que BitlBee escuche conexiones?"
+
+#. Type: string
+#. Description
+#: ../bitlbee.templates.master:4
+msgid ""
+"BitlBee normally listens on the regular IRC port, 6667. This might not be a "
+"very good idea when you're running a real IRC daemon as well. 6668 might be "
+"a good alternative. Leaving this value blank means that BitlBee will not be "
+"run automatically."
+msgstr ""
+"BitlBee normalmente escucha en el puerto 6667, que se usa también para IRC. "
+"Por esta razón no es muy buena idea poner a BitlBee a escuchar en ese puerto "
+"si también se está ejecutando un demonio real de IRC, en este caso el puerto "
+"6668 puede ser una buena alternativa. Si deja este valor en blanco BitlBee "
+"no se ejecutará automáticamente."
diff --git a/debian/po/fr.po b/debian/po/fr.po
new file mode 100644
index 00000000..562a0229
--- /dev/null
+++ b/debian/po/fr.po
@@ -0,0 +1,44 @@
+#
+# Translators, if you are not familiar with the PO format, gettext
+# documentation is worth reading, especially sections dedicated to
+# this format, e.g. by running:
+# info -n '(gettext)PO Files'
+# info -n '(gettext)Header Entry'
+#
+# Some information specific to po-debconf are available at
+# /usr/share/doc/po-debconf/README-trans
+# or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+# Developers do not need to manually edit POT or PO files.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: bitlbee (0.80-1)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2004-09-25 18:12+0200\n"
+"PO-Revision-Date: 2003-08-07 08:45+0100\n"
+"Last-Translator: Christian Perrier <bubulle@debian.org>\n"
+"Language-Team: French <debian-l10n-french@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: string
+#. Description
+#: ../bitlbee.templates.master:4
+msgid "On what TCP port should BitlBee listen for connections?"
+msgstr "Sur quel port TCP BitlBee doit-il être à l'écoute ?"
+
+#. Type: string
+#. Description
+#: ../bitlbee.templates.master:4
+msgid ""
+"BitlBee normally listens on the regular IRC port, 6667. This might not be a "
+"very good idea when you're running a real IRC daemon as well. 6668 might be "
+"a good alternative. Leaving this value blank means that BitlBee will not be "
+"run automatically."
+msgstr ""
+"BitlBee est usuellement à l'écoute sur le port IRC standard : 6667. Cela "
+"n'est pas forcément un choix adapté si vous utilisez en même temps un vrai "
+"démon IRC. Dans ce cas, choisir 6668 est conseillé. Si vous ne souhaitez pas "
+"lancer BitlBee automatiquement, veuillez laissez ce champs vide."
diff --git a/debian/po/ja.po b/debian/po/ja.po
new file mode 100644
index 00000000..c94bbbe4
--- /dev/null
+++ b/debian/po/ja.po
@@ -0,0 +1,45 @@
+#
+# Translators, if you are not familiar with the PO format, gettext
+# documentation is worth reading, especially sections dedicated to
+# this format, e.g. by running:
+# info -n '(gettext)PO Files'
+# info -n '(gettext)Header Entry'
+#
+# Some information specific to po-debconf are available at
+# /usr/share/doc/po-debconf/README-trans
+# or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+# Developers do not need to manually edit POT or PO files.
+#
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: bitlbee 0.90a-2\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2004-09-25 18:12+0200\n"
+"PO-Revision-Date: 2004-09-11 13:30+0900\n"
+"Last-Translator: Hideki Yamane <henrich@samba.gr.jp>\n"
+"Language-Team: Japanese <debian-japanese@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=EUC-JP\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: string
+#. Description
+#: ../bitlbee.templates.master:4
+msgid "On what TCP port should BitlBee listen for connections?"
+msgstr "BitlBee ¤Ï¡¢Àܳ¤Î¤¿¤á¤Ë¤É¤Î TCP ¥Ý¡¼¥È¤ò listen ¤·¤Þ¤¹¤«?"
+
+#. Type: string
+#. Description
+#: ../bitlbee.templates.master:4
+msgid ""
+"BitlBee normally listens on the regular IRC port, 6667. This might not be a "
+"very good idea when you're running a real IRC daemon as well. 6668 might be "
+"a good alternative. Leaving this value blank means that BitlBee will not be "
+"run automatically."
+msgstr ""
+"BitlBee ¤ÏÄ̾ï¤Î¾ì¹ç¡¢É¸½à¤Î IRC ¥Ý¡¼¥ÈÈÖ¹æ¤Ç¤¢¤ë 6667 ¤ò listen ¤·¤Þ¤¹¡£Æ±ÍÍ"
+"¤Ë¤·¤Æ¼ÂºÝ¤Î IRC ¥Ç¡¼¥â¥ó¤òưºî¤µ¤»¤Æ¤¤¤ë¾ì¹ç¡¢¤³¤ì¤Ï¤¢¤Þ¤êÎɤ¤¹Í¤¨¤Ç¤Ï̵¤¤¤«"
+"¤â¤·¤ì¤Þ¤»¤ó¡£Âå¤ï¤ê¤Ë 6668 ¤ò»È¤¦¤Î¤¬Îɤ¤¤«¤âÃΤì¤Þ¤»¤ó¡£¤³¤ì¤ò¶õ¤Î¤Þ¤Þ¤Ë¤·"
+"¤Æ¤ª¤±¤Ð¡¢BitlBee ¤Ï¼«Æ°Åª¤Ë¤Ïµ¯Æ°¤Ê¤¯¤Ê¤ê¤Þ¤¹¡£"
diff --git a/debian/po/nl.po b/debian/po/nl.po
new file mode 100644
index 00000000..f9a97d76
--- /dev/null
+++ b/debian/po/nl.po
@@ -0,0 +1,44 @@
+#
+# Translators, if you are not familiar with the PO format, gettext
+# documentation is worth reading, especially sections dedicated to
+# this format, e.g. by running:
+# info -n '(gettext)PO Files'
+# info -n '(gettext)Header Entry'
+#
+# Some information specific to po-debconf are available at
+# /usr/share/doc/po-debconf/README-trans
+# or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+# Developers do not need to manually edit POT or PO files.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: bitlbee (0.90a-2)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2004-09-25 18:12+0200\n"
+"PO-Revision-Date: 2004-09-06 20:16+0200\n"
+"Last-Translator: Wilmer van der Gaast <wilmer@gaast.net>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: string
+#. Description
+#: ../bitlbee.templates.master:4
+msgid "On what TCP port should BitlBee listen for connections?"
+msgstr "Op welke TCP poort moet BitlBee draaien?"
+
+#. Type: string
+#. Description
+#: ../bitlbee.templates.master:4
+msgid ""
+"BitlBee normally listens on the regular IRC port, 6667. This might not be a "
+"very good idea when you're running a real IRC daemon as well. 6668 might be "
+"a good alternative. Leaving this value blank means that BitlBee will not be "
+"run automatically."
+msgstr ""
+"Normaal 'luistert' BitlBee op de gebruikelijke IRC poort, 6667. Als je al "
+"een andere IRC daemon draait is dat onmogelijk. Kies dan bijvoorbeeld voor "
+"poort 6668. Als je niet wil dat BitlBee automatisch gestart wordt, vul hier "
+"dan niets in."
diff --git a/debian/po/pt.po b/debian/po/pt.po
new file mode 100644
index 00000000..7eb3380d
--- /dev/null
+++ b/debian/po/pt.po
@@ -0,0 +1,35 @@
+# Portuguese translation of bitlbee's debconf messages. # This file is distributed under the same license as the bitlbee package.
+# 2006, Marco Ferra <mferra@debianpt.org>
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: bitlbee 1.0.3-1.1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2007-01-13 18:53+0100\n"
+"PO-Revision-Date: 2007-01-26 22:34+0000\n"
+"Last-Translator: Marco Ferra <mferra@debianpt.org>\n"
+"Language-Team: Portuguese <traduz@debianpt.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit"
+
+#. Type: string
+#. Description
+#: ../bitlbee.templates.master:1001
+msgid "On what TCP port should BitlBee listen for connections?"
+msgstr "Em que porta TCP deverá o BitlBee escutar por conexões?"
+
+#. Type: string
+#. Description
+#: ../bitlbee.templates.master:1001
+msgid ""
+"BitlBee normally listens on the regular IRC port, 6667. This might not be a "
+"very good idea when you're running a real IRC daemon as well. 6668 might be "
+"a good alternative. Leaving this value blank means that BitlBee will not be "
+"run automatically."
+msgstr ""
+"O BitlBee normalmente escuta na porta do IRC 6667. Isto poderá não ser "
+"uma ideia excelente quando está a correr um 'daemon' de IRC ao mesmo tempo. "
+"Nesse caso a porta 6668 poderá ser uma boa alternativa. Deixar este campo "
+"vazio significa que o BitlBee não irá correr automaticamente."
+
diff --git a/debian/po/pt_BR.po b/debian/po/pt_BR.po
new file mode 100644
index 00000000..35193fee
--- /dev/null
+++ b/debian/po/pt_BR.po
@@ -0,0 +1,44 @@
+#
+# Translators, if you are not familiar with the PO format, gettext
+# documentation is worth reading, especially sections dedicated to
+# this format, e.g. by running:
+# info -n '(gettext)PO Files'
+# info -n '(gettext)Header Entry'
+#
+# Some information specific to po-debconf are available at
+# /usr/share/doc/po-debconf/README-trans
+# or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+# Developers do not need to manually edit POT or PO files.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: bitlbee\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2004-09-25 18:12+0200\n"
+"PO-Revision-Date: 2005-02-26 16:14-0300\n"
+"Last-Translator: André Luís Lopes <andrelop@debian.org>\n"
+"Language-Team: Debian-BR Project <debian-l10n-portuguese@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: string
+#. Description
+#: ../bitlbee.templates.master:4
+msgid "On what TCP port should BitlBee listen for connections?"
+msgstr "Em qual porta TCP o BitlBee deverá ouvir por conexões ?"
+
+#. Type: string
+#. Description
+#: ../bitlbee.templates.master:4
+msgid ""
+"BitlBee normally listens on the regular IRC port, 6667. This might not be a "
+"very good idea when you're running a real IRC daemon as well. 6668 might be "
+"a good alternative. Leaving this value blank means that BitlBee will not be "
+"run automatically."
+msgstr ""
+"O BitlBee normalmente ouve na porta de IRC padrão, 6667. Porém, esta pode "
+"não ser uma boa idéia quando você está rodando um daemon IRC real também. "
+"6689 pode ser uma boa alternativa. Deixar esse valor em branco significa que "
+"o BitlBee não será executado automaticamente."
diff --git a/debian/po/sv.po b/debian/po/sv.po
new file mode 100644
index 00000000..06a9a8ee
--- /dev/null
+++ b/debian/po/sv.po
@@ -0,0 +1,43 @@
+# Translators, if you are not familiar with the PO format, gettext
+# documentation is worth reading, especially sections dedicated to
+# this format, e.g. by running:
+# info -n '(gettext)PO Files'
+# info -n '(gettext)Header Entry'
+# Some information specific to po-debconf are available at
+# /usr/share/doc/po-debconf/README-trans
+# or http://www.debian.org/intl/l10n/po-debconf/README-trans
+# Developers do not need to manually edit POT or PO files.
+# , fuzzy
+#
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: bitlbee 0.92-2\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2004-09-25 18:12+0200\n"
+"PO-Revision-Date: 2005-10-03 23:18+0200\n"
+"Last-Translator: Daniel Nylander <po@danielnylander.se>\n"
+"Language-Team: Swedish <sv@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: string
+#. Description
+#: ../bitlbee.templates.master:4
+msgid "On what TCP port should BitlBee listen for connections?"
+msgstr "På vilken TCP-port ska BitlBee lyssna på efter anslutningar?"
+
+#. Type: string
+#. Description
+#: ../bitlbee.templates.master:4
+msgid ""
+"BitlBee normally listens on the regular IRC port, 6667. This might not be a "
+"very good idea when you're running a real IRC daemon as well. 6668 might be "
+"a good alternative. Leaving this value blank means that BitlBee will not be "
+"run automatically."
+msgstr ""
+"BitlBee lyssnar normalt på den standardporten för IRC, 6667. Detta kanske "
+"inte är en bra ide om du kör en riktig IRC-daemon på samma system. 6668 kan "
+"vara ett bra alternativ då. Lämnar du detta värde blankt betyder det att "
+"BitlBee inte kommer att startas automatiskt."
diff --git a/debian/po/templates.pot b/debian/po/templates.pot
new file mode 100644
index 00000000..1a3ab2b8
--- /dev/null
+++ b/debian/po/templates.pot
@@ -0,0 +1,41 @@
+#
+# Translators, if you are not familiar with the PO format, gettext
+# documentation is worth reading, especially sections dedicated to
+# this format, e.g. by running:
+# info -n '(gettext)PO Files'
+# info -n '(gettext)Header Entry'
+#
+# Some information specific to po-debconf are available at
+# /usr/share/doc/po-debconf/README-trans
+# or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+# Developers do not need to manually edit POT or PO files.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2004-09-25 18:12+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: string
+#. Description
+#: ../bitlbee.templates.master:4
+msgid "On what TCP port should BitlBee listen for connections?"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../bitlbee.templates.master:4
+msgid ""
+"BitlBee normally listens on the regular IRC port, 6667. This might not be a "
+"very good idea when you're running a real IRC daemon as well. 6668 might be "
+"a good alternative. Leaving this value blank means that BitlBee will not be "
+"run automatically."
+msgstr ""
diff --git a/debian/po/vi.po b/debian/po/vi.po
new file mode 100644
index 00000000..2bcb5908
--- /dev/null
+++ b/debian/po/vi.po
@@ -0,0 +1,32 @@
+# Vietnamese translation for bitlbee.
+# Copyright © 2005 Free Software Foundation, Inc.
+# Clytie Siddall <clytie@riverland.net.au>, 2005.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: bitlbee 0.92-1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2004-09-25 18:12+0200\n"
+"PO-Revision-Date: 2005-06-12 18:34+0930\n"
+"Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n"
+"Language-Team: Vietnamese <gnomevi-list@lists.sourceforge.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0\n"
+
+#. Type: string
+#. Description
+#: ../bitlbee.templates.master:4
+msgid "On what TCP port should BitlBee listen for connections?"
+msgstr "Trình BitlBee nên lắng nghe sự kết nối trên cổng TCP nào?"
+
+#. Type: string
+#. Description
+#: ../bitlbee.templates.master:4
+msgid ""
+"BitlBee normally listens on the regular IRC port, 6667. This might not be a "
+"very good idea when you're running a real IRC daemon as well. 6668 might be "
+"a good alternative. Leaving this value blank means that BitlBee will not be "
+"run automatically."
+msgstr "Trình BitlBee thưá»ng lắng nghe trên cổng IRC bình thưá»ng, 6667. Có lẽ nó không phải là má»™t ý kiến tốt nếu bạn cÅ©ng có chạy má»™t trình ná»n (dæmon) IRC thật. Như thế thì, cổng 6668 có thể là má»™t Ä‘iá»u thay thế tốt. Nếu bạn bá» giá trị này rá»—ng, thì trình BitlBee sẽ không tá»± động chạy."
diff --git a/debian/postinst b/debian/postinst
new file mode 100755
index 00000000..6c99c40d
--- /dev/null
+++ b/debian/postinst
@@ -0,0 +1,68 @@
+#!/bin/sh -e
+
+. /usr/share/debconf/confmodule
+
+db_get bitlbee/serveport
+PORT="$RET"
+
+CONFDIR=/var/lib/bitlbee/
+
+update-rc.d bitlbee defaults > /dev/null 2>&1
+
+## Load default option. Don't want to put this in debconf (yet?)
+BITLBEE_OPTS=-F
+BITLBEE_DISABLED=0
+BITLBEE_UPGRADE_DONT_RESTART=0
+[ -r /etc/default/bitlbee ] && source /etc/default/bitlbee
+
+if [ "$BITLBEE_DISABLED" = "0" ]; then
+ ## In case it's still there (if we're upgrading right now)
+ update-inetd --remove '.*/usr/sbin/bitlbee'
+fi
+
+cat<<EOF>/etc/default/bitlbee
+## /etc/default/bitlbee: Auto-generated/updated script.
+##
+## Don't edit this line, use dpkg-reconfigure bitlbee
+BITLBEE_PORT="$PORT"
+
+## Use single-process or forking daemon mode? Can't be changed from debconf,
+## but maintainer scripts will save your changes here.
+BITLBEE_OPTS="$BITLBEE_OPTS"
+
+## In case you want to stick with inetd mode (or if you just want to disable
+## the init scripts for some other reason), you can disable the init script
+## here. (Just set it to 1)
+BITLBEE_DISABLED=$BITLBEE_DISABLED
+
+## As a server operator, you can use the RESTART command to restart only the
+## master process while keeping all the child processes and their IPC
+## connections. By enabling this, the maintainer scripts won't restart
+## BitlBee during upgrades so you can restart the master process by hand.
+BITLBEE_UPGRADE_DONT_RESTART=$BITLBEE_UPGRADE_DONT_RESTART
+EOF
+
+## Bye-bye DebConf, we don't need you anymore.
+db_stop
+
+if [ -n "$2" -a "$BITLBEE_UPGRADE_DONT_RESTART" != "1" ]; then
+ /etc/init.d/bitlbee restart
+fi
+
+## If we're upgrading, we'll probably skip this next part
+if [ -d $CONFDIR ] && chown -R bitlbee $CONFDIR; then
+ echo 'BitlBee (probably) already installed, skipping user/configdir installation'
+ exit 0
+fi
+
+adduser --system --home /var/lib/bitlbee/ --disabled-login --disabled-password bitlbee
+chmod 700 /var/lib/bitlbee/
+
+## Can't do this in packaging phase: Don't know the UID yet. Access to
+## the file should be limited, now that it stores passwords.
+chmod 600 /etc/bitlbee/bitlbee.conf
+chown bitlbee /etc/bitlbee/bitlbee.conf
+
+if [ -z "$2" ]; then
+ /etc/init.d/bitlbee start
+fi
diff --git a/debian/postrm b/debian/postrm
new file mode 100755
index 00000000..cef99f13
--- /dev/null
+++ b/debian/postrm
@@ -0,0 +1,11 @@
+#!/bin/sh -e
+
+[ "$1" = "purge" ] || exit 0
+
+if [ -e /usr/share/debconf/confmodule ]; then
+ . /usr/share/debconf/confmodule;
+ db_purge;
+fi
+
+update-rc.d bitlbee remove > /dev/null 2>&1 || true
+deluser --remove-home bitlbee || true
diff --git a/debian/prerm b/debian/prerm
new file mode 100755
index 00000000..c02b13f4
--- /dev/null
+++ b/debian/prerm
@@ -0,0 +1,8 @@
+#!/bin/sh -e
+
+if [ "$1" = "upgrade" ]; then
+ ## To prevent the help function from breaking in currently running BitlBee processes
+ rm -f /usr/share/bitlbee/help.txt
+else
+ /etc/init.d/bitlbee stop || exit 0
+fi
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 00000000..8d6bd4fa
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,83 @@
+#!/usr/bin/make -f
+
+DEBUG ?= 0
+
+# Want to use the full package version number instead of just the release.
+BITLBEE_VERSION ?= "$(shell dpkg-parsechangelog | grep ^Version: | awk '{print $$2}')"
+export BITLBEE_VERSION
+
+
+build-arch: build-arch-stamp
+build-arch-stamp:
+ if [ ! -d debian ]; then exit 1; fi
+ ./configure --debug=$(DEBUG) --prefix=/usr --etcdir=/etc/bitlbee $(DEB_BUILD_OPTIONS)
+ $(MAKE)
+# $(MAKE) -C doc/ all
+ touch build-arch-stamp
+
+clean:
+ if [ "`whoami`" != "root" -o ! -d debian ]; then exit 1; fi
+ rm -rf build-arch-stamp debian/bitlbee debian/*.substvars debian/files
+ -$(MAKE) distclean
+# -$(MAKE) -C doc/ clean
+
+
+install-arch: build-arch
+ if [ "`whoami`" != "root" -o ! -d debian ]; then exit 1; fi
+ mkdir -p debian/bitlbee/DEBIAN/
+ $(MAKE) install install-etc DESTDIR=`pwd`/debian/bitlbee
+
+ mkdir -p debian/bitlbee/usr/share/doc/bitlbee/
+ cp doc/user-guide/user-guide.txt debian/bitlbee/usr/share/doc/bitlbee/
+ cp doc/user-guide/user-guide.html debian/bitlbee/usr/share/doc/bitlbee/
+
+binary-arch: build-arch install-arch
+ if [ "`whoami`" != "root" -o ! -d debian ]; then exit 1; fi
+
+ chmod 755 debian/post* debian/pre* debian/config debian/bitlbee.init
+
+ mkdir -p debian/bitlbee/usr/share/doc/bitlbee/examples/ debian/bitlbee/etc/init.d/
+ -cp doc/RELEASE-SPEECH* debian/bitlbee/usr/share/doc/bitlbee/ && gzip -9 debian/bitlbee/usr/share/doc/bitlbee/RELEASE-SPEECH*
+ cp doc/CREDITS doc/AUTHORS doc/README doc/FAQ debian/README.Debian debian/bitlbee/usr/share/doc/bitlbee/
+ cp debian/changelog debian/bitlbee/usr/share/doc/bitlbee/changelog.Debian
+ cp debian/copyright debian/bitlbee/usr/share/doc/bitlbee/copyright
+ cp doc/CHANGES debian/bitlbee/usr/share/doc/bitlbee/changelog
+ cp utils/* debian/bitlbee/usr/share/doc/bitlbee/examples/
+ cp debian/bitlbee.init debian/bitlbee/etc/init.d/bitlbee
+ cd debian/bitlbee/usr/share/; \
+ gzip -9 doc/bitlbee/changelog.Debian doc/bitlbee/changelog doc/bitlbee/user-guide.txt \
+ doc/bitlbee/examples/* man/man8/bitlbee.8 man/man5/bitlbee.conf.5
+
+ chown -R root.root debian/bitlbee/
+ find debian/bitlbee/usr/share/ -type d -exec chmod 755 {} \;
+ find debian/bitlbee/usr/share/ -type f -exec chmod 644 {} \;
+
+ cp debian/prerm debian/bitlbee/DEBIAN/
+ cp debian/postinst debian/bitlbee/DEBIAN/
+ cp debian/postrm debian/bitlbee/DEBIAN/
+ cp debian/config debian/bitlbee/DEBIAN/
+
+ po2debconf debian/templates > debian/bitlbee/DEBIAN/templates
+ cp debian/conffiles debian/bitlbee/DEBIAN/
+
+ if [ "$(DEBUG)" = "0" ]; then strip -R .comment -R .note debian/bitlbee/usr/sbin/bitlbee; fi
+
+ cd debian/bitlbee; \
+ find usr -type f -exec md5sum {} \; > DEBIAN/md5sums
+ dpkg-shlibdeps -Tdebian/bitlbee.substvars -dDepends debian/bitlbee/usr/sbin/bitlbee
+ifdef BITLBEE_VERSION
+ dpkg-gencontrol -ldebian/changelog -isp -pbitlbee -Tdebian/bitlbee.substvars -Pdebian/bitlbee -v1:$(BITLBEE_VERSION)-0 -V'debconf-depends=debconf (>= 1.2.0) | debconf-2.0'
+else
+ dpkg-gencontrol -ldebian/changelog -isp -pbitlbee -Tdebian/bitlbee.substvars -Pdebian/bitlbee -V'debconf-depends=debconf (>= 1.2.0) | debconf-2.0'
+endif
+
+ dpkg --build debian/bitlbee ..
+
+debug-build:
+ BITLBEE_VERSION=\"`date +%Y%m%d`-`hostname`-debug\" debian/rules clean binary DEBUG=1
+
+binary: binary-arch
+build: build-arch
+install: install-arch
+
+.PHONY: build-arch build clean binary-arch binary install-arch install
diff --git a/debian/templates b/debian/templates
new file mode 100644
index 00000000..0cd04426
--- /dev/null
+++ b/debian/templates
@@ -0,0 +1,8 @@
+Template: bitlbee/serveport
+Type: string
+Default: stillhavetoask
+_Description: On what TCP port should BitlBee listen for connections?
+ BitlBee normally listens on the regular IRC port, 6667. This might not be
+ a very good idea when you're running a real IRC daemon as well. 6668 might
+ be a good alternative. Leaving this value blank means that BitlBee will not
+ be run automatically.
diff --git a/help.c b/help.c
index 7c6d2dda..756eb12a 100644
--- a/help.c
+++ b/help.c
@@ -30,7 +30,7 @@
#define BUFSIZE 1100
-help_t *help_init( help_t **help )
+help_t *help_init( help_t **help, const char *helpfile )
{
int i, buflen = 0;
help_t *h;
@@ -40,7 +40,7 @@ help_t *help_init( help_t **help )
*help = h = g_new0 ( help_t, 1 );
- h->fd = open( global.helpfile, O_RDONLY
+ h->fd = open( helpfile, O_RDONLY
#ifdef _WIN32
| O_BINARY
#endif
@@ -108,12 +108,11 @@ char *help_get( help_t **help, char *string )
struct stat stat[1];
help_t *h;
- h=*help;
-
- while( h )
+ for( h = *help; h; h = h->next )
{
- if( g_strcasecmp( h->string, string ) == 0 ) break;
- h = h->next;
+ if( h->string != NULL &&
+ g_strcasecmp( h->string, string ) == 0 )
+ break;
}
if( h && h->length > 0 )
{
diff --git a/help.h b/help.h
index 7b8da39a..07182e9c 100644
--- a/help.h
+++ b/help.h
@@ -42,7 +42,7 @@ typedef struct help
struct help *next;
} help_t;
-help_t *help_init( help_t **help );
+help_t *help_init( help_t **help, const char *helpfile );
char *help_get( help_t **help, char *string );
#endif
diff --git a/lib/Makefile b/lib/Makefile
index 33073c27..a9038987 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -17,6 +17,7 @@ LFLAGS += -r
# [SH] Phony targets
all: lib.o
check: all
+lcov:
gcov:
gcov *.c
diff --git a/protocols/Makefile b/protocols/Makefile
index 7f793bc4..f7d76e0f 100644
--- a/protocols/Makefile
+++ b/protocols/Makefile
@@ -26,6 +26,7 @@ LFLAGS += -r
# [SH] Phony targets
all: protocols.o
check: all
+lcov:
gcov:
gcov *.c
diff --git a/protocols/jabber/Makefile b/protocols/jabber/Makefile
index 3c9e4949..e81e6c5a 100644
--- a/protocols/jabber/Makefile
+++ b/protocols/jabber/Makefile
@@ -17,6 +17,7 @@ LFLAGS += -r
# [SH] Phony targets
all: jabber_mod.o
check: all
+lcov:
gcov:
gcov *.c
diff --git a/protocols/msn/Makefile b/protocols/msn/Makefile
index f53b34ba..3440658d 100644
--- a/protocols/msn/Makefile
+++ b/protocols/msn/Makefile
@@ -17,6 +17,7 @@ LFLAGS += -r
# [SH] Phony targets
all: msn_mod.o
check: all
+lcov:
gcov:
gcov *.c
diff --git a/protocols/oscar/Makefile b/protocols/oscar/Makefile
index ed2d7f83..95e85ec2 100644
--- a/protocols/oscar/Makefile
+++ b/protocols/oscar/Makefile
@@ -17,6 +17,7 @@ LFLAGS += -r
# [SH] Phony targets
all: oscar_mod.o
check: all
+lcov:
gcov:
gcov *.c
diff --git a/protocols/yahoo/Makefile b/protocols/yahoo/Makefile
index 34c3551a..2cfd147b 100644
--- a/protocols/yahoo/Makefile
+++ b/protocols/yahoo/Makefile
@@ -17,6 +17,7 @@ LFLAGS += -r
# [SH] Phony targets
all: yahoo_mod.o
check: all
+lcov:
gcov:
gcov *.c
diff --git a/set.h b/set.h
index fd03a396..b6fffed9 100644
--- a/set.h
+++ b/set.h
@@ -23,6 +23,11 @@
Suite 330, Boston, MA 02111-1307 USA
*/
+#ifndef __SET_H__
+#define __SET_H__
+
+struct set;
+
/* This used to be specific to irc_t structures, but it's more generic now
(so it can also be used for account_t structs). It's pretty simple, but
so far pretty useful.
@@ -91,3 +96,5 @@ char *set_eval_bool( set_t *set, char *value );
char *set_eval_to_char( set_t *set, char *value );
char *set_eval_ops( set_t *set, char *value );
char *set_eval_charset( set_t *set, char *value );
+
+#endif /* __SET_H__ */
diff --git a/storage_xml.c b/storage_xml.c
index 97379b29..e45c4252 100644
--- a/storage_xml.c
+++ b/storage_xml.c
@@ -152,9 +152,7 @@ static void xml_start_element( GMarkupParseContext *ctx, const gchar *element_na
g_set_error( error, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
"Unknown protocol: %s", protocol );
else if( ( pass_len = base64_decode( pass_b64, (unsigned char**) &pass_rc4 ) ) &&
- rc4_decode( pass_rc4, pass_len,
- &password,
- xd->given_pass ) )
+ rc4_decode( pass_rc4, pass_len, &password, xd->given_pass ) )
{
xd->current_account = account_add( irc, prpl, handle, password );
if( server )
diff --git a/tests/Makefile b/tests/Makefile
index 588bae61..4d4ed8d3 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -12,7 +12,7 @@ distclean: clean
main_objs = account.o bitlbee.o conf.o crypting.o help.o ipc.o irc.o irc_commands.o log.o nick.o query.o root_commands.o set.o storage.o storage_xml.o storage_text.o user.o
-test_objs = check.o check_util.o check_nick.o check_md5.o check_irc.o
+test_objs = check.o check_util.o check_nick.o check_md5.o check_irc.o check_help.o check_user.o check_crypting.o check_set.o
check: $(test_objs) $(addprefix ../, $(main_objs)) ../protocols/protocols.o ../lib/lib.o
@echo '*' Linking $@
diff --git a/tests/check.c b/tests/check.c
index 42ff067f..488d9608 100644
--- a/tests/check.c
+++ b/tests/check.c
@@ -20,6 +20,16 @@ gboolean g_io_channel_pair(GIOChannel **ch1, GIOChannel **ch2)
return TRUE;
}
+irc_t *torture_irc(void)
+{
+ irc_t *irc;
+ GIOChannel *ch1, *ch2;
+ if (!g_io_channel_pair(&ch1, &ch2))
+ return NULL;
+ irc = irc_new(g_io_channel_unix_get_fd(ch1));
+ return irc;
+}
+
double gettime()
{
struct timeval time[1];
@@ -40,6 +50,18 @@ Suite *md5_suite(void);
/* From check_irc.c */
Suite *irc_suite(void);
+/* From check_help.c */
+Suite *help_suite(void);
+
+/* From check_user.c */
+Suite *user_suite(void);
+
+/* From check_crypting.c */
+Suite *crypting_suite(void);
+
+/* From check_set.c */
+Suite *set_suite(void);
+
int main (int argc, char **argv)
{
int nf;
@@ -66,7 +88,9 @@ int main (int argc, char **argv)
if (verbose) {
log_link( LOGLVL_ERROR, LOGOUTPUT_CONSOLE );
+#ifdef DEBUG
log_link( LOGLVL_DEBUG, LOGOUTPUT_CONSOLE );
+#endif
log_link( LOGLVL_INFO, LOGOUTPUT_CONSOLE );
log_link( LOGLVL_WARNING, LOGOUTPUT_CONSOLE );
}
@@ -78,6 +102,10 @@ int main (int argc, char **argv)
srunner_add_suite(sr, nick_suite());
srunner_add_suite(sr, md5_suite());
srunner_add_suite(sr, irc_suite());
+ srunner_add_suite(sr, help_suite());
+ srunner_add_suite(sr, user_suite());
+ srunner_add_suite(sr, crypting_suite());
+ srunner_add_suite(sr, set_suite());
if (no_fork)
srunner_set_fork_status(sr, CK_NOFORK);
srunner_run_all (sr, verbose?CK_VERBOSE:CK_NORMAL);
diff --git a/tests/check_crypting.c b/tests/check_crypting.c
new file mode 100644
index 00000000..b8e5e1e0
--- /dev/null
+++ b/tests/check_crypting.c
@@ -0,0 +1,47 @@
+#include <stdlib.h>
+#include <glib.h>
+#include <gmodule.h>
+#include <check.h>
+#include <string.h>
+#include "bitlbee.h"
+#include "crypting.h"
+#include "testsuite.h"
+
+START_TEST(test_check_pass_valid)
+ fail_unless (checkpass ("foo", "acbd18db4cc2f85cedef654fccc4a4d8") == 0);
+ fail_unless (checkpass ("invalidpass", "acbd18db4cc2f85cedef654fccc4a4d8") == -1);
+
+END_TEST
+
+START_TEST(test_hashpass)
+ fail_unless (strcmp(hashpass("foo"), "acbd18db4cc2f85cedef654fccc4a4d8") == 0);
+END_TEST
+
+START_TEST(test_obfucrypt)
+ char *raw = obfucrypt("some line", "bla");
+ fail_unless(strcmp(raw, "\xd5\xdb\xce\xc7\x8c\xcd\xcb\xda\xc6") == 0);
+END_TEST
+
+START_TEST(test_deobfucrypt)
+ char *raw = deobfucrypt("\xd5\xdb\xce\xc7\x8c\xcd\xcb\xda\xc6", "bla");
+ fail_unless(strcmp(raw, "some line") == 0);
+END_TEST
+
+START_TEST(test_obfucrypt_bidirectional)
+ char *plain = g_strdup("this is a line");
+ char *raw = obfucrypt(plain, "foo");
+ fail_unless(strcmp(plain, deobfucrypt(raw, "foo")) == 0);
+END_TEST
+
+Suite *crypting_suite (void)
+{
+ Suite *s = suite_create("Crypting");
+ TCase *tc_core = tcase_create("Core");
+ suite_add_tcase (s, tc_core);
+ tcase_add_test (tc_core, test_check_pass_valid);
+ tcase_add_test (tc_core, test_hashpass);
+ tcase_add_test (tc_core, test_obfucrypt);
+ tcase_add_test (tc_core, test_deobfucrypt);
+ tcase_add_test (tc_core, test_obfucrypt_bidirectional);
+ return s;
+}
diff --git a/tests/check_help.c b/tests/check_help.c
new file mode 100644
index 00000000..7e5283e3
--- /dev/null
+++ b/tests/check_help.c
@@ -0,0 +1,30 @@
+#include <stdlib.h>
+#include <glib.h>
+#include <gmodule.h>
+#include <check.h>
+#include <string.h>
+#include <stdio.h>
+#include "help.h"
+
+START_TEST(test_help_none)
+ help_t *h, *r;
+ r = help_init(&h, "/dev/null");
+ fail_if(r == NULL);
+ fail_if(r != h);
+END_TEST
+
+START_TEST(test_help_nonexistent)
+ help_t *h, *r;
+ r = help_init(&h, "/dev/null");
+ fail_unless(help_get(&h, "nonexistent") == NULL);
+END_TEST
+
+Suite *help_suite (void)
+{
+ Suite *s = suite_create("Help");
+ TCase *tc_core = tcase_create("Core");
+ suite_add_tcase (s, tc_core);
+ tcase_add_test (tc_core, test_help_none);
+ tcase_add_test (tc_core, test_help_nonexistent);
+ return s;
+}
diff --git a/tests/check_set.c b/tests/check_set.c
new file mode 100644
index 00000000..b1ea973d
--- /dev/null
+++ b/tests/check_set.c
@@ -0,0 +1,130 @@
+#include <stdlib.h>
+#include <glib.h>
+#include <gmodule.h>
+#include <check.h>
+#include <string.h>
+#include "set.h"
+#include "testsuite.h"
+
+START_TEST(test_set_add)
+ void *data = "data";
+ set_t *s = NULL, *t;
+ t = set_add(&s, "name", "default", NULL, data);
+ fail_unless(s == t);
+ fail_unless(t->data == data);
+ fail_unless(strcmp(t->def, "default") == 0);
+END_TEST
+
+START_TEST(test_set_add_existing)
+ void *data = "data";
+ set_t *s = NULL, *t;
+ t = set_add(&s, "name", "default", NULL, data);
+ t = set_add(&s, "name", "newdefault", NULL, data);
+ fail_unless(s == t);
+ fail_unless(strcmp(t->def, "newdefault") == 0);
+END_TEST
+
+START_TEST(test_set_find_unknown)
+ set_t *s = NULL, *t;
+ fail_unless (set_find(&s, "foo") == NULL);
+END_TEST
+
+START_TEST(test_set_find)
+ void *data = "data";
+ set_t *s = NULL, *t;
+ t = set_add(&s, "name", "default", NULL, data);
+ fail_unless(s == t);
+ fail_unless(set_find(&s, "name") == t);
+END_TEST
+
+START_TEST(test_set_get_str_default)
+ void *data = "data";
+ set_t *s = NULL, *t;
+ t = set_add(&s, "name", "default", NULL, data);
+ fail_unless(s == t);
+ fail_unless(strcmp(set_getstr(&s, "name"), "default") == 0);
+END_TEST
+
+START_TEST(test_set_get_bool_default)
+ void *data = "data";
+ set_t *s = NULL, *t;
+ t = set_add(&s, "name", "true", NULL, data);
+ fail_unless(s == t);
+ fail_unless(set_getbool(&s, "name"));
+END_TEST
+
+START_TEST(test_set_get_bool_integer)
+ void *data = "data";
+ set_t *s = NULL, *t;
+ t = set_add(&s, "name", "3", NULL, data);
+ fail_unless(s == t);
+ fail_unless(set_getbool(&s, "name") == 3);
+END_TEST
+
+START_TEST(test_set_get_bool_unknown)
+ set_t *s = NULL;
+ fail_unless(set_getbool(&s, "name") == 0);
+END_TEST
+
+START_TEST(test_set_get_str_value)
+ void *data = "data";
+ set_t *s = NULL, *t;
+ t = set_add(&s, "name", "default", NULL, data);
+ set_setstr(&s, "name", "foo");
+ fail_unless(strcmp(set_getstr(&s, "name"), "foo") == 0);
+END_TEST
+
+START_TEST(test_set_get_str_unknown)
+ set_t *s = NULL;
+ fail_unless(set_getstr(&s, "name") == NULL);
+END_TEST
+
+START_TEST(test_setint)
+ void *data = "data";
+ set_t *s = NULL, *t;
+ t = set_add(&s, "name", "10", NULL, data);
+ set_setint(&s, "name", 3);
+ fail_unless(set_getint(&s, "name") == 3);
+END_TEST
+
+START_TEST(test_setstr)
+ void *data = "data";
+ set_t *s = NULL, *t;
+ t = set_add(&s, "name", "foo", NULL, data);
+ set_setstr(&s, "name", "bloe");
+ fail_unless(strcmp(set_getstr(&s, "name"), "bloe") == 0);
+END_TEST
+
+START_TEST(test_setstr_implicit)
+ void *data = "data";
+ set_t *s = NULL, *t;
+ set_setstr(&s, "name", "bloe");
+ fail_unless(set_find(&s, "name") != NULL);
+END_TEST
+
+START_TEST(test_set_get_int_unknown)
+ set_t *s = NULL;
+ fail_unless(set_getint(&s, "foo") == 0);
+END_TEST
+
+Suite *set_suite (void)
+{
+ Suite *s = suite_create("Set");
+ TCase *tc_core = tcase_create("Core");
+ suite_add_tcase (s, tc_core);
+ tcase_add_test (tc_core, test_set_add);
+ tcase_add_test (tc_core, test_set_add_existing);
+ tcase_add_test (tc_core, test_set_find_unknown);
+ tcase_add_test (tc_core, test_set_find);
+ tcase_add_test (tc_core, test_set_get_str_default);
+ tcase_add_test (tc_core, test_set_get_str_value);
+ tcase_add_test (tc_core, test_set_get_str_unknown);
+ tcase_add_test (tc_core, test_set_get_bool_default);
+ tcase_add_test (tc_core, test_set_get_bool_integer);
+ tcase_add_test (tc_core, test_set_get_bool_unknown);
+ tcase_add_test (tc_core, test_set_get_int_unknown);
+ tcase_add_test (tc_core, test_setint);
+ tcase_add_test (tc_core, test_setstr);
+ tcase_add_test (tc_core, test_setstr_implicit);
+ return s;
+}
diff --git a/tests/check_user.c b/tests/check_user.c
new file mode 100644
index 00000000..79248049
--- /dev/null
+++ b/tests/check_user.c
@@ -0,0 +1,75 @@
+#include <stdlib.h>
+#include <glib.h>
+#include <gmodule.h>
+#include <check.h>
+#include <string.h>
+#include "bitlbee.h"
+#include "user.h"
+#include "testsuite.h"
+
+START_TEST(test_user_add)
+ irc_t *irc = torture_irc();
+ user_t *user;
+ user = user_add(irc, "foo");
+ fail_if(user == NULL);
+ fail_if(strcmp(user->nick, "foo") != 0);
+ fail_unless(user_find(irc, "foo") == user);
+END_TEST
+
+START_TEST(test_user_add_exists)
+ irc_t *irc = torture_irc();
+ user_t *user;
+ user = user_add(irc, "foo");
+ fail_if(user == NULL);
+ user = user_add(irc, "foo");
+ fail_unless(user == NULL);
+END_TEST
+
+START_TEST(test_user_add_invalid)
+ irc_t *irc = torture_irc();
+ user_t *user;
+ user = user_add(irc, ":foo");
+ fail_unless(user == NULL);
+END_TEST
+
+START_TEST(test_user_del_invalid)
+ irc_t *irc = torture_irc();
+ fail_unless(user_del(irc, ":foo") == 0);
+END_TEST
+
+START_TEST(test_user_del)
+ irc_t *irc = torture_irc();
+ user_t *user;
+ user = user_add(irc, "foo");
+ fail_unless(user_del(irc, "foo") == 1);
+ fail_unless(user_find(irc, "foo") == NULL);
+END_TEST
+
+START_TEST(test_user_del_nonexistant)
+ irc_t *irc = torture_irc();
+ fail_unless(user_del(irc, "foo") == 0);
+END_TEST
+
+START_TEST(test_user_rename)
+ irc_t *irc = torture_irc();
+ user_t *user;
+ user = user_add(irc, "foo");
+ user_rename(irc, "foo", "bar");
+ fail_unless(user_find(irc, "foo") == NULL);
+ fail_if(user_find(irc, "bar") == NULL);
+END_TEST
+
+Suite *user_suite (void)
+{
+ Suite *s = suite_create("User");
+ TCase *tc_core = tcase_create("Core");
+ suite_add_tcase (s, tc_core);
+ tcase_add_test (tc_core, test_user_add);
+ tcase_add_test (tc_core, test_user_add_invalid);
+ tcase_add_test (tc_core, test_user_add_exists);
+ tcase_add_test (tc_core, test_user_del_invalid);
+ tcase_add_test (tc_core, test_user_del_nonexistant);
+ tcase_add_test (tc_core, test_user_del);
+ tcase_add_test (tc_core, test_user_rename);
+ return s;
+}
diff --git a/tests/check_util.c b/tests/check_util.c
index ee365735..284ddba3 100644
--- a/tests/check_util.c
+++ b/tests/check_util.c
@@ -6,6 +6,7 @@
#include "irc.h"
#include "set.h"
#include "misc.h"
+#include "url.h"
START_TEST(test_strip_linefeed)
{
@@ -42,6 +43,66 @@ START_TEST(test_strip_newlines)
}
END_TEST
+START_TEST(test_set_url_http)
+ url_t url;
+
+ fail_if (0 == url_set(&url, "http://host/"));
+ fail_unless (!strcmp(url.host, "host"));
+ fail_unless (!strcmp(url.file, "/"));
+ fail_unless (!strcmp(url.user, ""));
+ fail_unless (!strcmp(url.pass, ""));
+ fail_unless (url.proto == PROTO_HTTP);
+ fail_unless (url.port == 80);
+END_TEST
+
+START_TEST(test_set_url_https)
+ url_t url;
+
+ fail_if (0 == url_set(&url, "https://ahost/AimeeMann"));
+ fail_unless (!strcmp(url.host, "ahost"));
+ fail_unless (!strcmp(url.file, "/AimeeMann"));
+ fail_unless (!strcmp(url.user, ""));
+ fail_unless (!strcmp(url.pass, ""));
+ fail_unless (url.proto == PROTO_HTTPS);
+ fail_unless (url.port == 443);
+END_TEST
+
+START_TEST(test_set_url_port)
+ url_t url;
+
+ fail_if (0 == url_set(&url, "https://ahost:200/Lost/In/Space"));
+ fail_unless (!strcmp(url.host, "ahost"));
+ fail_unless (!strcmp(url.file, "/Lost/In/Space"));
+ fail_unless (!strcmp(url.user, ""));
+ fail_unless (!strcmp(url.pass, ""));
+ fail_unless (url.proto == PROTO_HTTPS);
+ fail_unless (url.port == 200);
+END_TEST
+
+START_TEST(test_set_url_username)
+ url_t url;
+
+ fail_if (0 == url_set(&url, "socks4://user@ahost/Space"));
+ fail_unless (!strcmp(url.host, "ahost"));
+ fail_unless (!strcmp(url.file, "/Space"));
+ fail_unless (!strcmp(url.user, "user"));
+ fail_unless (!strcmp(url.pass, ""));
+ fail_unless (url.proto == PROTO_SOCKS4);
+ fail_unless (url.port == 1080);
+END_TEST
+
+START_TEST(test_set_url_username_pwd)
+ url_t url;
+
+ fail_if (0 == url_set(&url, "socks5://user:pass@ahost/"));
+ fail_unless (!strcmp(url.host, "ahost"));
+ fail_unless (!strcmp(url.file, "/"));
+ fail_unless (!strcmp(url.user, "user"));
+ fail_unless (!strcmp(url.pass, "pass"));
+ fail_unless (url.proto == PROTO_SOCKS5);
+ fail_unless (url.port == 1080);
+END_TEST
+
Suite *util_suite (void)
{
Suite *s = suite_create("Util");
@@ -49,5 +110,10 @@ Suite *util_suite (void)
suite_add_tcase (s, tc_core);
tcase_add_test (tc_core, test_strip_linefeed);
tcase_add_test (tc_core, test_strip_newlines);
+ tcase_add_test (tc_core, test_set_url_http);
+ tcase_add_test (tc_core, test_set_url_https);
+ tcase_add_test (tc_core, test_set_url_port);
+ tcase_add_test (tc_core, test_set_url_username);
+ tcase_add_test (tc_core, test_set_url_username_pwd);
return s;
}
diff --git a/tests/testsuite.h b/tests/testsuite.h
index dacaf8a3..0b169198 100644
--- a/tests/testsuite.h
+++ b/tests/testsuite.h
@@ -1,6 +1,9 @@
#ifndef __BITLBEE_CHECK_H__
#define __BITLBEE_CHECK_H__
+#include "irc.h"
+
+irc_t *torture_irc(void);
gboolean g_io_channel_pair(GIOChannel **ch1, GIOChannel **ch2);
#endif /* __BITLBEE_CHECK_H__ */
diff --git a/unix.c b/unix.c
index 23ae1b91..2be16b2b 100644
--- a/unix.c
+++ b/unix.c
@@ -111,7 +111,7 @@ int main( int argc, char *argv[], char **envp )
if( !getuid() || !geteuid() )
log_message( LOGLVL_WARNING, "BitlBee is running with root privileges. Why?" );
- if( help_init( &(global.help) ) == NULL )
+ if( help_init( &(global.help), global.helpfile ) == NULL )
log_message( LOGLVL_WARNING, "Error opening helpfile %s.", HELP_FILE );
b_main_run();
diff --git a/user.h b/user.h
index d0a62bdc..c6b933bc 100644
--- a/user.h
+++ b/user.h
@@ -22,6 +22,8 @@
if not, write to the Free Software Foundation, Inc., 59 Temple Place,
Suite 330, Boston, MA 02111-1307 USA
*/
+#ifndef __USER_H__
+#define __USER_H__
typedef struct __USER
{
@@ -55,3 +57,5 @@ int user_del( irc_t *irc, char *nick );
G_MODULE_EXPORT user_t *user_find( irc_t *irc, char *nick );
G_MODULE_EXPORT user_t *user_findhandle( struct im_connection *ic, char *handle );
void user_rename( irc_t *irc, char *oldnick, char *newnick );
+
+#endif /* __USER_H__ */