Index: .gitignore
===================================================================
--- .gitignore	(revision ee0574ce7974a45c8080d1215db912b8f3e1444c)
+++ .gitignore	(revision ee0574ce7974a45c8080d1215db912b8f3e1444c)
@@ -1,2 +1,3 @@
+*~
 *.a
 autom4te.cache
@@ -10,4 +11,5 @@
 core
 jabber.log
+libfaim/rxhandlers.c.orig
 Makefile
 META.yml
Index: Makefile.in
===================================================================
--- Makefile.in	(revision d4b6b23362b3a9b7e5b8ca836bfceba4383c11f7)
+++ Makefile.in	(revision d4b6b23362b3a9b7e5b8ca836bfceba4383c11f7)
@@ -33,5 +33,5 @@
 
 EXE = barnowl
-PERL_MODULES = Jabber
+PERL_MODULES = Jabber IRC
 MODULE_DIRS = $(PERL_MODULES:%=perl/modules/%)
 
Index: debian/README.Debian
===================================================================
--- debian/README.Debian	(revision 1b3023e70800b46584987bd943109fdde1a54075)
+++ debian/README.Debian	(revision 1b3023e70800b46584987bd943109fdde1a54075)
@@ -0,0 +1,9 @@
+barnowl for Debian
+--------------
+
+owl is one of the simpler (while still being extensible) non-graphical
+zephyr clients, which may make it simpler to get started as a user.
+
+Barnowl is a fork of owl with Jabber support.
+
+ -- Sam Hartman <hartmans@debian.org>, Sat,  3 Mar 2007 14:49:31 -0500
Index: debian/barnowl-irc.install
===================================================================
--- debian/barnowl-irc.install	(revision 1b3023e70800b46584987bd943109fdde1a54075)
+++ debian/barnowl-irc.install	(revision 1b3023e70800b46584987bd943109fdde1a54075)
@@ -0,0 +1,1 @@
+usr/share/barnowl/modules/IRC.par
Index: debian/barnowl.dirs
===================================================================
--- debian/barnowl.dirs	(revision 1b3023e70800b46584987bd943109fdde1a54075)
+++ debian/barnowl.dirs	(revision 1b3023e70800b46584987bd943109fdde1a54075)
@@ -0,0 +1,1 @@
+usr/bin
Index: debian/barnowl.docs
===================================================================
--- debian/barnowl.docs	(revision cacc65bf3a2801a2a019d987c5c70cf29f6c93fd)
+++ debian/barnowl.docs	(revision cacc65bf3a2801a2a019d987c5c70cf29f6c93fd)
@@ -0,0 +1,2 @@
+doc/*.txt
+AUTHORS
Index: debian/barnowl.install
===================================================================
--- debian/barnowl.install	(revision 43ff04b88cdedcc081481f13ffe6a4fcfa3e8be8)
+++ debian/barnowl.install	(revision 43ff04b88cdedcc081481f13ffe6a4fcfa3e8be8)
@@ -0,0 +1,4 @@
+usr/bin/barnowl
+usr/share/barnowl/lib/*
+usr/share/man/man1/barnowl.1
+usr/share/barnowl/modules/Jabber.par
Index: debian/changelog
===================================================================
--- debian/changelog	(revision 209ea948656001815132d477a0dfc0929e5b4c24)
+++ debian/changelog	(revision 209ea948656001815132d477a0dfc0929e5b4c24)
@@ -0,0 +1,191 @@
+barnowl (1.0.3-1) unstable; urgency=low
+  
+  * New upstream release
+  * Call perl_sys_init3; Closes: #495056
+
+ -- Sam Hartman <hartmans@debian.org>  Sat, 13 Dec 2008 18:40:42 -0500
+
+barnowl (1.0.3-0debathena1) unstable; urgency=low
+
+  * New upstream version
+
+ -- Evan Broder <broder@mit.edu>  Sun, 02 Nov 2008 15:07:28 -0500
+
+barnowl (1.0.1-2) unstable; urgency=low
+
+  * Don't include LGPL in debian/copyright
+  * Fix description line
+
+ -- Sam Hartman <hartmans@debian.org>  Sat, 31 May 2008 10:55:08 -0400
+
+barnowl (1.0.1-1) unstable; urgency=low
+
+  * New Upstream version
+  * Upload to Debian, Closes: #483382
+      - The IRC module is split into its own package at the request of
+    upstream.  They believe it is less stable than the rest of the
+    project.  
+
+ -- Sam Hartman <hartmans@debian.org>  Fri, 30 May 2008 19:38:19 -0400
+
+barnowl (1.0.0-1) unstable; urgency=low
+
+  * First upstream release
+
+ -- Sam Hartman <hartmans@debian.org>  Wed, 28 May 2008 10:40:54 -0400
+
+barnowl (1.0-0debathena1) unstable; urgency=low
+
+  * New upstream version - 1.0 release
+
+ -- Evan Broder <broder@mit.edu>  Tue, 27 May 2008 14:22:05 -0400
+
+barnowl (0.0.r1048-0debathena1) unstable; urgency=low
+
+  * Add the IRC module as a separate package
+
+ -- Evan Broder <broder@mit.edu>  Fri, 23 May 2008 16:16:40 -0400
+
+barnowl (0.0.r1046-0debathena1) unstable; urgency=low
+
+  * New upstream version
+
+ -- Evan Broder <broder@mit.edu>  Fri, 16 May 2008 15:27:17 -0400
+
+barnowl (0.0.r1017-0debathena1) unstable; urgency=low
+
+  * new build
+  * use cdbs
+
+ -- Gregory Nathan Price <price@mit.edu>  Sun,  6 Apr 2008 17:24:37 -0400
+
+barnowl (0.0.r650-1) unstable; urgency=low
+
+  * new build
+
+ -- Sam Hartman <hartmans@debian.org>  Thu,  5 Apr 2007 10:35:13 -0400
+
+barnowl (0.0.r643-1) unstable; urgency=low
+
+  * Fork of owl.
+
+ -- Sam Hartman <hartmans@debian.org>  Thu,  5 Apr 2007 10:34:47 -0400
+
+owl (2.1.8-2.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Include a patch from Andreas Jochens to fix compilation with gcc-4.0.
+    Closes: #287891
+  * Add some prototypes to perlglue.xs to avoid the implicit conversion of
+    return pointers from owl_zephyr_get_realm() & owl_zephyr_get_sender().
+    Closes: #326106
+
+ -- dann frazier <dannf@debian.org>  Tue, 11 Oct 2005 20:47:51 -0600
+
+owl (2.1.8-2) unstable; urgency=low
+
+  * zcrypt.c: use kerberosIV/des.h, not the openafs one. Closes: #189108.
+  * configure.in: change it in the test, too.
+
+ -- Mark W. Eichin <eichin@thok.org>  Sun, 29 Aug 2004 16:25:03 -0400
+
+owl (2.1.8-1) unstable; urgency=low
+
+  * New upstream release.  Kept debian/*, dropped all old patches
+    (everything that mattered was already upstream.)
+  * debian/copyright: new upstream location and mailing lists
+  * configure.in: don't look for libdes, it breaks kerberized zephyr.
+  * zephyr.c: actually record error_message in owl_function_error calls.     
+
+ -- Mark W. Eichin <eichin@thok.org>  Sun, 29 Aug 2004 13:21:53 -0400
+
+owl (1.2.9-1.1) unstable; urgency=low
+
+  * NMU
+  * Fix compile error, patch in BTS.  Closes: #189108
+
+ -- LaMont Jones <lamont@debian.org>  Sun,  3 Aug 2003 18:54:07 -0600
+
+owl (1.2.9-1) unstable; urgency=low
+
+  * New upstream release
+  * update fixes resize problem (Closes: #182897)
+  * upstream also took changes for perl multithreading, thanks Bas
+    Zoetekouw and Lamont Jones for the NMU (Closes: #159123)
+	
+ -- Mark W. Eichin <eichin@thok.org>  Sun, 13 Apr 2003 21:04:52 -0400
+
+owl (1.1.3-1.1) unstable; urgency=low
+
+  * NMU
+  * Fix perl 5.8 build problem.  Closes: #159123
+
+ -- LaMont Jones <lamont@debian.org>  Tue,  8 Oct 2002 18:21:44 -0600
+
+owl (1.1.3-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Mark W. Eichin <eichin@thok.org>  Fri,  5 Jul 2002 14:33:23 -0400
+
+owl (1.0.1-4) unstable; urgency=low
+
+  * debian/control: build-depend on a version of libzephyr late enough to
+    have #110486 fixed.  (Closes: #148404)
+
+ -- Mark W. Eichin <eichin@thok.org>  Thu, 30 May 2002 14:19:18 -0400
+
+owl (1.0.1-3) unstable; urgency=low
+
+  * debian/shlibs.local: override libzephyr3-krb's shlibs file until
+    #148175 is fixed.  (Closes: #148107)
+
+ -- Mark W. Eichin <eichin@thok.org>  Sat, 25 May 2002 18:35:09 -0400
+
+owl (1.0.1-2) unstable; urgency=low
+
+  * update README.debian from pre-release.
+  * configure.in: ditch the explicit krb tests, so we can get the right
+    libs. Crudely done, improvements sought.
+
+ -- Mark W. Eichin <eichin@thok.org>  Sat, 25 May 2002 02:19:47 -0400
+
+owl (1.0.1-1) unstable; urgency=low
+
+  * New upstream release.  Includes the 1.0.1 fixes below.
+  * debian/watch: new file, lets us use uscan and be very lazy :-)
+
+ -- Mark W. Eichin <eichin@thok.org>  Fri, 24 May 2002 17:42:44 -0400
+
+owl (1.0-1) unstable; urgency=low
+
+  * New upstream release (first public deb.) (Closes: #147980)
+  * zephyr.c (loadloginsubs, loadsubs): use free correctly.  (pre-1.0.1 fix)
+  * util.c (owl_free): void, don't return.  (pre-1.0.1 fix)
+
+ -- Mark W. Eichin <eichin@thok.org>  Fri, 24 May 2002 01:27:28 -0400
+
+owl (0.10-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Mark W. Eichin <eichin@thok.org>  Tue,  7 May 2002 17:25:28 -0400
+
+owl (0.9-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Mark W. Eichin <eichin@thok.org>  Sun, 28 Apr 2002 22:29:02 -0400
+
+owl (0.8.1-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Mark W. Eichin <eichin@thok.org>  Wed, 24 Apr 2002 19:19:29 -0400
+
+owl (0.7-1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Mark W. Eichin <eichin@thok.org>  Tue, 23 Apr 2002 01:58:14 -0400
+
Index: debian/compat
===================================================================
--- debian/compat	(revision 1b3023e70800b46584987bd943109fdde1a54075)
+++ debian/compat	(revision 1b3023e70800b46584987bd943109fdde1a54075)
@@ -0,0 +1,1 @@
+4
Index: debian/control
===================================================================
--- debian/control	(revision d85cf01ac25794fedc6c5e32e62448cf3f132c7a)
+++ debian/control	(revision d85cf01ac25794fedc6c5e32e62448cf3f132c7a)
@@ -0,0 +1,31 @@
+Source: barnowl
+Section: net
+Priority: optional
+Maintainer: Sam Hartman <hartmans@debian.org>
+Build-Depends: cdbs (>= 0.4.23-1.1), debhelper (>= 4.2.0), autoconf, libglib2.0-dev, libzephyr-dev, libncurses5-dev, libncursesw5-dev, libkrb5-dev, libperl-dev, pkg-config, zip
+Standards-Version: 3.7.2
+
+Package: barnowl
+Architecture: any
+Depends: ${shlibs:Depends}, ${perl:Depends}, libnet-dns-perl, libauthen-sasl-perl, libdigest-sha1-perl, libgssapi-perl, libio-socket-ssl-perl, libpar-perl
+Suggests: zephyr-clients
+Description: A curses-based tty Jabber and Zephyr client
+ A curses-based instant-messaging client supporting the Jabber, IRC, AIM 
+ and Zephyr  protocols.  Much of the functionality is written in
+ Perl, which is supported as an extension language.
+ .
+ This is a fork of ktools software's owl Zephyr/AIM client.
+
+Package: barnowl-irc
+Architecture: all
+Depends: ${shlibs:Depends}, ${perl:Depends}, libnet-irc-perl, libclass-accessor-perl, barnowl
+Priority: extra
+Description: Provide IRC support for the BarnOwl Zephyr client
+ Install the Perl-based IRC module which will add IRC support to
+ BarnOwl the next time it is reloaded.
+ .
+ BarnOwl is a curses-based instant-messaging client supporting the
+ Zephyr, Jabber, IRC and AIM protocols. Much of the functionality is
+ written in Perl, which is supported as an etension language.
+ .
+ BarnOwl is a fork of ktools software's owl Zephyr/AIM client.
Index: debian/control.in
===================================================================
--- debian/control.in	(revision 4041f8e5187b4c0c130e493bae831cd32eb336d3)
+++ debian/control.in	(revision 4041f8e5187b4c0c130e493bae831cd32eb336d3)
@@ -0,0 +1,30 @@
+Source: barnowl
+Section: net
+Priority: optional
+Maintainer: Sam Hartman <hartmans@debian.org>
+Build-Depends: @cdbs@, libglib2.0-dev, libzephyr-dev, libncurses5-dev, libncursesw5-dev, libkrb5-dev, libperl-dev, pkg-config, zip
+Standards-Version: 3.7.2
+
+Package: barnowl
+Architecture: any
+Depends: ${shlibs:Depends}, ${perl:Depends}, libnet-dns-perl, libauthen-sasl-perl, libdigest-sha1-perl, libgssapi-perl, libio-socket-ssl-perl, libpar-perl
+Suggests: zephyr-clients
+Description: A curses-based tty Jabber and Zephyr client
+ A curses-based instant-messaging client supporting the Jabber, IRC, AIM and Zephyr  protocols.  Much of the functionality is written in
+ Perl, which is supported as an extension language.
+ .
+ This is a fork of ktools software's owl Zephyr/AIM client.
+
+Package: barnowl-irc
+Architecture: all
+Depends: ${shlibs:Depends}, ${perl:Depends}, libnet-irc-perl, libclass-accessor-perl, barnowl
+Priority: extra
+Description: Provide IRC support for the BarnOwl Zephyr client
+ Install the Perl-based IRC module which will add IRC support to
+ BarnOwl the next time it is reloaded.
+ .
+ BarnOwl is a curses-based instant-messaging client supporting the
+ Zephyr, Jabber, IRC and AIM protocols. Much of the functionality is
+ written in Perl, which is supported as an etension language.
+ .
+ BarnOwl is a fork of ktools software's owl Zephyr/AIM client.
Index: debian/copyright
===================================================================
--- debian/copyright	(revision 645a8d94576b36c97fe32a0360eb4021fa68f534)
+++ debian/copyright	(revision 645a8d94576b36c97fe32a0360eb4021fa68f534)
@@ -0,0 +1,73 @@
+This package was debianized by Gregory Nathan Price <price@mit.edu> on
+2008-04-06.
+
+It was downloaded by svn from file:///afs/sipb.mit.edu/project/barnowl/src/svn
+
+Upstream Authors: barnowl-dev@mit.edu
+
+Barnowl was written primarily by Nelson Elhage and Alejandro Sedeno,
+of the Student Information Processing Board of the Massachusetts
+Institute of Technology.
+
+The original owl was primarily written by James Kretchmar at the
+Massachusetts Institute of Technology, with substantial contributions
+and improvements from Erik Nygren.
+
+Copyright:
+Copyright (c) 2006-2008 The BarnOwl Developers. All rights reserved.
+Copyright (c) 2004 James Kretchmar. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+  * Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+
+  * Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+
+  * Redistributions in any form must be accompanied by information on
+    how to obtain complete source code for the BarnOwl software and
+    any accompanying software that uses the BarnOwl software. The
+    source code must either be included in the distribution or be
+    available for no more than the cost of distribution plus a nominal
+    fee, and must be freely redistributable under reasonable
+    conditions. For an executable file, complete source code means the
+    source code for all modules it contains. It does not include
+    source code for modules or files that typically accompany the
+    major components of the operating system on which the executable
+    file runs.
+
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
+NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+======================================================================
+
+Files under perl/modules/Jabber/lib/Net and perl/modules/lib/XML are
+Copyright (C) 1998-2004 Jabber Software Foundation http://jabber.org/
+
+   This library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public
+   License as published by the Free Software Foundation; either
+   version 2 of the License, or (at your option) any later version.
+
+   This library 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
+   Library General Public License for more details.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/LGPL-2'.
Index: debian/rules
===================================================================
--- debian/rules	(revision 24de1f7a256d092b48332da03820c4d3860b7fe3)
+++ debian/rules	(revision 24de1f7a256d092b48332da03820c4d3860b7fe3)
@@ -0,0 +1,17 @@
+#!/usr/bin/make -f
+
+DEB_AUTO_UPDATE_AUTOCONF = 2.50
+
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/autotools.mk
+
+DEB_DH_INSTALL_SOURCEDIR = $(DEB_DESTDIR)
+CFLAGS += -DOWL_VERSION_STRING=\"\\\"$(shell dpkg-parsechangelog | sed -ne 's/Version: //p')\\\"\"
+
+clean::
+	rm -f configure
+	rm -f perl/modules/Jabber/Makefile.old
+	rm -f perl/modules/Jabber/Jabber.par
+	rm -f perl/modules/IRC/Makefile.old
+	rm -f perl/modules/IRC/IRC.par
Index: debian/shlibs.local
===================================================================
--- debian/shlibs.local	(revision 1b3023e70800b46584987bd943109fdde1a54075)
+++ debian/shlibs.local	(revision 1b3023e70800b46584987bd943109fdde1a54075)
@@ -0,0 +1,1 @@
+libzephyr 3 libzephyr3
Index: owl.c
===================================================================
--- owl.c	(revision 6eaf35b1b74b142244bdde7df41bb5891454bbb7)
+++ owl.c	(revision 5b37c063d5a6a7a9fdfe3cde5a21e30d94beee7b)
@@ -20,4 +20,5 @@
 #include <locale.h>
 #include "owl.h"
+
 
 #if OWL_STDERR_REDIR
@@ -232,5 +233,5 @@
   owl_function_debugmsg("startup: processing config file");
   owl_context_set_readconfig(owl_global_get_context(&g));
-  perlerr=owl_perlconfig_initperl(configfile);
+  perlerr=owl_perlconfig_initperl(configfile, &argc, &argv, &env);
   if (perlerr) {
     endwin();
Index: perlconfig.c
===================================================================
--- perlconfig.c	(revision 3ea31b6aee25c06dc9ca8af933d4d920eaf112c4)
+++ perlconfig.c	(revision 5b37c063d5a6a7a9fdfe3cde5a21e30d94beee7b)
@@ -277,5 +277,5 @@
 
 
-char *owl_perlconfig_initperl(char * file)
+char *owl_perlconfig_initperl(char * file, int *Pargc, char ***Pargv, char *** Penv)
 {
   int ret;
@@ -285,4 +285,5 @@
 
   /* create and initialize interpreter */
+  PERL_SYS_INIT3(Pargc, Pargv, Penv);
   p=perl_alloc();
   owl_global_set_perlinterp(&g, (void*)p);
