From baf36aee06bc55d39bb91da0478126dcd7631153 Mon Sep 17 00:00:00 2001
From: Bernd Eckenfels <ecki@debian.org>
Date: Mon, 13 Sep 1999 23:54:03 +0200
Subject: absolute path for motd and servers file and other debian changes

---
 doc/ircII.1           |   21 +++++++++++----------
 include/config.h.dist |   14 ++++++++++++++
 include/defs.h.in     |    4 ++--
 source/irc.c          |    5 +++++
 source/server.c       |    4 ++++
 5 files changed, 36 insertions(+), 12 deletions(-)

diff --git a/doc/ircII.1 b/doc/ircII.1
index 6e45c44..dc1ce25 100644
--- a/doc/ircII.1
+++ b/doc/ircII.1
@@ -1,5 +1,5 @@
 .\"	$eterna: ircII.1,v 1.20 2005/01/01 11:25:09 mrg Exp $
-.TH IRCII 1L "31 October 2002"
+.TH IRCII 1 "31 October 2002"
 .SH NAME
 ircII \- interface to the Internet Relay Chat system
 .SH SYNOPSIS
@@ -249,7 +249,7 @@ The user's name (when provided inside parentheses in response to a
 WHOIS command) is set to "The one and only :)".
 .SH FILES
 .TP 2.2i
-.I .../bin/ircII
+.I /usr/bin/ircII
 the executable program
 .TP
 ~/.ircrc
@@ -260,15 +260,16 @@ directory you can put your own
 .I ircII
 scripts into, that can then be loaded with /load
 .TP
-.I .../lib/irc/
+.I /etc/irc/
 directory containing message-of-the-day, master initialization, help files and 
 .I ircII
 scripts
-.Tp
-.I .../lib/irc/script/global
-file loaded at the start of every
-.I ircII
-session.
+.I /etc/irc/script/local
+is the master initialization file for the site, loaded before .ircrc is.
+This is a Debian GNU/Linux conffile.
+.TP
+.I /usr/share/ircII/
+shared repository for help, translation tables and distributed scripts.
 .SH "THE HELP FILES"
 All of the
 .B ircII
@@ -341,14 +342,14 @@ The initial list of servers if none are provided on the command line.
 Message of the day.
 This file is displayed only once each time it is changed.
 .SH "SEE ALSO"
-irc(1),
 ircd(8)
 .SH BUGS
 Please notify the current developer of the software of any bugs in
 current versions.
 .SH AUTHORS
 Program written by Michael Sandrof (ms5n+@andrew.cmu.edu).
-Now being maintained by Matthew Green (mrg@eterna.com.au)
+Now being maintained by Matthew Green (mrg@eterna.com.au). Debian specific
+extensions by the Debian Maintainer Bernd Eckenfels (ecki@debian.org).
 Names of contributors and contact address can be retrieved with the
 .B /info command.
 This manual page written by Darren Reed (avalon@coombs.anu.EDU.AU),
diff --git a/include/config.h.dist b/include/config.h.dist
index e6d23c5..928bb07 100644
--- a/include/config.h.dist
+++ b/include/config.h.dist
@@ -233,4 +233,18 @@
 #define DEFAULT_XTERM_OPTIONS NULL
 #define DEFAULT_XTERM_PATH "xterm"
 
+/*
+ * These are Debian defaults.
+ */
+#ifdef DEBIAN
+#define COMMAND_LINE_L
+#define ON_KICK
+#undef SERVERS_FILE
+#define SERVERS_FILE "/etc/irc/servers"
+#define SERVERS_ABSFILE
+#undef MOTD_FILE
+#define MOTD_FILE "/etc/irc/motd"
+#define MOTD_ABSFILE
+#endif
+
 #endif /* __config_h_ */
diff --git a/include/defs.h.in b/include/defs.h.in
index 06697c5..40b4b9a 100644
--- a/include/defs.h.in
+++ b/include/defs.h.in
@@ -211,8 +211,8 @@
 #endif
 
 /* define these to the ZCAT program/args of your choice */
-#undef ZCAT
-#undef ZSUFFIX
+#define ZCAT "/bin/zcat"
+#define ZSUFFIX ".gz"
 #undef ZARGS
 
 /*
diff --git a/source/irc.c b/source/irc.c
index c963faf..731e013 100644
--- a/source/irc.c
+++ b/source/irc.c
@@ -1292,8 +1292,13 @@ main(argc, argv, envp)
 		u_char	*motd = NULL;
 		int	des;
 
+#ifdef MOTD_ABSFILE
+		malloc_strcpy(&motd, UP(MOTD_FILE));
+#else
 		malloc_strcpy(&motd, irc_lib);
 		malloc_strcat(&motd, UP(MOTD_FILE));
+#endif
+		
 		if (stat(CP(motd), &motd_stat) == 0)
 		{
 			u_char	*s = (u_char *) 0;
diff --git a/source/server.c b/source/server.c
index 947eaca..0f5400c 100644
--- a/source/server.c
+++ b/source/server.c
@@ -1363,8 +1363,12 @@ read_server_file()
 
 	if ((file_path = my_getenv("IRCSERVERSFILE")) == NULL)
 	{
+#ifdef SERVERS_ABSFILE
+		malloc_strcpy(&file_path, UP(SERVERS_FILE));
+#else
 		malloc_strcpy(&file_path, irc_lib);
 		malloc_strcat(&file_path, UP(SERVERS_FILE));
+#endif
 	}
 	snprintf(CP(format), sizeof format, "%%%ds", (int)sizeof buffer);
 	fp = fopen(CP(file_path), "r");
