--- irssi-0.8.12.orig/debian/changelog
+++ irssi-0.8.12/debian/changelog
@@ -0,0 +1,150 @@
+irssi (0.8.12-5~bpo40+1) etch-backports; urgency=low
+
+  * Rebuild for etch-backports.
+
+ -- Gerfried Fuchs <rhonda@debian.at>  Mon, 15 Sep 2008 10:32:40 +0200
+
+irssi (0.8.12-5) unstable; urgency=low
+
+  * New patches:
+    - perlembed-fix to fix adjust to perembed documentation, fixing a
+      possible breakage on at least hppa (closes: #495059)
+    - proxy-join-fix to fix a buffer problem which made joining lots of
+      channels through proxy not get all through, pulled from upstream
+      revision 4840 (closes: #308673)
+
+ -- Gerfried Fuchs <rhonda@debian.at>  Tue, 02 Sep 2008 13:57:52 +0200
+
+irssi (0.8.12-4) unstable; urgency=low
+
+  * Remove alternative handling cleanup from before etch release.
+  * Fixed a typo noticed by John Dong, patch typo-authentification
+    (closes: #465570)
+  * Pull upstream revision r4612 as patch help-URL-fix to fix help URL
+    (closes: #485140)
+  * Remove reference to LEAVE in help files, patch leave-help
+    (closes: #255535)
+  * Apply patch from Tim Retout to use default colour for ownnick and actions
+    instead of white (closes: #479171)
+  * Remove autogenerated files, both from patch series and also in clean
+    target. Thanks to Felix Palmen for mentioning it (closes: #476473)
+  * Add doc-base files for the FAQ, manual and startup-HOWTO
+    (closes: #451690, #480098)
+  * Update to Standards-Version 3.8.0:
+    - Add debian/README.source referencing the quilt documentation.
+  * Actually also _use_ the menu file for irssi...  And removed some of the
+    other commented dh_* entries in debian/rules.
+  * Updated debian/copyright to contain more current informations, added the
+    keyword exception to the openssl linking GPL addition.
+  * Removed empty debian/irssi.postinst file.
+
+ -- Gerfried Fuchs <rhonda@debian.at>  Mon, 09 Jun 2008 12:11:19 +0200
+
+irssi (0.8.12-3) unstable; urgency=low
+
+  [ Gerfried Fuchs ]
+  * Switch to quilt to make it possible to produce the following patch without
+    any headaches.
+  * patch fullword-full added about printing -full instead of -fullword which
+    is the wrong option to /hilight
+  * Put the four created files into patches too so that everything changed is
+    below /debian/ only.
+  * Imported all into git for being able to team maintain (Closes: #445840)
+  * Add Vcs-* fields to control file.
+  * Patches pulled from upstream svn:
+    - 07ctcp-channel: Do not allow /ping by itself to ctcp ping a channel.
+    - 08server==NULL-handling: Handle server == NULL case in skip_target.
+    Thanks to Pedro Fragoso from ubuntu for notifying me about them.
+  * Bumped Standards-Version to 3.7.3, no further required changes.
+  * Bump debhelper compat level to 5.
+
+ -- Gerfried Fuchs <rhonda@debian.at>  Thu, 17 Jan 2008 09:55:41 +0100
+
+irssi (0.8.12-2) unstable; urgency=low
+
+  [ Gerfried Fuchs ]
+  * Added Homepage: to control file.
+  * Added watchfile.
+  * patch chanmode_expando_strip added for changing default to not expose
+    channel key by default (Closes: #347944)
+  * patch ctcp_version_reply added for not exposing $sysname $sysarch in ctcp
+    version replies by default (Closes: #373094)
+  * patch firsttimer_text added which extends the text displayed to firsttime
+    users about irc.debian.org and #debian (Closes: #393707)
+  * Remove irssi-text dummy package from control and all the old package
+    relation stats to it and irssi-snapshot, and irssi-scripts versioning.
+  * patch nickmask-mask added about printing -mask instead of -nickmask which
+    is a wrong option to /hilight (Closes: #417397)
+  * Don't ignore make distclean errors anymore.
+  * Removed automatic config.{guess,sub} update from debian/rules.
+
+ -- Gerfried Fuchs <rhonda@debian.at>  Thu, 18 Oct 2007 08:29:50 +0200
+
+irssi (0.8.12-1) unstable; urgency=low
+
+  [ David Pashley ]
+  * Gerfried Fuchs <rhonda@debian.at> added to Uploaders (Closes: #445840)
+  * Removed old not used patches from the package.
+
+  [ Gerfried Fuchs ]
+  * New upstream release (Closes: #421053)
+    - patch 05upgrade-check-binary.dpatch applied upstream.
+    - patch 08doublefree applied upstream.
+    - C1 control characters aren't passed through anymore (Closes: #435315)
+    - return random host on DNS round robin (Closes: #374715)
+  * Updated menu file to new menu policy section, added longtitle.
+  * Bumped Standards-Version to 3.7.2, no changes needed.
+
+ -- Gerfried Fuchs <rhonda@debian.at>  Wed, 17 Oct 2007 07:54:49 +0200
+
+irssi (0.8.10-2) unstable; urgency=low
+
+  * Fix Conflicts and Replaces lines to make backporting to sarge easier
+  * Fix the menu entry (Closes: #274201)
+  * Added a Provides for irc (Closes: #267411)
+  * Removed calls to ldconfig in postinst and postrm by calling dh_makeshlibs
+    with the -n flag
+  * Remove alteratives for irc and irssi (Closes: #348149)
+  * Fix a glib memory bug. patch by Chris Moore <dooglus@gmail.com>
+    (Closes: #358172, #358499)
+  * Include changelog from irssi-text (Closes: #344292)
+
+ -- David Pashley <david@davidpashley.com>  Fri, 30 Dec 2005 15:12:29 +0000
+
+irssi (0.8.10-1) unstable; urgency=low
+
+  * new upstream release
+
+ -- David Pashley <david@davidpashley.com>  Sat, 10 Dec 2005 21:25:51 +0000
+
+irssi (0.8.10~rc8-1) unstable; urgency=low
+
+  * New upstream (Closes: #340287)
+  * Add dpatch to the build-depends
+
+ -- David Pashley <david@davidpashley.com>  Wed, 30 Nov 2005 23:10:27 +0000
+
+irssi (0.8.10~rc6-1) unstable; urgency=low
+
+  * New upstream version
+  * Disable the GnuTLS patch for now.
+  * Added Provides, Replaces and Conflicts for irssi-text and irssi-snapshot 
+
+ -- David Pashley <david@davidpashley.com>  Fri, 14 Oct 2005 00:39:15 +0100
+
+irssi (0.8.10~rc5-1) unstable; urgency=low
+
+  * Initial packaging to unify irssi-text and irssi-snapshot
+  * Provide a -dev package for building modules (Closes: #184771)
+  * Check for an executable file before we try to execute it with /upgrade
+    (Closes: #242026)
+  * Only allow /exec to recurse 100 times (Closes: #186416)
+  * Call SIGTSTP rather than SIGSTOP on ^Z (With thanks to Mark Hymers
+    <mark.hymers@ncl.ac.uk>) (Closes: #177108) 
+  * Redirect Glib critical errors to the status window rather than to stderr
+    (Closes: #270596)
+  * Correctly lower case chat protocols using g_ascii_strdown() rather than
+    using the deprecated g_strdown() (pushed upstream) (Closes: #232628)
+
+ -- David Pashley <david@davidpashley.com>  Sun, 10 Jul 2005 15:11:38 +0300
+
--- irssi-0.8.12.orig/debian/watch
+++ irssi-0.8.12/debian/watch
@@ -0,0 +1,3 @@
+version=2
+# Site/Directory         Pattern                   Version  Script
+http://irssi.org/files/  irssi-([\d\.]+)\.tar\.gz  debian  uupdate
--- irssi-0.8.12.orig/debian/rules
+++ irssi-0.8.12/debian/rules
@@ -0,0 +1,106 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+include /usr/share/quilt/quilt.make
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -O0
+else
+	CFLAGS += -O2
+endif
+
+config.status: patch configure
+	dh_testdir
+	# Add here commands to configure the package.
+	CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
+			 --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info \
+			 --sysconfdir=/etc \
+	--without-servertest --enable-ipv6 --with-bot --with-proxy \
+	--enable-perl --with-perl-lib=vendor
+
+
+build: build-stamp
+
+build-stamp:  config.status
+	dh_testdir
+
+	# Add here commands to compile the package.
+	$(MAKE)
+	#docbook-to-man debian/irssi.sgml > irssi.1
+
+	touch build-stamp
+
+clean: unpatch
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp 
+
+	# Add here commands to clean up after the build process.
+	[ ! -f Makefile ] || $(MAKE) distclean
+
+	rm -f \
+		src/perl/common/Makefile.old \
+		src/perl/irc/Makefile.old \
+		src/perl/textui/Makefile.old \
+		src/perl/ui/Makefile.old \
+		src/perl/perl-signals-list.h \
+		src/perl/irssi-core.pl.h \
+		default-config.h \
+		default-theme.h
+
+	dh_clean 
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k 
+	dh_installdirs
+
+	# Add here commands to install the package into debian/tmp.
+	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs ChangeLog 
+	dh_installdocs
+	dh_installexamples
+	dh_install
+	dh_installmenu
+	dh_installman
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_perl
+	dh_makeshlibs -n
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install 
--- irssi-0.8.12.orig/debian/NEWS.Debian
+++ irssi-0.8.12/debian/NEWS.Debian
@@ -0,0 +1,12 @@
+irssi (0.8.10~rc5-1) unstable; urgency=low
+
+  * This package has the beginnings of GNUTLS support for SSL rather
+    than the upstream OpenSSL code.  This may have many bugs in and is
+    not feature complete. In particular it does not support verification
+    of the server's certificate. As a result the connection is vunerable
+    to man in the middle attack. This is only a regression if you use
+    the -cafile or -capath options to /connect. The data is still
+    encrypted.
+
+ -- David Pashley <david@davidpashley.com>  Sun, 17 Jul 2005 19:39:37 +0300
+
--- irssi-0.8.12.orig/debian/botti.1
+++ irssi-0.8.12/debian/botti.1
@@ -0,0 +1,97 @@
+.\" This -*- nroff -*- file has been generated from
+.\" DocBook SGML with docbook-to-man on Debian GNU/Linux.
+...\"
+...\"	transcript compatibility for postscript use.
+...\"
+...\"	synopsis:  .P! <file.ps>
+...\"
+.de P!
+\\&.
+.fl			\" force out current output buffer
+\\!%PB
+\\!/showpage{}def
+...\" the following is from Ken Flowers -- it prevents dictionary overflows
+\\!/tempdict 200 dict def tempdict begin
+.fl			\" prolog
+.sy cat \\$1\" bring in postscript file
+...\" the following line matches the tempdict above
+\\!end % tempdict %
+\\!PE
+\\!.
+.sp \\$2u	\" move below the image
+..
+.de pF
+.ie     \\*(f1 .ds f1 \\n(.f
+.el .ie \\*(f2 .ds f2 \\n(.f
+.el .ie \\*(f3 .ds f3 \\n(.f
+.el .ie \\*(f4 .ds f4 \\n(.f
+.el .tm ? font overflow
+.ft \\$1
+..
+.de fP
+.ie     !\\*(f4 \{\
+.	ft \\*(f4
+.	ds f4\"
+'	br \}
+.el .ie !\\*(f3 \{\
+.	ft \\*(f3
+.	ds f3\"
+'	br \}
+.el .ie !\\*(f2 \{\
+.	ft \\*(f2
+.	ds f2\"
+'	br \}
+.el .ie !\\*(f1 \{\
+.	ft \\*(f1
+.	ds f1\"
+'	br \}
+.el .tm ? font underflow
+..
+.ds f1\"
+.ds f2\"
+.ds f3\"
+.ds f4\"
+'\" t 
+.ta 8n 16n 24n 32n 40n 48n 56n 64n 72n  
+.TH "botti" "1" 
+.SH "NAME" 
+botti \(em Run an irssi module, such as a bot, without a UI 
+.SH "SYNOPSIS" 
+.PP 
+\fBbotti\fP [\fB\fIOPTIONS\fP\fP]  
+.SH "DESCRIPTION" 
+.PP 
+This manual page documents briefly the 
+\fBbotti\fP command. 
+.PP 
+Botti allows for you to run an irssi module without a UI. 
+This is most useful for bots, and by default botti will load the 
+"bot" module. 
+.PP 
+This manual page was written for the \fBDebian\fP distribution 
+because the original program does not have a manual page. 
+.SH "OPTIONS" 
+.IP "\fB--config\fP 	" 10 
+Specify the configuration file location. By default, 
+it is ~/.irssi/config. 
+.IP "\fB--home\fP 	" 10 
+Specify the irssi home directory location. By default, 
+it is ~/.irssi. 
+.IP "\fB-l\fP 	  \fB--load\fP 	" 10 
+Specify a module to load. By default, it is "bot". 
+.IP "\fB--session\fP 	" 10 
+Option used by the /UPGRADE command. 
+.IP "\fB-?\fP 	  \fB--help\fP 	" 10 
+Print instructions. 
+.IP "\fB--usage\fP 	" 10 
+Print simple usage instructions. 
+.SH "AUTHOR" 
+.PP 
+This manual page was written by David Nusinow \<david_nusinow@yahoo.com\> for 
+the \fBDebian\fP system (but may be used by others).  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 no Invariant Sections, no Front-Cover 
+Texts and no Back-Cover Texts. 
+...\" created by instant / docbook-to-man, Thu 24 Apr 2003, 02:34 
--- irssi-0.8.12.orig/debian/compat
+++ irssi-0.8.12/debian/compat
@@ -0,0 +1 @@
+5
--- irssi-0.8.12.orig/debian/control
+++ irssi-0.8.12/debian/control
@@ -0,0 +1,47 @@
+Source: irssi
+Section: net
+Priority: optional
+Maintainer: David Pashley <david@davidpashley.com>
+Uploaders: Gerfried Fuchs <rhonda@debian.at>
+Build-Depends: debhelper (>= 5), autotools-dev, libglib2.0-dev, perl (>= 5.8.1), libperl-dev (>= 5.8.1), libncurses5-dev, libssl-dev, openssl, quilt
+Standards-Version: 3.8.0
+Homepage: http://irssi.org/
+Vcs-Git: git://git.debian.org/git/users/alfie/irssi.git
+Vcs-Browser: http://git.debian.org/?p=users/alfie/irssi.git;a=summary
+
+Package: irssi
+Architecture: any
+Depends: ${shlibs:Depends}, ${perl:Depends}, ${misc:Depends}, perl-base(>= 5.8.1)
+Suggests: irssi-scripts
+Description: terminal based IRC client
+ Irssi is a terminal based IRC client for UNIX systems. It also supports
+ SILC and ICB protocols via plugins.
+ .
+ Features include:
+  * Autologging
+  * Formats and themes
+  * Configurable keybindings
+  * Paste detection
+  * Perl scripting
+  * Irssi-proxy
+  * Transparent upgrading
+  * Recode support
+
+Package: irssi-dev
+Architecture: any
+Depends: irssi
+Description: text-mode version of the irssi IRC client development files
+ Irssi is a terminal based IRC client for UNIX systems. It also supports
+ SILC and ICB protocols via plugins.
+ .
+ Features include:
+  * Autologging
+  * Formats and themes
+  * Configurable keybindings
+  * Paste detection
+  * Perl scripting
+  * Irssi-proxy
+  * Transparent upgrading
+  * Recode support
+ .
+ This package includes the development files for the irssi client.
--- irssi-0.8.12.orig/debian/copyright
+++ irssi-0.8.12/debian/copyright
@@ -0,0 +1,106 @@
+License
+=======
+
+    Copyright (C) 1998-2002 Timo Sirainen
+
+    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.
+
+A copy of the GPL can be found in /usr/share/common-licenses/GPL-2,
+later versions are included in the same directory.
+
+COPYING includes the following addition linking exception to the GPL:
+
+   Specific permission is granted for the GPLed code in this
+   distribition to be linked to OpenSSL without invoking GPL clause
+   2(b).
+
+Sources
+=======
+
+The source was obtained from http://www.irssi.org/files/
+
+Copyright
+=========
+
+AUTHORS contains:
+
+   Original code:
+
+     Timo Sirainen <cras@irssi.org>
+
+   Irssi staff (current maintainers) <staff@irssi.org>:
+
+     Valentin Batz (senneth, vb)
+     Wouter Coekaerts (coekie)
+     Jochen Eisinger (c0ffee)
+     Geert Hauwaerts
+     Emanuele Giaquinta (exg)
+     Jilles Tjoelker
+
+   Large feature patches by:
+
+     David Leadbeater (dg, dgl) : isupport
+     vjt@users.sf.net : SSL support
+     Joel Eriksson : SSL certs
+     Heikki Orsila : DCC SEND queueing
+     Mark Trumbull : DCC SERVER
+     Francesco Fracassi : Passive DCC
+
+   Other patches (grep for "patch" in ChangeLog) by:
+
+     Toby Peterson
+     Soren Jacobsen
+     Kuang-che Wu
+     Joost Vunderink (Garion)
+     Wang WenRui
+     Jean-Yves Lefort (decadix)
+     Joel Eriksson
+     Maarten van der Zwaart
+     Noah Levitt
+     Krzysztof Kowalik (Borys)
+     Peder Stray
+     mls@suse.de
+     nix@suhs.nu
+     Marcin Kowalczyk (Qrczak)
+     Petr Baudis
+     Bjoern Krombholz (fuchs)
+     aldem-irssi@aldem.net,
+     BC-bd
+     Juerd
+     Han
+     pv2b
+     Tommi Komulainen (tommik)
+     mike@po.cs.msu.su
+     zinx@magenet.net
+     yathen@web.de
+     paul@raade.org
+     Leszek Matok
+     tygrys@moo.pl
+     manoj@io.com
+     cph@cph.demon.co.uk
+     ganesh@earth.li
+     Jakub Jankowski (shasta)
+     vanilla@freebsd.org
+     Tinuk
+     Mark Glines
+     Kjetil Ødegaard
+     Chris Moore
+     ComradeP
+     Lauri Nurmi
+     Mikko Rauhala
+     loafier
+     Nicolas Collignon
+     Daniel Koning
+     Yi-Hsuan Hsin
+
+Debian Packaging
+================
+
+This packaging was written by David Pashley <david@davidpashley.com> and
+contains ideas and code from previous irssi packaging by Pekka Aleksi
+Knuutila <pa@debian.org>. In parts there has been updates to it by
+Gerfried Fuchs <rhonda@debian.at>.
+The debianization is licensed the same way as irssi itself.
--- irssi-0.8.12.orig/debian/irssi.doc-base.manual
+++ irssi-0.8.12/debian/irssi.doc-base.manual
@@ -0,0 +1,8 @@
+Document: irssi-manual
+Title: Irssi Manual
+Abstract: This Irssi User's Manual is slightly incomplete but can still
+ help for general concepts.
+Section: Network/Communication
+
+Format: Text
+Files: /usr/share/doc/irssi/manual.txt.gz
--- irssi-0.8.12.orig/debian/irssi-dev.install
+++ irssi-0.8.12/debian/irssi-dev.install
@@ -0,0 +1 @@
+debian/tmp/usr/include
--- irssi-0.8.12.orig/debian/README.source
+++ irssi-0.8.12/debian/README.source
@@ -0,0 +1,2 @@
+This package uses quilt for its patch management, see
+/usr/share/doc/quilt/README.source if you are unfamiliar with it.
--- irssi-0.8.12.orig/debian/irssi.install
+++ irssi-0.8.12/debian/irssi.install
@@ -0,0 +1,7 @@
+debian/tmp/etc/irssi.conf
+debian/tmp/usr/bin/botti
+debian/tmp/usr/bin/irssi
+debian/tmp/usr/lib/irssi/
+debian/tmp/usr/lib/perl5/
+debian/tmp/usr/share/doc/irssi/
+debian/tmp/usr/share/irssi/
--- irssi-0.8.12.orig/debian/irssi.doc-base.faq
+++ irssi-0.8.12/debian/irssi.doc-base.faq
@@ -0,0 +1,12 @@
+Document: irssi-faq
+Title: Irssi FAQ
+Abstract: This document answers frequently asked questions about the
+ Irssi IRC client.
+Section: Network/Communication
+
+Format: HTML
+Index: /usr/share/doc/irssi/faq.html
+Files: /usr/share/doc/irssi/faq.html
+
+Format: Text
+Files: /usr/share/doc/irssi/faq.txt.gz
--- irssi-0.8.12.orig/debian/irssi.manpages
+++ irssi-0.8.12/debian/irssi.manpages
@@ -0,0 +1,2 @@
+debian/botti.1
+debian/tmp/usr/share/man/man1/irssi.1
--- irssi-0.8.12.orig/debian/irssi.doc-base.startup-howto
+++ irssi-0.8.12/debian/irssi.doc-base.startup-howto
@@ -0,0 +1,9 @@
+Document: irssi-startup-howto
+Title: Irssi Startup HOWTO
+Abstract: A short HOWTO for new Irssi users (not to new IRC users ..) to
+ get you started.
+Section: Network/Communication
+
+Format: HTML
+Index: /usr/share/doc/irssi/startup-HOWTO.html
+Files: /usr/share/doc/irssi/startup-HOWTO.html
--- irssi-0.8.12.orig/debian/build-from-git
+++ irssi-0.8.12/debian/build-from-git
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+if [ ! -e configure ]; then
+   ./autogen.sh
+fi
+
+debuild -us -uc -i"(.git|.cvsignore|src/irc/bot|Makefile.old|startup-HOWTO-rus.html|servertest/server.c|\.in$|\.am$)"
--- irssi-0.8.12.orig/debian/irssi.menu
+++ irssi-0.8.12/debian/irssi.menu
@@ -0,0 +1,2 @@
+?package(irssi):needs="text" section="Applications/Network/Communication" \
+title="Irssi" longtitle="Terminal Based IRC Client" command="/usr/bin/irssi"
--- irssi-0.8.12.orig/debian/irssi.docs
+++ irssi-0.8.12/debian/irssi.docs
@@ -0,0 +1,4 @@
+NEWS
+README
+TODO
+debian/changelog.irssi-text
--- irssi-0.8.12.orig/debian/changelog.irssi-text
+++ irssi-0.8.12/debian/changelog.irssi-text
@@ -0,0 +1,269 @@
+irssi-text (0.8.9-9) unstable; urgency=low
+
+  * Update to dh-make compat 4 and depend on debhelper >=4
+  * Add a space in the menu file at the end of the line
+
+ -- David Pashley <david@davidpashley.com>  Sat, 28 May 2005 20:30:14 +0100
+
+irssi-text (0.8.9-8) unstable; urgency=low
+
+  * Updated the patch for #186416 to output a better error string
+  * Check for an executable file before we try to execute it with /upgrade
+    (Closes: #242026)
+
+ -- David Pashley <david@davidpashley.com>  Mon, 28 Mar 2005 20:01:38 +0100
+
+irssi-text (0.8.9-7) unstable; urgency=low
+
+  * Only allow /exec to recurse 100 times (Closes: #186416)
+  * Call SIGTSTP rather than SIGSTOP on ^Z (With thanks to Mark Hymers
+    <mark.hymers@ncl.ac.uk>) (Closes: #177108) 
+
+ -- David Pashley <david@davidpashley.com>  Sun, 27 Mar 2005 16:07:19 +0100
+
+irssi-text (0.8.9-6) unstable; urgency=low
+
+  * Include patch to fix Big5 input (from
+    http://www.freshports.org/chinese/irssi/) (Closes: #274201) 
+
+ -- David Pashley <david@davidpashley.com>  Sat, 26 Mar 2005 13:06:45 +0000
+
+irssi-text (0.8.9-5) unstable; urgency=low
+
+  * Redirect Glib critical errors to the status window rather than to stderr
+    (Closes: #270596)
+
+ -- David Pashley <david@davidpashley.com>  Thu, 24 Mar 2005 08:45:34 +0000
+
+irssi-text (0.8.9-4) unstable; urgency=low
+
+  * Correctly lower case chat protocols using g_ascii_strdown() rather than
+    using the deprecated g_strdown() (Closes: #232628)
+
+ -- David Pashley <david@davidpashley.com>  Wed, 23 Mar 2005 08:29:32 +0000
+
+irssi-text (0.8.9-3) unstable; urgency=medium
+
+  * Fix linker errors on IA64 by building with -O2 on that platform too.
+  * Upload with medium urgency to get the previous fixes into sarge
+
+ -- David Pashley <david@davidpashley.com>  Sat, 19 Mar 2005 17:43:07 +0000
+
+irssi-text (0.8.9-2) unstable; urgency=medium
+
+  * Upload medium as it would be useful to get the irssi-common and perl fixes
+    into sarge.
+  * Conflict with irssi-common (Closes: #263320)
+  * Update to Standards-Version 3.6.1
+  * Update to building against libglib2.0
+  * Fix the menu file quoting
+  * Depend on autotools-dev and update config.{status,guess} automatically
+    (Closes: #296989)
+  * Recompile against libperl5.8 (5.8.4) (Closes: #248020, #224930, #247104) 
+
+ -- David Pashley <david@davidpashley.com>  Tue, 15 Mar 2005 07:51:23 +0000
+
+irssi-text (0.8.9-1) unstable; urgency=low
+
+  * Acknowledge NMU
+  * New Maintainer
+
+ -- David Pashley <david@davidpashley.com>  Sun, 25 Jan 2004 13:29:21 +0000
+
+irssi-text (0.8.9-0.1) unstable; urgency=high
+
+  * NMU
+  * New upstream release, which fixes a remote crash with non-x86
+    architectures or with people running certain scripts (nicklist.pl,
+    tab_stop.pl most importantly) (closes: #223650, #223597)
+
+ -- Norbert Tretkowski <nobse@debian.org>  Fri, 12 Dec 2003 10:17:28 +0100
+
+irssi-text (0.8.6-7) unstable; urgency=low
+
+  * Recompiled against perl 5.8.2. This should fix the segfaults. (closes:
+    #219806, #220279)
+  * Fixed the irssi-alternative
+
+ -- Pekka Aleksi Knuutila <pa@debian.org>  Wed, 12 Nov 2003 01:12:37 +0200
+
+irssi-text (0.8.6-6) unstable; urgency=low
+
+  * Made the irc alternative point to irssi-text instead of irssi (closes:
+    #216870)
+
+ -- Pekka Aleksi Knuutila <pa@debian.org>  Mon, 27 Oct 2003 22:28:32 +0200
+
+irssi-text (0.8.6-5) unstable; urgency=low
+
+  * Recompiled against perl 5.8.1 (closes: #213288, #213356)
+  * Added irc alternative (closes: #183011)
+  * Added botti manpage (closes: #190538)
+
+ -- Pekka Aleksi Knuutila <pa@debian.org>  Tue, 30 Sep 2003 22:37:52 +0300
+
+irssi-text (0.8.6-4) unstable; urgency=low
+
+  * Recompiled static perl support because modularity turned out to be too
+    inconvenient (closes: #178593 #178594)
+  * Moved manpage from /usr/man to /usr/share/man (closes: #179520)
+
+ -- Pekka Aleksi Knuutila <pa@debian.org>  Tue,  4 Feb 2003 06:57:06 +0000
+
+irssi-text (0.8.6-3) unstable; urgency=low
+
+  * Added manpage by Michael Wiedmann
+  * Perl support is now compiled as a module
+  * Added Suggests: perl-base
+
+ -- Pekka Aleksi Knuutila <pa@debian.org>  Wed, 22 Jan 2003 21:44:27 +0200
+
+irssi-text (0.8.6-2) unstable; urgency=low
+
+  * Added "Replaces: irssi-scripts (<= 8)"
+  * Enabled SSL support, with a specific permission to be linked against
+    OpenSSL
+
+ -- Pekka Aleksi Knuutila <pa@debian.org>  Sat, 23 Nov 2002 14:37:38 +0200
+
+irssi-text (0.8.6-1) unstable; urgency=low
+
+  * New upstream release (closes: #166456)
+
+ -- Pekka Aleksi Knuutila <pa@debian.org>  Thu, 21 Nov 2002 22:50:31 +0200
+
+irssi-text (0.8.5-4) unstable; urgency=low
+
+  * Fixed formatting and added mention of the xirssi and irssi-snapshot
+    packages to the package description.
+
+ -- Pekka Aleksi Knuutila <pa@debian.org>  Sun,  8 Sep 2002 00:53:24 +0300
+
+irssi-text (0.8.5-3) unstable; urgency=low
+
+  * Recompiled against perl 5.8 (closes: #158024)
+
+ -- Pekka Aleksi Knuutila <pa@debian.org>  Sun, 25 Aug 2002 13:30:28 +0300
+
+irssi-text (0.8.5-2) unstable; urgency=low
+
+  * $(CFLAGS) is now really passed to make in debian/rules, so the package is
+    built without -O2 on ia64 (closes: #152912)
+
+ -- Pekka Aleksi Knuutila <pa@debian.org>  Fri, 19 Jul 2002 18:02:49 +0300
+
+irssi-text (0.8.5-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Pekka Aleksi Knuutila <pa@debian.org>  Thu, 20 Jun 2002 00:45:43 +0300
+
+irssi-text (0.8.4-2) unstable; urgency=high
+
+  * Made the package build without -O2 on ia64, due to a bug in gcc
+    (closes: #140274)
+
+ -- Pekka Aleksi Knuutila <pa@debian.org>  Thu, 28 Mar 2002 17:59:35 +0200
+
+irssi-text (0.8.4-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Pekka Aleksi Knuutila <pa@debian.org>  Wed, 13 Mar 2002 18:25:25 +0200
+
+irssi-text (0.8.2-2) unstable; urgency=low
+
+  * Added Conflict on irssi-scripts-1 and Suggests on newer versions
+    (closes: #138090)
+  * debian/rules now doesn't override CFLAGS if DEB_BUILD_OPTIONS includes
+    nocflags
+  * Updated the package description
+
+ -- Pekka Aleksi Knuutila <pa@debian.org>  Wed, 13 Mar 2002 15:58:15 +0200
+
+irssi-text (0.8.2-1) unstable; urgency=low
+
+  * New upstream release
+  * Added HTML files to /usr/share/doc
+
+ -- Pekka Aleksi Knuutila <pa@debian.org>  Tue, 12 Mar 2002 20:55:38 +0200
+
+irssi-text (0.8.1-1) unstable; urgency=low
+
+  * New upstream release
+  * Fixed speeling error in the copyright file (closes: #131698)
+
+ -- Pekka Aleksi Knuutila <pa@debian.org>  Sun, 17 Feb 2002 17:32:18 +0200
+
+irssi-text (0.7.98.3-2) unstable; urgency=low
+
+  * Made perl support ready for perl 5.6.1, thanks to Branden O'Dea
+    (closes: #95535)
+
+ -- Pekka Aleksi Knuutila <pa@debian.org>  Sun, 17 Feb 2002 17:32:12 +0200
+
+irssi-text (0.7.98.3-1) unstable; urgency=low
+
+  * New upstream release (closes: #90139)
+  * Include the libfe_perl files (closes: #90189)
+
+ -- Pekka Aleksi Knuutila <pa@debian.org>  Mon, 19 Mar 2001 17:17:25 +0200
+
+irssi-text (0.7.98.1-1) unstable; urgency=low
+
+  * New upstream release
+  * Recompiled with perl-5.6 (closes: #86157)
+  * Added alternative for irssi(1) man-page (closes: #80845)
+
+ -- Pekka Aleksi Knuutila <pa@debian.org>  Fri, 23 Feb 2001 16:48:43 +0200
+
+irssi-text (0.7.97.2-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Pekka Aleksi Knuutila <pa@debian.org>  Tue, 19 Dec 2000 15:22:56 +0200
+
+irssi-text (0.7.97.1-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Pekka Aleksi Knuutila <pa@debian.org>  Wed,  6 Dec 2000 21:40:44 +0200
+
+irssi-text (0.7.97-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Pekka Aleksi Knuutila <pa@debian.org>  Sun,  3 Dec 2000 21:35:03 +0200
+
+irssi-text (0.7.96-2) unstable; urgency=low
+
+  * Added startup-howto to /usr/share/doc
+  * Applied 0.7.96-2 bugfixes from upstream
+
+ -- Pekka Aleksi Knuutila <pa@debian.org>  Mon, 30 Oct 2000 17:48:34 +0200
+
+irssi-text (0.7.96-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Pekka Aleksi Knuutila <pa@debian.org>  Thu, 19 Oct 2000 23:22:54 +0300
+
+irssi-text (0.7.95-2) unstable; urgency=medium
+
+  * Applied patch to fix remote crash
+
+ -- Pekka Aleksi Knuutila <pa@debian.org>  Wed, 23 Aug 2000 10:21:36 +0300
+
+irssi-text (0.7.95-1) unstable; urgency=low
+
+  * New upstream release
+  * Fixed debian/rules clean (closes: Bug#69105)
+
+ -- Pekka Aleksi Knuutila <pa@debian.org>  Sun, 13 Aug 2000 22:03:53 +0300
+
+irssi-text (0.7.94-1) unstable; urgency=low
+
+  * Initial release
+
+ -- Pekka Aleksi Knuutila <pa@debian.org>  Wed, 26 Jul 2000 21:40:40 +0300
+
--- irssi-0.8.12.orig/debian/patches/12perlembed-fix
+++ irssi-0.8.12/debian/patches/12perlembed-fix
@@ -0,0 +1,36 @@
+Author: Gerfried Fuchs <rhonda@debian.at>	vim:ft=diff:
+Description: Call PERL_SYS_INIT3() and PERL_SYS_TERM() as documented in
+	perlembed(1), BTS #495059
+
+Index: irssi-0.8.12/src/perl/perl-core.c
+===================================================================
+--- irssi-0.8.12.orig/src/perl/perl-core.c
++++ irssi-0.8.12/src/perl/perl-core.c
+@@ -118,16 +118,18 @@ static void xs_init(pTHX)
+ void perl_scripts_init(void)
+ {
+ 	char *args[] = {"", "-e", "0"};
++	int argc = 3;
+ 	char *code, *use_code;
+ 
+ 	perl_scripts = NULL;
+         perl_sources_start();
+ 	perl_signals_start();
+ 
++	PERL_SYS_INIT3(&argc, &args, &environ);
+ 	my_perl = perl_alloc();
+ 	perl_construct(my_perl);
+ 
+-	perl_parse(my_perl, xs_init, 3, args, NULL);
++	perl_parse(my_perl, xs_init, argc, args, NULL);
+ #if PERL_STATIC_LIBS == 1
+ 	perl_eval_pv("Irssi::Core::boot_Irssi_Core();", TRUE);
+ #endif
+@@ -170,6 +172,7 @@ void perl_scripts_deinit(void)
+ 	/* perl interpreter */
+ 	perl_destruct(my_perl);
+ 	perl_free(my_perl);
++	PERL_SYS_TERM();
+ 	my_perl = NULL;
+ }
+ 
--- irssi-0.8.12.orig/debian/patches/series
+++ irssi-0.8.12/debian/patches/series
@@ -0,0 +1,15 @@
+01chanmode_expando_strip
+02ctcp_version_reply
+03help-URL-fix
+03firsttimer_text
+04nickmask-mask
+05fullword-full
+## 06gnutls-support by David Pashley <david@davidpashley.com>
+#06gnutls-support
+07ctcp-channel
+08server==NULL-handling
+09typo-authentification
+10leave-help
+11theme-white-background-fix
+12perlembed-fix
+13proxy-join-fix
--- irssi-0.8.12.orig/debian/patches/13proxy-join-fix
+++ irssi-0.8.12/debian/patches/13proxy-join-fix
@@ -0,0 +1,76 @@
+Author: jilles	vim:ft=diff:
+Description: Allow increasing the send buffer to 1MB/connection, and
+  warn if that is exceeded, BTS #308673 (upstream svn r4840)
+
+Index: irssi-0.8.12/src/core/net-sendbuffer.c
+===================================================================
+--- irssi-0.8.12.orig/src/core/net-sendbuffer.c
++++ irssi-0.8.12/src/core/net-sendbuffer.c
+@@ -37,6 +37,7 @@ NET_SENDBUF_REC *net_sendbuffer_create(G
+         rec->send_tag = -1;
+ 	rec->handle = handle;
+ 	rec->bufsize = bufsize > 0 ? bufsize : DEFAULT_BUFFER_SIZE;
++	rec->def_bufsize = rec->bufsize;
+ 
+ 	buffers = g_slist_append(buffers, rec);
+ 	return rec;
+@@ -61,7 +62,9 @@ static int buffer_send(NET_SENDBUF_REC *
+ 	ret = net_transmit(rec->handle, rec->buffer, rec->bufpos);
+ 	if (ret < 0 || rec->bufpos == ret) {
+ 		/* error/all sent - don't try to send it anymore */
+-                g_free_and_null(rec->buffer);
++		rec->bufsize = rec->def_bufsize;
++		rec->buffer = g_realloc(rec->buffer, rec->bufsize);
++		rec->bufpos = 0;
+ 		return TRUE;
+ 	}
+ 
+@@ -91,8 +94,16 @@ static int buffer_add(NET_SENDBUF_REC *r
+ 		rec->bufpos = 0;
+ 	}
+ 
+-	if (rec->bufpos+size > rec->bufsize)
+-		return FALSE;
++	while (rec->bufpos+size > rec->bufsize) {
++		if (rec->bufsize >= MAX_BUFFER_SIZE) {
++			if (!rec->dead)
++				g_warning("Dropping some data on an outgoing connection");
++			rec->dead = 1;
++			return FALSE;
++		}
++		rec->bufsize *= 2;
++		rec->buffer = g_realloc(rec->buffer, rec->bufsize);
++	}
+ 
+ 	memcpy(rec->buffer+rec->bufpos, data, size);
+ 	rec->bufpos += size;
+@@ -110,7 +121,7 @@ int net_sendbuffer_send(NET_SENDBUF_REC 
+ 	g_return_val_if_fail(data != NULL, -1);
+ 	if (size <= 0) return 0;
+ 
+-	if (rec->buffer == NULL) {
++	if (rec->buffer == NULL || rec->bufpos == 0) {
+                 /* nothing in buffer - transmit immediately */
+ 		ret = net_transmit(rec->handle, data, size);
+ 		if (ret < 0) return -1;
+Index: irssi-0.8.12/src/core/net-sendbuffer.h
+===================================================================
+--- irssi-0.8.12.orig/src/core/net-sendbuffer.h
++++ irssi-0.8.12/src/core/net-sendbuffer.h
+@@ -2,6 +2,7 @@
+ #define __NET_SENDBUFFER_H
+ 
+ #define DEFAULT_BUFFER_SIZE 8192
++#define MAX_BUFFER_SIZE 1048576
+ 
+ struct _NET_SENDBUF_REC {
+         GIOChannel *handle;
+@@ -10,6 +11,8 @@ struct _NET_SENDBUF_REC {
+         int bufsize;
+         int bufpos;
+         char *buffer; /* Buffer is NULL until it's actually needed. */
++        int def_bufsize;
++        unsigned int dead:1;
+ };
+ 
+ /* Create new buffer - if `bufsize' is zero or less, DEFAULT_BUFFER_SIZE
--- irssi-0.8.12.orig/debian/patches/05fullword-full
+++ irssi-0.8.12/debian/patches/05fullword-full
@@ -0,0 +1,16 @@
+Author: Gerfried Fuchs <rhonda@debian.at>	vim:ft=diff:
+Description: report -full instead of -fullword in /hilight listing
+
+Index: irssi-0.8.12/src/fe-common/core/hilight-text.c
+===================================================================
+--- irssi-0.8.12.orig/src/fe-common/core/hilight-text.c
++++ irssi-0.8.12/src/fe-common/core/hilight-text.c
+@@ -480,7 +480,7 @@ static void hilight_print(int index, HIL
+ 	}
+ 
+ 	if (rec->nickmask) g_string_append(options, "-mask ");
+-	if (rec->fullword) g_string_append(options, "-fullword ");
++	if (rec->fullword) g_string_append(options, "-full ");
+ 	if (rec->regexp) {
+ 		g_string_append(options, "-regexp ");
+ #ifdef HAVE_REGEX_H
--- irssi-0.8.12.orig/debian/patches/02ctcp_version_reply
+++ irssi-0.8.12/debian/patches/02ctcp_version_reply
@@ -0,0 +1,19 @@
+Author: Gerfried Fuchs <rhonda@debian.at>	vim:ft=diff:
+Description: remove $sysname $sysarch from default version reply, BTS #373094
+
+Index: irssi-0.8.12/src/irc/core/ctcp.c
+===================================================================
+--- irssi-0.8.12.orig/src/irc/core/ctcp.c
++++ irssi-0.8.12/src/irc/core/ctcp.c
+@@ -328,8 +328,10 @@ void ctcp_init(void)
+ {
+ 	ctcp_cmds = NULL;
+ 
++	/* remove $sysname $sysarch from default version reply, too much info,
++	 * see debian bug #373094 */
+ 	settings_add_str("misc", "ctcp_version_reply",
+-			 PACKAGE_TARNAME" v$J - running on $sysname $sysarch");
++			 PACKAGE_TARNAME" v$J");
+ 	settings_add_str("misc", "ctcp_userinfo_reply", "$Y");
+ 	settings_add_int("flood", "max_ctcp_queue", 5);
+ 
--- irssi-0.8.12.orig/debian/patches/03firsttimer_text
+++ irssi-0.8.12/debian/patches/03firsttimer_text
@@ -0,0 +1,29 @@
+Author: Gerfried Fuchs <rhonda@debian.at>	vim:ft=diff:
+Description: add hint about #debian to first time user message, BTS #393707
+
+Index: irssi-0.8.12/src/fe-text/irssi.c
+===================================================================
+--- irssi-0.8.12.orig/src/fe-text/irssi.c
++++ irssi-0.8.12/src/fe-text/irssi.c
+@@ -82,6 +82,8 @@ static int dirty, full_redraw, dummy;
+ static GMainLoop *main_loop;
+ int quitting;
+ 
++/* add debian informations for first time users,
++ * see debian bug #393707 */
+ static const char *firsttimer_text =
+ 	"Looks like this is the first time you've run irssi.\n"
+ 	"This is just a reminder that you really should go read\n"
+@@ -89,7 +91,11 @@ static const char *firsttimer_text =
+ 	"and more irssi beginner info at http://www.irssi.org\n"
+ 	"\n"
+ 	"For the truly impatient people who don't like any automatic\n"
+-	"window creation or closing, just type: /MANUAL-WINDOWS";
++	"window creation or closing, just type: /MANUAL-WINDOWS\n"
++	"\n"
++	"For Debian specific help type \"/connect irc.debian.org\"\n"
++	"and \"/join #debian\" (without the quotes) and ask your\n"
++	"question.";
+ static int display_firsttimer = FALSE;
+ 
+ 
--- irssi-0.8.12.orig/debian/patches/04nickmask-mask
+++ irssi-0.8.12/debian/patches/04nickmask-mask
@@ -0,0 +1,16 @@
+Author: Gerfried Fuchs <rhonda@debian.at>	vim:ft=diff:
+Description: report -mask instead of -nickmask in /hilight listing, BTS #417397
+
+Index: irssi-0.8.12/src/fe-common/core/hilight-text.c
+===================================================================
+--- irssi-0.8.12.orig/src/fe-common/core/hilight-text.c
++++ irssi-0.8.12/src/fe-common/core/hilight-text.c
+@@ -479,7 +479,7 @@ static void hilight_print(int index, HIL
+ 		if (rec->word) g_string_append(options, "-word ");
+ 	}
+ 
+-	if (rec->nickmask) g_string_append(options, "-nickmask ");
++	if (rec->nickmask) g_string_append(options, "-mask ");
+ 	if (rec->fullword) g_string_append(options, "-fullword ");
+ 	if (rec->regexp) {
+ 		g_string_append(options, "-regexp ");
--- irssi-0.8.12.orig/debian/patches/10leave-help
+++ irssi-0.8.12/debian/patches/10leave-help
@@ -0,0 +1,36 @@
+Author: exg	vim:ft=diff:
+Description: Remove references to LEAVE alias, BTS #255535 (upstream svn r4688)
+
+Index: irssi-0.8.12/docs/help/in/cycle.in
+===================================================================
+--- irssi-0.8.12.orig/docs/help/in/cycle.in
++++ irssi-0.8.12/docs/help/in/cycle.in
+@@ -4,5 +4,5 @@
+ Cycles (leaves and joins) the current channel or the specified 
+ channel.
+ 
+-See also: JOIN, LEAVE, PART
++See also: JOIN, PART
+ 
+Index: irssi-0.8.12/docs/help/in/join.in
+===================================================================
+--- irssi-0.8.12.orig/docs/help/in/join.in
++++ irssi-0.8.12/docs/help/in/join.in
+@@ -9,5 +9,5 @@ JOIN is aliased to J by default. Example
+ 
+ Description
+ 
+-See also: LEAVE, WINDOW CLOSE
++See also: PART, WINDOW CLOSE
+ 
+Index: irssi-0.8.12/docs/help/in/part.in
+===================================================================
+--- irssi-0.8.12.orig/docs/help/in/part.in
++++ irssi-0.8.12/docs/help/in/part.in
+@@ -4,5 +4,5 @@
+ Parts from the current or specified channel. Depending
+ on your settings, closes the corresponding window, too.
+ 
+-See also: LEAVE, JOIN
++See also: JOIN
+ 
--- irssi-0.8.12.orig/debian/patches/06gnutls-support
+++ irssi-0.8.12/debian/patches/06gnutls-support
@@ -0,0 +1,589 @@
+Author: David Pashley <david@davidpashley.com>	vim:ft=diff:
+Description: none
+
+diff -urNad --exclude=CVS --exclude=.svn ./configure.in /tmp/dpep-work.Xa2n5L/irssi/configure.in
+--- ./configure.in	2005-07-17 16:00:49.000000000 +0300
++++ /tmp/dpep-work.Xa2n5L/irssi/configure.in	2005-07-17 16:46:18.000000000 +0300
+@@ -222,7 +222,11 @@
+ AC_ARG_ENABLE(ssl, 
+ 	    [  --disable-ssl           Disable Secure Sockets Layer support],,
+ 	    enable_ssl=yes)
+-
++if test "$enable_ssl" = "yes"; then
++   AM_PATH_LIBGNUTLS(1.0.16, have_gnutls="true", have_gnutls="false")
++   AC_DEFINE(HAVE_GNUTLS,, Build with GNUTLS support)
++fi
++AM_CONDITIONAL(HAVE_GNUTLS, test "x$have_gnutls" = "xtrue")
+ dnl **
+ dnl ** just some generic stuff...
+ dnl **
+diff -urNad --exclude=CVS --exclude=.svn ./src/core/Makefile.am /tmp/dpep-work.Xa2n5L/irssi/src/core/Makefile.am
+--- ./src/core/Makefile.am	2005-07-17 16:00:43.000000000 +0300
++++ /tmp/dpep-work.Xa2n5L/irssi/src/core/Makefile.am	2005-07-17 16:46:18.000000000 +0300
+@@ -7,6 +7,12 @@
+ 	-DSYSCONFDIR=\""$(sysconfdir)"\" \
+ 	-DMODULEDIR=\""$(libdir)/irssi/modules"\"
+ 
++#if HAVE_OPENSSL
++#SSL = network-openssl.c
++#else
++SSL = network-gnutls.c
++#endif
++
+ libcore_a_SOURCES = \
+ 	args.c \
+ 	channels.c \
+@@ -30,7 +36,7 @@
+ 	net-nonblock.c \
+ 	net-sendbuffer.c \
+ 	network.c \
+-	network-openssl.c \
++	$(SSL) \
+ 	nicklist.c \
+ 	nickmatch-cache.c \
+ 	pidwait.c \
+diff -urNad --exclude=CVS --exclude=.svn ./src/core/network-gnutls.c /tmp/dpep-work.Xa2n5L/irssi/src/core/network-gnutls.c
+--- ./src/core/network-gnutls.c	1970-01-01 02:00:00.000000000 +0200
++++ /tmp/dpep-work.Xa2n5L/irssi/src/core/network-gnutls.c	2005-07-17 16:46:18.000000000 +0300
+@@ -0,0 +1,514 @@
++/*
++ network-ssl.c : SSL support
++
++    Copyright (C) 2002 vjt
++
++    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
++    along with this program; if not, write to the Free Software
++    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
++*/
++
++#include "module.h"
++#include "network.h"
++#include "misc.h"
++
++#define HAVE_GNUTLS
++
++#ifdef HAVE_GNUTLS
++
++#include <gnutls/gnutls.h>
++#include <gnutls/extra.h>
++#include <gnutls/x509.h>
++
++/* ssl i/o channel object */
++typedef struct
++{
++	GIOChannel pad;
++	gint fd;
++	GIOChannel *giochan;
++   gnutls_session session;
++	unsigned int got_cert:1;
++	unsigned int verify:1;
++   unsigned int have_handshaked:1;
++   gnutls_anon_client_credentials anon_cred;
++   gnutls_certificate_credentials xcred;
++} GIOSSLChannel;
++	
++static void irssi_ssl_free(GIOChannel *handle)
++{
++	GIOSSLChannel *chan = (GIOSSLChannel *)handle;
++	g_io_channel_unref(chan->giochan);
++   gnutls_bye(chan->session, GNUTLS_SHUT_RDWR);
++   gnutls_deinit(chan->session);
++	g_free(chan);
++}
++
++/*static gboolean irssi_ssl_verify(SSL *ssl, SSL_CTX *ctx, X509 *cert)
++{
++	if (SSL_get_verify_result(ssl) != X509_V_OK) {
++		unsigned char md[EVP_MAX_MD_SIZE];
++		unsigned int n;
++		char *str;
++
++		g_warning("Could not verify SSL servers certificate:");
++		if ((str = X509_NAME_oneline(X509_get_subject_name(cert), 0, 0)) == NULL)
++			g_warning("  Could not get subject-name from peer certificate");
++		else {
++			g_warning("  Subject : %s", str);
++			free(str);
++		}
++		if ((str = X509_NAME_oneline(X509_get_issuer_name(cert), 0, 0)) == NULL)
++			g_warning("  Could not get issuer-name from peer certificate");
++		else {
++			g_warning("  Issuer  : %s", str);
++			free(str);
++		}
++		if (! X509_digest(cert, EVP_md5(), md, &n))
++			g_warning("  Could not get fingerprint from peer certificate");
++		else {
++			char hex[] = "0123456789ABCDEF";
++			char fp[EVP_MAX_MD_SIZE*3];
++			if (n < sizeof(fp)) {
++				unsigned int i;
++				for (i = 0; i < n; i++) {
++					fp[i*3+0] = hex[(md[i] >> 4) & 0xF];
++					fp[i*3+1] = hex[(md[i] >> 0) & 0xF];
++					fp[i*3+2] = i == n - 1 ? '\0' : ':';
++				}
++				g_warning("  MD5 Fingerprint : %s", fp);
++			}
++		}
++		return FALSE;
++	}
++	return TRUE;
++}
++*/
++
++int irssi_ssl_handshake(GIOChannel *handle) {
++	GIOSSLChannel *chan = (GIOSSLChannel *)handle;
++	int ret;
++   while(1) {
++      fd_set fds_read;
++      fd_set fds_write;
++      struct timeval timeout={1,0};
++
++      ret = gnutls_handshake(chan->session);
++
++      if((ret != GNUTLS_E_AGAIN) &&
++            (ret != GNUTLS_E_INTERRUPTED))
++         break;
++
++      FD_ZERO(&fds_read);
++      FD_ZERO(&fds_write);
++
++      FD_SET(chan->fd, &fds_read);
++      FD_SET(chan->fd, &fds_write);
++      select(chan->fd+1, &fds_read, &fds_write, NULL, &timeout);
++   }
++   if (ret < 0) {
++      g_warning( "*** Handshake failed: %s", gnutls_strerror(ret));
++      if (ret == GNUTLS_E_FATAL_ALERT_RECEIVED) {
++         g_warning( "*** alert: %s", gnutls_alert_get_name (gnutls_alert_get (chan->session)));
++      }
++
++      
++   } else {
++      chan->have_handshaked = 1;
++      g_warning("- Handshake was completed");
++   }
++
++   return ret;
++
++}
++#if GLIB_MAJOR_VERSION < 2
++
++#ifdef G_CAN_INLINE
++G_INLINE_FUNC
++#else
++static
++#endif
++GIOError ssl_errno(gint e)
++{
++	switch(e)
++	{
++		case EINVAL:
++			return G_IO_ERROR_INVAL;
++		case EINTR:
++		case EAGAIN:
++			return G_IO_ERROR_AGAIN;
++		default:
++			return G_IO_ERROR_INVAL;
++	}
++	/*UNREACH*/
++	return G_IO_ERROR_INVAL;
++}
++
++static GIOError irssi_ssl_cert_step(GIOSSLChannel *chan)
++{
++   g_warning("irssi_ssl_cert_step");
++	/*UNREACH*/
++	return G_IO_ERROR_INVAL;
++}
++
++static GIOError irssi_ssl_read(GIOChannel *handle, gchar *buf, guint len, guint *ret)
++{
++	GIOSSLChannel *chan = (GIOSSLChannel *)handle;
++	gint err;
++	
++	err = gnutls_record_recv(chan->session, buf, len);
++	if(err < 0) {
++		*ret = 0;
++		return ssl_errno(errno);
++	} else {
++		*ret = err;
++		return G_IO_ERROR_NONE;
++	}
++	/*UNREACH*/
++	return -1;
++}
++
++static GIOError irssi_ssl_write(GIOChannel *handle, gchar *buf, guint len, guint *ret)
++{
++	GIOSSLChannel *chan = (GIOSSLChannel *)handle;
++	gint err;
++
++
++	err = gnutls_record_send(chan->session, buf, len);
++	if(err < 0)
++	{
++		*ret = 0;
++		return ssl_errno(errno);
++	}
++	else
++	{
++		*ret = err;
++		return G_IO_ERROR_NONE;
++	}
++	/*UNREACH*/
++	return G_IO_ERROR_INVAL;
++}
++
++static GIOError irssi_ssl_seek(GIOChannel *handle, gint offset, GSeekType type)
++{
++	GIOSSLChannel *chan = (GIOSSLChannel *)handle;
++	GIOError e;
++	e = g_io_channel_seek(chan->giochan, offset, type);
++	return (e == G_IO_ERROR_NONE) ? G_IO_ERROR_NONE : G_IO_ERROR_INVAL;
++}
++
++static void irssi_ssl_close(GIOChannel *handle)
++{
++	GIOSSLChannel *chan = (GIOSSLChannel *)handle;
++	g_io_channel_close(chan->giochan);
++}
++
++static guint irssi_ssl_create_watch(GIOChannel *handle, gint priority, GIOCondition cond,
++			     GIOFunc func, gpointer data, GDestroyNotify notify)
++{
++	GIOSSLChannel *chan = (GIOSSLChannel *)handle;
++
++	return chan->giochan->funcs->io_add_watch(handle, priority, cond, func, data, notify);
++}
++
++/* ssl function pointers */
++static GIOFuncs irssi_ssl_channel_funcs =
++{
++	irssi_ssl_read,
++	irssi_ssl_write,
++	irssi_ssl_seek,
++	irssi_ssl_close,
++	irssi_ssl_create_watch,
++	irssi_ssl_free
++};
++
++#else /* GLIB_MAJOR_VERSION < 2 */
++
++#ifdef G_CAN_INLINE
++G_INLINE_FUNC
++#else
++static
++#endif
++GIOStatus ssl_errno(gint e)
++{
++	switch(e)
++	{
++		case EINVAL:
++			return G_IO_STATUS_ERROR;
++		case EINTR:
++		case EAGAIN:
++			return G_IO_STATUS_AGAIN;
++		default:
++			return G_IO_STATUS_ERROR;
++	}
++	/*UNREACH*/
++	return G_IO_STATUS_ERROR;
++}
++
++static GIOStatus irssi_ssl_cert_step(GIOSSLChannel *chan)
++{
++   g_warning("irssi_ssl_cert_step");
++	/*UNREACH*/
++	return G_IO_STATUS_ERROR;
++}
++
++static GIOStatus irssi_ssl_read(GIOChannel *handle, gchar *buf, guint len, guint *ret, GError **gerr)
++{
++	GIOSSLChannel *chan = (GIOSSLChannel *)handle;
++	gint err;
++   if (!chan->have_handshaked) {
++      irssi_ssl_handshake(handle);
++   }
++	
++	
++	err = gnutls_record_recv(chan->session, buf, len);
++	if(err < 0)
++	{
++		*ret = 0;
++		return ssl_errno(errno);
++	}
++	else
++	{
++		*ret = err;
++		return G_IO_STATUS_NORMAL;
++	}
++	/*UNREACH*/
++	return G_IO_STATUS_ERROR;
++}
++
++static GIOStatus irssi_ssl_write(GIOChannel *handle, const gchar *buf, gsize len, gsize *ret, GError **gerr)
++{
++	GIOSSLChannel *chan = (GIOSSLChannel *)handle;
++	gint err;
++
++   if (!chan->have_handshaked) {
++   irssi_ssl_handshake(handle);
++   }
++
++
++	err = gnutls_record_send(chan->session, buf, len);
++	if(err < 0)
++	{
++		*ret = 0;
++		return ssl_errno(errno);
++	}
++	else
++	{
++		*ret = err;
++		return G_IO_STATUS_NORMAL;
++	}
++	/*UNREACH*/
++	return G_IO_STATUS_ERROR;
++}
++
++static GIOStatus irssi_ssl_seek(GIOChannel *handle, gint64 offset, GSeekType type, GError **gerr)
++{
++	GIOSSLChannel *chan = (GIOSSLChannel *)handle;
++	GIOError e;
++	e = g_io_channel_seek(chan->giochan, offset, type);
++	return (e == G_IO_ERROR_NONE) ? G_IO_STATUS_NORMAL : G_IO_STATUS_ERROR;
++}
++
++static GIOStatus irssi_ssl_close(GIOChannel *handle, GError **gerr)
++{
++	GIOSSLChannel *chan = (GIOSSLChannel *)handle;
++	g_io_channel_close(chan->giochan);
++
++	return G_IO_STATUS_NORMAL;
++}
++
++static GSource *irssi_ssl_create_watch(GIOChannel *handle, GIOCondition cond)
++{
++	GIOSSLChannel *chan = (GIOSSLChannel *)handle;
++
++	return chan->giochan->funcs->io_create_watch(handle, cond);
++}
++
++static GIOStatus irssi_ssl_set_flags(GIOChannel *handle, GIOFlags flags, GError **gerr)
++{
++    GIOSSLChannel *chan = (GIOSSLChannel *)handle;
++
++    return chan->giochan->funcs->io_set_flags(handle, flags, gerr);
++}
++
++static GIOFlags irssi_ssl_get_flags(GIOChannel *handle)
++{
++    GIOSSLChannel *chan = (GIOSSLChannel *)handle;
++
++    return chan->giochan->funcs->io_get_flags(handle);
++}
++
++static GIOFuncs irssi_ssl_channel_funcs = {
++    irssi_ssl_read,
++    irssi_ssl_write,
++    irssi_ssl_seek,
++    irssi_ssl_close,
++    irssi_ssl_create_watch,
++    irssi_ssl_free,
++    irssi_ssl_set_flags,
++    irssi_ssl_get_flags
++};
++
++#endif
++
++static void tls_log_func(int level, const char *str)
++{
++   
++       g_warning( "|<%d>| %s", level, g_strchomp(str));
++}
++
++static gboolean irssi_ssl_init(void)
++{
++   g_warning("irssi_ssl_init");
++   int ret;
++	if ((ret = gnutls_global_init())) {
++      g_warning( "failed to init gnutls: %s", gnutls_strerror(ret));
++      return FALSE;
++   } 
++   gnutls_global_set_log_function(tls_log_func);
++   gnutls_global_set_log_level(0);
++
++	return TRUE;
++
++}
++
++int is_socket_connected(int fd) {
++   fd_set fds_write;
++   struct timeval timeout={0,0};
++   FD_ZERO(&fds_write);
++   FD_SET(fd, &fds_write);
++   select(fd+1, 0, &fds_write, NULL, &timeout);
++
++   struct sockaddr s;
++   socklen_t s_len;
++   if (getpeername(fd,&s,&s_len) == -1 && errno == ENOTCONN) {
++      char ch;
++      read(fd,&ch,1);
++      return FALSE;
++   }
++   return TRUE;
++}
++
++
++/*static*/ GIOChannel *irssi_ssl_get_iochannel(GIOChannel *handle, const char *mycert, const char *mypkey, const char *cafile, const char *capath, gboolean verify)
++{
++   g_warning("irssi_ssl_get_iochannel");
++	GIOSSLChannel *chan;
++	GIOChannel *gchan;
++	int ret, fd;
++   gnutls_session session;
++   
++   
++   gnutls_anon_client_credentials anon_cred;
++   gnutls_certificate_credentials xcred;
++
++   int protocol_priority[] = { GNUTLS_TLS1_1, GNUTLS_TLS1_0, GNUTLS_SSL3, 0 };
++   int kx_priority[] =
++   { GNUTLS_KX_DHE_RSA, GNUTLS_KX_DHE_DSS, GNUTLS_KX_RSA,
++      GNUTLS_KX_SRP_RSA, GNUTLS_KX_SRP_DSS, GNUTLS_KX_SRP,
++      /* Do not use anonymous authentication, unless you know what that means */
++      GNUTLS_KX_RSA_EXPORT, GNUTLS_KX_ANON_DH, 0
++   };
++   int cipher_priority[] =
++   { GNUTLS_CIPHER_AES_256_CBC, GNUTLS_CIPHER_AES_128_CBC,
++      GNUTLS_CIPHER_3DES_CBC, GNUTLS_CIPHER_ARCFOUR_128,
++      GNUTLS_CIPHER_ARCFOUR_40, 0
++   };
++   int comp_priority[] = { GNUTLS_COMP_ZLIB, GNUTLS_COMP_NULL, 0 };
++   int mac_priority[] = 
++   { GNUTLS_MAC_SHA, GNUTLS_MAC_MD5, GNUTLS_MAC_RMD160, 0 };
++   int cert_type_priority[] = { GNUTLS_CRT_X509, GNUTLS_CRT_OPENPGP, 0 };
++
++
++	g_return_val_if_fail(handle != NULL, NULL);
++	
++	if(!irssi_ssl_init())
++		return NULL;
++   
++   fd = g_io_channel_unix_get_fd(handle);
++//if(!(fd = g_io_channel_unix_get_fd(handle)) || !is_socket_connected(fd)) {
++//      return NULL;
++//   }
++
++   g_warning ("irssi_ssl_get_iochannel sanity checks complete");
++
++
++   gnutls_certificate_allocate_credentials(&xcred);
++	gnutls_certificate_set_verify_flags(xcred, GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT);
++   gnutls_anon_allocate_client_credentials(&anon_cred);
++   if (cafile) {
++      /* sets the trusted cas file */
++      if ((ret = gnutls_certificate_set_x509_trust_file(xcred, cafile, GNUTLS_X509_FMT_PEM)) < 0) {
++         g_warning( "gnutls_certificate_set_x509_trust_file failed: %s", gnutls_strerror(ret));
++      }
++   }
++   
++   /* Initialize TLS session  */
++   if (gnutls_init(&session, GNUTLS_CLIENT) < 0 ) {
++         g_warning( "gnutls_init failed: %s", gnutls_strerror(ret));
++      }
++   
++   gnutls_certificate_type_set_priority(session, cert_type_priority);
++	gnutls_cipher_set_priority(session, cipher_priority);
++	gnutls_compression_set_priority(session, comp_priority);
++	gnutls_kx_set_priority(session, kx_priority);
++	gnutls_protocol_set_priority(session, protocol_priority);
++	gnutls_mac_set_priority(session, mac_priority);
++
++	gnutls_dh_set_prime_bits(session, 512);
++
++	gnutls_credentials_set(session, GNUTLS_CRD_ANON, anon_cred);
++	gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, xcred);
++   
++
++   /* connect to the peer */
++   gnutls_transport_set_ptr(session, (gnutls_transport_ptr) fd);
++
++   
++	chan = g_new0(GIOSSLChannel, 1);
++	chan->fd = fd;
++	chan->giochan = handle;
++	chan->session = session;
++	//chan->got_cert = cert != NULL;
++	chan->verify = verify;
++   chan->anon_cred = anon_cred;
++   chan->xcred = xcred;
++
++	gchan = (GIOChannel *)chan;
++	gchan->funcs = &irssi_ssl_channel_funcs;
++	g_io_channel_init(gchan);
++	
++   /* Perform the TLS handshake */
++	return gchan;
++}
++
++GIOChannel *net_connect_ip_ssl(IPADDR *ip, int port, IPADDR *my_ip, const char *cert, const char *pkey, const char *cafile, const char *capath, gboolean verify)
++{
++	GIOChannel *handle, *ssl_handle;
++
++	handle = net_connect_ip(ip, port, my_ip);
++   ssl_handle  = irssi_ssl_get_iochannel(handle, cert, pkey, cafile, capath, verify);
++	if (ssl_handle == NULL)
++		g_io_channel_unref(handle);
++	return ssl_handle;
++}
++
++#else /* HAVE_OPENSSL */
++
++GIOChannel *net_connect_ip_ssl(IPADDR *ip, int port, IPADDR *my_ip, const char *cert, const char *pkey, const char *cafile, const char *capath, gboolean verify)
++{
++	g_warning("Connection failed: SSL support not enabled in this build.");
++	errno = ENOSYS;
++	return NULL;
++}
++
++#endif /* ! HAVE_OPENSSL */
+diff -urNad --exclude=CVS --exclude=.svn ./src/fe-none/Makefile.am /tmp/dpep-work.Xa2n5L/irssi/src/fe-none/Makefile.am
+--- ./src/fe-none/Makefile.am	2005-07-17 16:00:41.000000000 +0300
++++ /tmp/dpep-work.Xa2n5L/irssi/src/fe-none/Makefile.am	2005-07-17 16:46:18.000000000 +0300
+@@ -12,7 +12,8 @@
+ 	@COMMON_NOUI_LIBS@ \
+ 	@PERL_LINK_LIBS@ \
+ 	@PERL_LINK_FLAGS@ \
+-	@PROG_LIBS@
++	@PROG_LIBS@ \
++	-lgnutls
+ 
+ botti_SOURCES = \
+         irssi.c
+diff -urNad --exclude=CVS --exclude=.svn ./src/fe-text/Makefile.am /tmp/dpep-work.Xa2n5L/irssi/src/fe-text/Makefile.am
+--- ./src/fe-text/Makefile.am	2005-07-17 16:00:44.000000000 +0300
++++ /tmp/dpep-work.Xa2n5L/irssi/src/fe-text/Makefile.am	2005-07-17 16:46:18.000000000 +0300
+@@ -21,7 +21,9 @@
+ 	@PERL_FE_LINK_LIBS@ \
+ 	@PERL_LINK_FLAGS@ \
+ 	@PROG_LIBS@ \
+-	@TEXTUI_LIBS@
++	@TEXTUI_LIBS@ \
++	-lgnutls
++
+ 
+ tparm_sources = \
+ 	tparm.c
--- irssi-0.8.12.orig/debian/patches/01chanmode_expando_strip
+++ irssi-0.8.12/debian/patches/01chanmode_expando_strip
@@ -0,0 +1,18 @@
+Author: Gerfried Fuchs <rhonda@debian.at>	vim:ft=diff:
+Description: Don't expand chanmode by default, BTS #347944
+
+Index: irssi-0.8.12/src/core/expandos.c
+===================================================================
+--- irssi-0.8.12.orig/src/core/expandos.c
++++ irssi-0.8.12/src/core/expandos.c
+@@ -582,7 +582,9 @@ void expandos_init(void)
+ #endif
+ 	settings_add_str("misc", "STATUS_OPER", "*");
+ 	settings_add_str("lookandfeel", "timestamp_format", "%H:%M");
+-	settings_add_bool("lookandfeel", "chanmode_expando_strip", FALSE);
++	/* don't expand by default and expose channel key,
++	 * see debian bug #347944 */
++	settings_add_bool("lookandfeel", "chanmode_expando_strip", TRUE);
+ 
+ 	last_sent_msg = NULL; last_sent_msg_body = NULL;
+ 	last_privmsg_from = NULL; last_public_from = NULL;
--- irssi-0.8.12.orig/debian/patches/03help-URL-fix
+++ irssi-0.8.12/debian/patches/03help-URL-fix
@@ -0,0 +1,29 @@
+Author: Geert	vim:ft=diff:
+Description: Fix broken URI, BTS #483673 (upstream svn r4612)
+
+Index: irssi-0.8.12/irssi.conf
+===================================================================
+--- irssi-0.8.12.orig/irssi.conf
++++ irssi-0.8.12/irssi.conf
+@@ -124,7 +124,7 @@ statusbar = {
+     prompt = "{prompt $[.15]itemname}";
+     prompt_empty = "{prompt $winname}";
+     topic = " $topic";
+-    topic_empty = " Irssi v$J - http://irssi.org/help/";
++    topic_empty = " Irssi v$J - http://www.irssi.org";
+ 
+     # all of these treated specially, they're only displayed when needed
+     lag = "{sb Lag: $0-}";
+Index: irssi-0.8.12/src/fe-text/irssi.c
+===================================================================
+--- irssi-0.8.12.orig/src/fe-text/irssi.c
++++ irssi-0.8.12/src/fe-text/irssi.c
+@@ -86,7 +86,7 @@ static const char *firsttimer_text =
+ 	"Looks like this is the first time you've run irssi.\n"
+ 	"This is just a reminder that you really should go read\n"
+ 	"startup-HOWTO if you haven't already. You can find it\n"
+-	"and more irssi beginner info at http://irssi.org/help/\n"
++	"and more irssi beginner info at http://www.irssi.org\n"
+ 	"\n"
+ 	"For the truly impatient people who don't like any automatic\n"
+ 	"window creation or closing, just type: /MANUAL-WINDOWS";
--- irssi-0.8.12.orig/debian/patches/11theme-white-background-fix
+++ irssi-0.8.12/debian/patches/11theme-white-background-fix
@@ -0,0 +1,82 @@
+Author: Tim Retout <tim@retout.co.uk>	vim:ft=diff:
+Description: Make own nick and actions use default color instead of
+  white, BTS #479171
+
+Index: irssi-0.8.12/default.theme
+===================================================================
+--- irssi-0.8.12.orig/default.theme
++++ irssi-0.8.12/default.theme
+@@ -63,7 +63,7 @@ abstracts = {
+   ##
+ 
+   # text to insert at the beginning of each non-message line
+-  line_start = "%B-%W!%B-%n ";
++  line_start = "%B-%n!%B-%n ";
+ 
+   # timestamp styling, nothing by default
+   timestamp = "$*";
+@@ -138,7 +138,7 @@ abstracts = {
+ 
+   # $0 = nick mode, $1 = nick
+   ownmsgnick = "{msgnick $0 $1-}";
+-  ownnick = "%W$*%n";
++  ownnick = "%_$*%n";
+ 
+   # public message in channel, $0 = nick mode, $1 = nick
+   pubmsgnick = "{msgnick $0 $1-}";
+@@ -163,7 +163,7 @@ abstracts = {
+ 
+   # own private message in query
+   ownprivmsgnick = "{msgnick  $*}";
+-  ownprivnick = "%W$*%n";
++  ownprivnick = "%_$*%n";
+ 
+   # private message in query
+   privmsgnick = "{msgnick  %R$*%n}";
+@@ -173,7 +173,7 @@ abstracts = {
+   ##
+ 
+   # used internally by this theme
+-  action_core = "%W * $*%n";
++  action_core = "%_ * $*%n";
+ 
+   # generic one that's used by most actions
+   action = "{action_core $*} ";
+@@ -185,7 +185,7 @@ abstracts = {
+   ownaction_target = "{action_core $0}%K:%c$1%n ";
+ 
+   # private action sent by others
+-  pvtaction = "%W (*) $*%n ";
++  pvtaction = "%_ (*) $*%n ";
+   pvtaction_query = "{action $*}";
+ 
+   # public action sent by others
+@@ -211,9 +211,9 @@ abstracts = {
+   ctcp = "%g$*%n";
+ 
+   # wallops
+-  wallop = "%W$*%n: ";
++  wallop = "%_$*%n: ";
+   wallop_nick = "%n$*";
+-  wallop_action = "%W * $*%n ";
++  wallop_action = "%_ * $*%n ";
+ 
+   # netsplits
+   netsplit = "%R$*%n";
+@@ -235,14 +235,14 @@ abstracts = {
+   # DCC chat, own msg/action
+   dccownmsg = "[%r$0%K($1-%K)%n] ";
+   dccownnick = "%R$*%n";
+-  dccownquerynick = "%W$*%n";
++  dccownquerynick = "%_$*%n";
+   dccownaction = "{action $*}";
+   dccownaction_target = "{action_core $0}%K:%c$1%n ";
+ 
+   # DCC chat, others
+   dccmsg = "[%G$1-%K(%g$0%K)%n] ";
+   dccquerynick = "%G$*%n";
+-  dccaction = "%W (*dcc*) $*%n %|";
++  dccaction = "%_ (*dcc*) $*%n %|";
+ 
+   ##
+   ## statusbar
--- irssi-0.8.12.orig/debian/patches/07ctcp-channel
+++ irssi-0.8.12/debian/patches/07ctcp-channel
@@ -0,0 +1,49 @@
+Author: Geert & exg	vim:ft=diff:
+Description: Do not allow /ping by itself to ctcp ping a channel. (upstream svn r4640)
+
+Index: irssi-0.8.12/docs/help/in/ping.in
+===================================================================
+--- irssi-0.8.12.orig/docs/help/in/ping.in
++++ irssi-0.8.12/docs/help/in/ping.in
+@@ -1,10 +1,10 @@
+ 
+ @SYNTAX:ping@
+ 
+-Sends CTCP PING to another IRC client. This is used
+-to find out the speed of IRC network. When the PING
+-reply comes in, irssi shows the interval time between
+-sending the request and receiving the reply.
++Sends CTCP PING to another IRC client or to an IRC channel.
++This is used to find out the speed of IRC network. When
++the PING reply comes in, irssi shows the interval time
++between sending the request and receiving the reply.
+ 
+ See also: CTCP
+ 
+Index: irssi-0.8.12/src/irc/core/irc-commands.c
+===================================================================
+--- irssi-0.8.12.orig/src/irc/core/irc-commands.c
++++ irssi-0.8.12/src/irc/core/irc-commands.c
+@@ -504,7 +504,7 @@ static void cmd_whowas(const char *data,
+ 	cmd_params_free(free_arg);
+ }
+ 
+-/* SYNTAX: PING <nicks> */
++/* SYNTAX: PING [<nick> | <channel> | *] */
+ static void cmd_ping(const char *data, IRC_SERVER_REC *server, WI_ITEM_REC *item)
+ {
+ 	GTimeVal tv;
+@@ -512,10 +512,9 @@ static void cmd_ping(const char *data, I
+ 
+         CMD_IRC_SERVER(server);
+ 
+-	if (*data == '\0' || strcmp(data, "*") == 0) {
+-		if (!IS_IRC_ITEM(item))
+-                        cmd_return_error(CMDERR_NOT_JOINED);
+-
++	if (*data == '\0') {
++		if (!IS_QUERY(item))
++			cmd_return_error(CMDERR_NOT_ENOUGH_PARAMS);
+ 		data = window_item_get_target(item);
+ 	}
+ 
--- irssi-0.8.12.orig/debian/patches/08server==NULL-handling
+++ irssi-0.8.12/debian/patches/08server==NULL-handling
@@ -0,0 +1,16 @@
+Author: exg	vim:ft=diff:
+Description: Handle server == NULL case in skip_target (upstream svn r4627)
+
+Index: irssi-0.8.12/src/fe-common/irc/fe-irc-messages.c
+===================================================================
+--- irssi-0.8.12.orig/src/fe-common/irc/fe-irc-messages.c
++++ irssi-0.8.12/src/fe-common/irc/fe-irc-messages.c
+@@ -44,7 +44,7 @@ static const char *skip_target(IRC_SERVE
+ 	const char *val, *chars;
+ 
+ 	/* Quick check */
+-	if (server->prefix[(int)(unsigned char)*target] == 0)
++	if (server == NULL || server->prefix[(int)(unsigned char)*target] == 0)
+ 		return target;
+ 
+ 	/* Hack: for bahamut 1.4 which sends neither STATUSMSG nor
--- irssi-0.8.12.orig/debian/patches/09typo-authentification
+++ irssi-0.8.12/debian/patches/09typo-authentification
@@ -0,0 +1,16 @@
+Author: John Dong <jdong@ubuntu.com>	vim:ft=diff:
+Description: Fixed a typo, BTS #465570
+
+Index: irssi-0.8.12/docs/irssi.1
+===================================================================
+--- irssi-0.8.12.orig/docs/irssi.1
++++ irssi-0.8.12/docs/irssi.1
+@@ -31,7 +31,7 @@ connects to 
+ .BI "\-w, \-\-password="PASSWORD
+ use
+ .I PASSWORD 
+-for authentification.
++for authentication.
+ .TP
+ .BI "\-p, \-\-port="PORT
+ automatically connect to 
