Description: Upstream changes introduced in version 20051015-3
 These patches inherit the previous direct changes.
 .
 ircii (20051015-3) unstable; urgency=low
 .
   * QA upload.
   * Migrate to source format 3.0 (quilt)
   * Include changes from NMU, thanks to Peter Eisentraut
 .
Author: Neil Williams <codehelp@debian.org>
---

--- ircii-20051015.orig/Makefile.in
+++ ircii-20051015/Makefile.in
@@ -66,6 +66,7 @@ incdir = @srcdir@/include
 VPATH = @srcdir@/source
 objdir = @objdir@
 bindir = $(DESTDIR)@bindir@
+sbindir= $(DESTDIR)@sbindir@
 datadir = $(DESTDIR)@datadir@
 libdir = $(DESTDIR)@libdir@
 mandir = $(DESTDIR)@mandir@/man1
@@ -114,16 +115,16 @@ IRC_PATH = ~/.irc:$(INSTALL_SCRIPT):.
 
 # Set the next line to the full path for installation of the ircio program
 # if you wish to use it. 
-INSTALL_IRCIO = $(bindir)/ircio
+INSTALL_IRCIO = $(sbindir)/ircio
 
 # This little program is necessary to have an interactive shell
 # in a window of ircII. The 'shell' script uses it, so also update
 # the path in there, if you want to enable this.
-INSTALL_IRCFLUSH = $(bindir)/ircflush
+INSTALL_IRCFLUSH = $(sbindir)/ircflush
 
 # This program allows you to use screen/xterm's to put new irc windows
 # on new screen/xterm windows.
-INSTALL_WSERV = $(bindir)/wserv
+INSTALL_WSERV = $(sbindir)/wserv
 
 # This command will be used to install the irc help files.  If you don't
 # want to install them, replace with the following:
@@ -294,7 +295,7 @@ WSERV_SOURCES = wserv.c wterm.c
 IRCFLUSH_SOURCES = ircflush.c
 IRCFLUSH_OBJECTS = ircflush.o ircsig.o
 
-INCLUDES = -I. -I$(incdir) -I$(srcdir)/rijndael
+INCLUDES = -iquote . -iquote $(incdir) -iquote $(srcdir)/rijndael
 
 .c.o:
 	$(CC) $(INCLUDES) $(CFLAGS) $(DEFS) -c $<
@@ -322,13 +323,13 @@ screen.o: $(objdir)/Makefile
 # auxiliary programs
 
 ircflush: $(IRCFLUSH_OBJECTS)
-	$(CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(DEFS) -o $@ $(IRCFLUSH_OBJECTS) $(LIBS)
+	$(CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(DEFS) -o $@ $(IRCFLUSH_OBJECTS)
 
 ircio: $(IRCIO_OBJECTS)
-	$(CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(DEFS) $(PPS_DEFS) -o $@ $(IRCIO_OBJECTS) $(LIBS)
+	$(CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(DEFS) $(PPS_DEFS) -o $@ $(IRCIO_OBJECTS)
 
 wserv: $(WSERV_OBJECTS)
-	$(CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(DEFS) -o $@ $(WSERV_OBJECTS) $(LIBS)
+	$(CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(DEFS) -o $@ $(WSERV_OBJECTS)
 
 # use this to generate something to include below.
 makedepend: $(SOURCES) $(IRCIO_SOURCES) $(WSERV_SOURCES) $(IRCFLUSH_SOURCES)
--- ircii-20051015.orig/configure
+++ ircii-20051015/configure
@@ -4644,7 +4644,7 @@ main()
 postcode=') != -1)) {
 		signal(SIGALRM, alarmed);
 		alarm(3);
-		recvfrom(f, b, 12, 0, (struct sockaddr *)x, /*(socklen_t)*/&l);
+		recvfrom(f, b, 12, 0, (struct sockaddr *)x, (socklen_t)&l);
 		alarm(0);
 		exit(0);
 	}
--- ircii-20051015.orig/configure.in
+++ ircii-20051015/configure.in
@@ -635,7 +635,7 @@ main()
 postcode=') != -1)) {
 		signal(SIGALRM, alarmed);
 		alarm(3);
-		recvfrom(f, b, 12, 0, (struct sockaddr *)x, /*(socklen_t)*/&l);
+		recvfrom(f, b, 12, 0, (struct sockaddr *)x, (socklen_t)&l);
 		alarm(0);
 		exit(0);
 	}
--- ircii-20051015.orig/script/version
+++ ircii-20051015/script/version
@@ -7,4 +7,4 @@
 # version and scripts version
 #
 
-set CLIENT_INFORMATION ircii 20020912: AT&T you will (ojnk!)
+set CLIENT_INFORMATION ircii-debian 20051015-2: AT&T you will (ojnk!)
--- ircii-20051015.orig/doc/ircII.1
+++ ircii-20051015/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 pa
 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
+.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 .../lib/irc/script/global
-file loaded at the start of every
-.I ircII
-session.
+.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
 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),
--- ircii-20051015.orig/include/config.h.dist
+++ ircii-20051015/include/config.h.dist
@@ -232,4 +232,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_ */
--- ircii-20051015.orig/include/defs.h.in
+++ ircii-20051015/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
 
 /*
--- ircii-20051015.orig/source/window.c
+++ ircii-20051015/source/window.c
@@ -1421,6 +1421,9 @@ realloc_channels(window)
 	int	flag = 1;
 	ChannelList	*chan;
 
+	if (window->server == -1)
+		return;
+
 	while ((tmp = traverse_all_windows(&flag)))
 		if (window != tmp && tmp->server == window->server)
 		{
--- ircii-20051015.orig/source/irc.c
+++ ircii-20051015/source/irc.c
@@ -1333,8 +1333,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;
--- ircii-20051015.orig/source/server.c
+++ ircii-20051015/source/server.c
@@ -1367,8 +1367,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");
--- ircii-20051015.orig/source/dcc.c
+++ ircii-20051015/source/dcc.c
@@ -116,6 +116,7 @@ struct	deadlist
 
 extern	int	in_ctcp_flag;
 extern int dgets_errno;
+extern int load_depth;
 static	off_t	filesize = 0;
 
 DCC_list	*ClientList = NULL;
@@ -887,6 +888,9 @@ dcc_filesend(args)
 		return;
 	}
 #endif /* S_IFDER */
+	/* okay, I hope restricting this stupid check to NOVICE is Okay -ecki@debian.org */
+	if (get_int_var(NOVICE_VAR) && !load_depth)
+	{
 	if (scanstr(FileBuf, UP("/etc/")))
 	{
 		yell("Send request rejected");
@@ -897,6 +901,7 @@ dcc_filesend(args)
 		yell("Send request rejected");
 		return;
 	}
+	}
 	filesize = stat_buf.st_size;
 	Client = dcc_searchlist(FileBuf, user, DCC_FILEOFFER, 1, filename);
 	if ((Client->file = open(CP(Client->description), O_RDONLY | O_BINARY)) == -1)
--- ircii-20051015.orig/source/sl.c
+++ ircii-20051015/source/sl.c
@@ -41,7 +41,7 @@
 #include "irc.h"
 IRCII_RCSID("@(#)$eterna: sl.c,v 1.1 2002/10/04 04:50:26 mrg Exp $");
 
-#include <sl.h>
+#include "sl.h"
 
 #define _SL_CHUNKSIZE	20
 
--- ircii-20051015.orig/source/mksiginc.c
+++ ircii-20051015/source/mksiginc.c
@@ -52,7 +52,7 @@ main(argc, argv, envp)
 	int i;
 
 	signames[0] = "ZERO";
-	for (i = 1; i < MAXSIG; i++);
+	for (i = 1; i < MAXSIG; i++)
 		signames[i] = 0;
 
 #ifdef SIGABRT
--- ircii-20051015.orig/source/input.c
+++ ircii-20051015/source/input.c
@@ -57,7 +57,7 @@ IRCII_RCSID("@(#)$eterna: input.c,v 1.43
 #define WIDTH 10
 
 /* input_prompt: contains the current, unexpanded input prompt */
-static	u_char	*input_prompt = (u_char *) 0;
+static	u_char	*input_prompt = empty_string;
 
 static struct mb_data mbdata;
 static int mbdata_ok = 0;
