debian/0000775000000000000000000000000012677605270007204 5ustar debian/control0000664000000000000000000000263412677605135010614 0ustar Source: hexchat Section: net Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Jesse Rhodes Build-Depends: debhelper (>= 9.0.0), dh-autoreconf, imagemagick, intltool, libcanberra-dev, libdbus-glib-1-dev, libglib2.0-dev, libgtk2.0-dev (>= 2.10.0), libnotify-dev, libpci-dev, libperl-dev, libproxy-dev, libsexy-dev, libssl-dev, libtool, python-dev Standards-Version: 3.9.5 Homepage: http://hexchat.github.io/ Package: hexchat Architecture: any Provides: irc Depends: ${misc:Depends}, hexchat-common (= ${source:Version}), ${shlibs:Depends} Recommends: gvfs-bin Suggests: unifont Description: IRC client for X based on X-Chat 2 HexChat is a graphical IRC client with a GTK+ GUI. Features include Python (2 and 3) and Perl scripting support, a plugin API, multiple server/channel windows, spell checking, multiple authentication methods including SASL, and customizable notifications. For more information on IRC, see http://irchelp.org/. Package: hexchat-common Architecture: all Provides: irc Depends: ${misc:Depends} Recommends: hexchat Description: Common files for HexChat This package includes documentation, headers, and locale files for the Debian HexChat packages that are common for all architectures. Hexchat is a popular and featureful IRC client with a GTK+ GUI. For more information on IRC, see http://irchelp.org/. debian/hexchat.docs0000664000000000000000000000002412276477270011500 0ustar debian/changelog.gz debian/hexchat-common.docs0000664000000000000000000000007312276462202012757 0ustar share/doc/readme.md debian/plugins.txt debian/changelog.gz debian/hexchat.install0000664000000000000000000000022112300441212012164 0ustar debian/hexchat.xpm usr/share/pixmaps usr/bin/hexchat usr/lib/*/hexchat/plugins/*.so usr/lib/*/pkgconfig usr/share/appdata usr/share/applications debian/changelog0000664000000000000000000000212512677605116011055 0ustar hexchat (2.9.6.1-2ubuntu0.1) trusty-security; urgency=medium * SECURITY UPDATE: no ssl hostname verification (LP: #1565000) - debian/patches/validate_ssl_hostnames.patch: properly validate hostnames in src/common/server.c, src/common/ssl.c, src/common/ssl.h. - CVE number pending * SECURITY UPDATE: missing ssl certificate handled incorrectly - debian/patches/handle_missing_ssl_cert.patch: fail connection if certificate isn't found in src/common/server.c. - No CVE number -- Marc Deslauriers Fri, 01 Apr 2016 19:53:41 -0400 hexchat (2.9.6.1-2) unstable; urgency=low * Now using dh-autoreconf instead of autotools-dev (Closes: #739630) * Added gvfs-bin as Recommends so default url handlers work (Closes: #740006) * Added unifont as Suggests for unicode symbol support * Included png,svg icons in package -- Jesse Rhodes Tue, 25 Feb 2014 16:45:42 -0700 hexchat (2.9.6.1-1) unstable; urgency=low * Initial release (Closes: #702075) -- Jesse Rhodes Mon, 03 Feb 2014 19:09:17 -0700 debian/source/0000775000000000000000000000000012274046054010474 5ustar debian/source/format0000664000000000000000000000001412274046054011702 0ustar 3.0 (quilt) debian/compat0000664000000000000000000000000212274046054010372 0ustar 9 debian/hexchat-common.manpages0000664000000000000000000000001612276210725013620 0ustar man/hexchat.1 debian/patches/0000775000000000000000000000000012677605072010633 5ustar debian/patches/series0000664000000000000000000000015712677604711012052 0ustar 01_sysinfo_spelling.patch 02_desktop_keywords.patch validate_ssl_hostnames.patch handle_missing_ssl_cert.patch debian/patches/02_desktop_keywords.patch0000664000000000000000000000066212300164547015547 0ustar Description: Added keywords to hexchat.desktop Per lintian desktop-entry-lacks-keywords-entry warning. Author: Jesse Rhodes --- hexchat-2.9.6.1.orig/share/misc/hexchat.desktop +++ hexchat-2.9.6.1/share/misc/hexchat.desktop @@ -29,3 +29,4 @@ Categories=GTK;Network;IRCClient; StartupNotify=true X-GNOME-UsesNotifications=true MimeType=x-scheme-handler/irc;x-scheme-handler/ircs; +Keywords=chat;xchat;x-chat;irc debian/patches/validate_ssl_hostnames.patch0000664000000000000000000001716612677605045016422 0ustar Backport of: From c99f2ba645d1f4d01d6d2bb0cc1238825e15c604 Mon Sep 17 00:00:00 2001 From: TingPing Date: Wed, 19 Nov 2014 21:43:01 -0500 Subject: [PATCH] ssl: Validate hostnames Closes #524 --- src/common/server.c | 16 ++++- src/common/ssl.c | 203 ++++++++++++++++++++++++++++++++++++++++++++++++++++ src/common/ssl.h | 2 +- 3 files changed, 219 insertions(+), 2 deletions(-) Index: hexchat-2.9.6.1/src/common/server.c =================================================================== --- hexchat-2.9.6.1.orig/src/common/server.c 2016-04-01 19:50:59.931589807 -0400 +++ hexchat-2.9.6.1/src/common/server.c 2016-04-01 19:50:59.927589769 -0400 @@ -724,9 +724,22 @@ switch (verify_error) { case X509_V_OK: + { + X509 *cert = SSL_get_peer_certificate (serv->ssl); + int hostname_err; + if ((hostname_err = _SSL_check_hostname(cert, serv->hostname)) != 0) + { + snprintf (buf, sizeof (buf), "* Verify E: Failed to validate hostname? (%d)%s", + hostname_err, serv->accept_invalid_cert ? " -- Ignored" : ""); + if (serv->accept_invalid_cert) + EMIT_SIGNAL (XP_TE_SSLMESSAGE, serv->server_session, buf, NULL, NULL, NULL, 0); + else + goto conn_fail; + } + break; + } /* snprintf (buf, sizeof (buf), "* Verify OK (?)"); */ /* EMIT_SIGNAL (XP_TE_SSLMESSAGE, serv->server_session, buf, NULL, NULL, NULL, 0); */ - break; case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY: case X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE: case X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT: @@ -745,6 +758,7 @@ snprintf (buf, sizeof (buf), "%s.? (%d)", X509_verify_cert_error_string (verify_error), verify_error); +conn_fail: EMIT_SIGNAL (XP_TE_CONNFAIL, serv->server_session, buf, NULL, NULL, NULL, 0); Index: hexchat-2.9.6.1/src/common/ssl.c =================================================================== --- hexchat-2.9.6.1.orig/src/common/ssl.c 2016-04-01 19:50:59.931589807 -0400 +++ hexchat-2.9.6.1/src/common/ssl.c 2016-04-01 19:52:18.212369533 -0400 @@ -20,6 +20,7 @@ #include "inet.h" /* make it first to avoid macro redefinitions */ #include /* SSL_() */ #include /* ERR_() */ +#include #ifdef WIN32 #include /* RAND_seed() */ #include "../../config-win32.h" /* HAVE_SNPRINTF */ @@ -30,9 +31,11 @@ #include /* strncpy() */ #include "ssl.h" /* struct cert_info */ -#ifndef HAVE_SNPRINTF #include #include +#include + +#ifndef HAVE_SNPRINTF #define snprintf g_snprintf #endif @@ -328,3 +331,204 @@ SSL_free (ssl); ERR_remove_state (0); /* free state buffer */ } + +/* Hostname validation code based on OpenBSD's libtls. */ + +static int +_SSL_match_hostname (const char *cert_hostname, const char *hostname) +{ + const char *cert_domain, *domain, *next_dot; + + if (g_ascii_strcasecmp (cert_hostname, hostname) == 0) + return 0; + + /* Wildcard match? */ + if (cert_hostname[0] == '*') + { + /* + * Valid wildcards: + * - "*.domain.tld" + * - "*.sub.domain.tld" + * - etc. + * Reject "*.tld". + * No attempt to prevent the use of eg. "*.co.uk". + */ + cert_domain = &cert_hostname[1]; + /* Disallow "*" */ + if (cert_domain[0] == '\0') + return -1; + /* Disallow "*foo" */ + if (cert_domain[0] != '.') + return -1; + /* Disallow "*.." */ + if (cert_domain[1] == '.') + return -1; + next_dot = strchr (&cert_domain[1], '.'); + /* Disallow "*.bar" */ + if (next_dot == NULL) + return -1; + /* Disallow "*.bar.." */ + if (next_dot[1] == '.') + return -1; + + domain = strchr (hostname, '.'); + + /* No wildcard match against a hostname with no domain part. */ + if (domain == NULL || strlen(domain) == 1) + return -1; + + if (g_ascii_strcasecmp (cert_domain, domain) == 0) + return 0; + } + + return -1; +} + +static int +_SSL_check_subject_altname (X509 *cert, const char *host) +{ + STACK_OF(GENERAL_NAME) *altname_stack = NULL; + GInetAddress *addr; + GSocketFamily family; + int type = GEN_DNS; + int count, i; + int rv = -1; + + altname_stack = X509_get_ext_d2i (cert, NID_subject_alt_name, NULL, NULL); + if (altname_stack == NULL) + return -1; + + addr = g_inet_address_new_from_string (host); + if (addr != NULL) + { + family = g_inet_address_get_family (addr); + if (family == G_SOCKET_FAMILY_IPV4 || family == G_SOCKET_FAMILY_IPV6) + type = GEN_IPADD; + } + + count = sk_GENERAL_NAME_num(altname_stack); + for (i = 0; i < count; i++) + { + GENERAL_NAME *altname; + + altname = sk_GENERAL_NAME_value (altname_stack, i); + + if (altname->type != type) + continue; + + if (type == GEN_DNS) + { + unsigned char *data; + int format; + + format = ASN1_STRING_type (altname->d.dNSName); + if (format == V_ASN1_IA5STRING) + { + data = ASN1_STRING_data (altname->d.dNSName); + + if (ASN1_STRING_length (altname->d.dNSName) != (int)strlen(data)) + { + g_warning("NUL byte in subjectAltName, probably a malicious certificate.\n"); + rv = -2; + break; + } + + if (_SSL_match_hostname (data, host) == 0) + { + rv = 0; + break; + } + } + else + g_warning ("unhandled subjectAltName dNSName encoding (%d)\n", format); + + } + else if (type == GEN_IPADD) + { + unsigned char *data; + const guint8 *addr_bytes; + int datalen, addr_len; + + datalen = ASN1_STRING_length (altname->d.iPAddress); + data = ASN1_STRING_data (altname->d.iPAddress); + + addr_bytes = g_inet_address_to_bytes (addr); + addr_len = (int)g_inet_address_get_native_size (addr); + + if (datalen == addr_len && memcmp (data, addr_bytes, addr_len) == 0) + { + rv = 0; + break; + } + } + } + + if (addr != NULL) + g_object_unref (addr); + sk_GENERAL_NAME_free (altname_stack); + return rv; +} + +static int +_SSL_check_common_name (X509 *cert, const char *host) +{ + X509_NAME *name; + char *common_name = NULL; + int common_name_len; + int rv = -1; + GInetAddress *addr; + + name = X509_get_subject_name (cert); + if (name == NULL) + return -1; + + common_name_len = X509_NAME_get_text_by_NID (name, NID_commonName, NULL, 0); + if (common_name_len < 0) + return -1; + + common_name = calloc (common_name_len + 1, 1); + if (common_name == NULL) + return -1; + + X509_NAME_get_text_by_NID (name, NID_commonName, common_name, common_name_len + 1); + + /* NUL bytes in CN? */ + if (common_name_len != (int)strlen(common_name)) + { + g_warning ("NUL byte in Common Name field, probably a malicious certificate.\n"); + rv = -2; + goto out; + } + + if ((addr = g_inet_address_new_from_string (host)) != NULL) + { + /* + * We don't want to attempt wildcard matching against IP + * addresses, so perform a simple comparison here. + */ + if (g_strcmp0 (common_name, host) == 0) + rv = 0; + else + rv = -1; + + g_object_unref (addr); + } + else if (_SSL_match_hostname (common_name, host) == 0) + rv = 0; + +out: + free(common_name); + return rv; +} + +int +_SSL_check_hostname (X509 *cert, const char *host) +{ + int rv; + + rv = _SSL_check_subject_altname (cert, host); + if (rv == 0 || rv == -2) + return rv; + + return _SSL_check_common_name (cert, host); +} Index: hexchat-2.9.6.1/src/common/ssl.h =================================================================== --- hexchat-2.9.6.1.orig/src/common/ssl.h 2016-04-01 19:50:59.931589807 -0400 +++ hexchat-2.9.6.1/src/common/ssl.h 2016-04-01 19:50:59.927589769 -0400 @@ -52,7 +52,7 @@ int SSL_get_fd(SSL *); */ void _SSL_close (SSL * ssl); - +int _SSL_check_hostname(X509 *cert, const char *host); int _SSL_get_cert_info (struct cert_info *cert_info, SSL * ssl); struct chiper_info *_SSL_get_cipher_info (SSL * ssl); debian/patches/01_sysinfo_spelling.patch0000664000000000000000000000127512300163145015527 0ustar Description: Fixed spelling error in plugins/xsys/xsys.c * Line 601: Recieved changed to Received Author: Jesse Rhodes --- hexchat-2.9.6.1.orig/plugins/sysinfo/xsys.c +++ hexchat-2.9.6.1/plugins/sysinfo/xsys.c @@ -598,7 +598,7 @@ netdata_cb (char *word[], char *word_eol bytes_recv /= 1024; bytes_sent /= 1024; - snprintf (netdata, bsize, "%s: %.1f MB Recieved, %.1f MB Sent", word[2], (double)bytes_recv/1024.0, (double)bytes_sent/1024.0); + snprintf (netdata, bsize, "%s: %.1f MB Received, %.1f MB Sent", word[2], (double)bytes_recv/1024.0, (double)bytes_sent/1024.0); hexchat_pluginpref_get_str (ph, "format", format); format_output ("Netdata", netdata, format); debian/patches/handle_missing_ssl_cert.patch0000664000000000000000000000234412677605072016541 0ustar Backport of: From 50463ca8321c39f3966c278ab25ca158404d72f1 Mon Sep 17 00:00:00 2001 From: Insu Yun Date: Fri, 20 Nov 2015 16:51:08 -0500 Subject: [PATCH] Properly handle missing SSL certificate According to OpenSSL document (https://www.openssl.org/docs/manmaster/ssl/SSL_get_verify_result.html), when using SSL_get_verify_result(), the existence of certificate needs to be checked. However, in current code, it does not. Therefore, certificate existence check is required for correctly handling the exception. Closes #1549 --- src/common/server.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) Index: hexchat-2.9.6.1/src/common/server.c =================================================================== --- hexchat-2.9.6.1.orig/src/common/server.c 2016-04-01 19:52:44.976640171 -0400 +++ hexchat-2.9.6.1/src/common/server.c 2016-04-01 19:53:19.360987873 -0400 @@ -705,9 +705,8 @@ NULL, 0); } else { - snprintf (buf, sizeof (buf), " * No Certificate"); - EMIT_SIGNAL (XP_TE_SSLMESSAGE, serv->server_session, buf, NULL, NULL, - NULL, 0); + snprintf (buf, sizeof (buf), "No Certificate"); + goto conn_fail; } chiper_info = _SSL_get_cipher_info (serv->ssl); /* static buffer */ debian/copyright0000664000000000000000000002053512303264012011121 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: hexchat Source: http://hexchat.github.io/ Files: * Copyright: 1998-2010 Peter Zelezny 2009-2013 Berke Viktor License: GPL-2+ with OpenSSL exception Files: debian/* Copyright: 2014 Jesse Rhodes License: GPL-2+ This package 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 package 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, see . On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". Files: plugins/doat/* Copyright: None License: WTFPL-2 Files: plugins/fishlim/* Copyright: 2010 Samuel Lidén Borell License: Expat Files: plugins/python/* Copyright: 2002-2003 Gustavo Niemeyer License: GPL-2+ Files: plugins/checksum/* Copyright: 2010-2012 Berke Viktor License: Expat Files: plugins/sysinfo/* Copyright: 2003, 2004, 2005 Michael Shoup 2005, 2006, 2007 Tony Vroon License: GPL-2+ Files: plugins/sysinfo/sysinfo.cpp Copyright: 2011-2012 Berke Viktor License: Expat Files: plugins/sysinfo/xsys.c Copyright: 2012, Berke Viktor 2003, 2004, 2005 Michael Shoup 2005, 2006, 2007 Tony Vroon License: GPL-2+ Files: plugins/perl/* Copyright: 1998-2002 Peter Zelezny License: GPL-2+ Files: po/* Copyright: Public Domain License: public-domain Files: intl/* Copyright: Free Software Foundation License: LGPL-2.1+ Files: ltmain.sh Copyright: Free Software Foundation License: GPL-2+ Files: src/dirent/dirent-win32.h Copyright: 2006-2012 Toni Ronkko License: Expat Files: src/common/dbus/* Copyright: 2006 Claessens Xavier License: GPL-2+ Files: src/fe-gtk/mmx_cmod.S Copyright: 1997-2001 Michael Jennings License: Expat Files: src/fe-gtk/sexy-iso* Copyright: 2005 Nathan Fredrickson 2004 Christian Persch 2004 Crispin Flowerday License: LGPL-2.1+ Files: src/fe-gtk/sexy-marshal.* Copyright: 2005-2006 Christian Hammond License: LGPL-2.1+ Files: src/fe-gtk/sexy-spell-entry.* Copyright: 2004-2006 Christian Hammond 2002 Evan Martin License: LGPL-2.1+ Files: src/gtk2-prefs/* Copyright: 2003-2005 Alex Shaduri License: GPL-2+ Files: src/htm/* Copyright: 2012 Patrick Griffs 2012 Berke Viktor License: GPL-2+ Files: plugins/ewc/* Copyright: Yann HAMON License: LGPL-2.1+ Files: plugins/hextray/* Copyright: 2005 Michael Hotaling License: GPL-2+ Files: plugins/mpcinfo/* Copyright: None License: GPL-2+ Files: winamp/* Copyright: Leo Silverex Derek Buitenhuis Berke Viktor License: GPL-1.0 License: GPL-2+ with OpenSSL exception This package 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 package 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 package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA . On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-2'. . In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. You must obey the GNU General Public License in all respects for all of the code used other than OpenSSL. If you modify file(s) with this exception, you may extend this exception to your version of the file(s), but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. If you delete this exception statement from all source files in the program, then also delete it here. License: WTFPL-2 DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 . Copyright (C) 2004 Sam Hocevar . Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed. . DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION . 0. You just DO WHAT THE FUCK YOU WANT TO. License: Expat . Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. License: GPL-2+ This package 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 package 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 package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA . On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-2'. License: public-domain This file is placed in the public domain. License: GPL-1.0 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 1, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. License: LGPL-2.1+ This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details. . You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA debian/plugins.txt0000664000000000000000000014744212276211731011430 0ustar Plugin Interface ================ .. default-domain:: c Introduction ------------ Plugins for HexChat are written in C. The interface aims to keep 100% binary compatability. This means that if you upgrade HexChat, you will not need to recompile your plugins, they'll continue to work. The interface doesn't depend on any structures and offsets, so compiler versions shouldn't have an impact either. The only real requirement of a HexChat plugin is that it define an *hexchat\_plugin\_init* symbol. This is your entry point function, see the example below. You should make all your global variables and functions *static*, so that a symbol is not exported. There is no harm in exporting these symbols, but they are not necessary and only pollute the name-space. Plugins are compiled as shared objects (.so files), for example: Most UNIX systems: gcc -Wl --export-dynamic -Wall -O1 -shared -fPIC myplugin.c -o myplugin.so OS X: gcc -no-cpp-precomp -g -O2 -Wall -bundle -flat\_namespace -undefined suppress -o myplugin.so myplugin.c See the `Windows section `_ on how to compile a plugin using Visual Studio. All strings passed to and from plugins are encoded in UTF-8, regardless of locale. Sample plugin ------------- This simple plugin auto-ops anyone who joins a channel you're in. It also adds a new command */AUTOOPTOGGLE*, which can be used to turn the feature ON or OFF. Every HexChat plugin must define an *hexchat\_plugin\_init* function, this is the normal entry point. *hexchat\_plugin\_deinit* is optional. .. code-block:: c #include "hexchat-plugin.h" #define PNAME "AutoOp" #define PDESC "Auto Ops anyone that joins" #define PVERSION "0.1" static hexchat_plugin *ph; /* plugin handle */ static int enable = 1; static int join_cb (char *word[], void *userdata) { if (enable) { /* Op ANYONE who joins */ hexchat_commandf (ph, "OP %s", word[1]); } /* word[1] is the nickname, as in the Settings->Text Events window in HexChat */ return HEXCHAT_EAT_NONE; /* don't eat this event, HexChat needs to see it! */ } static int autooptoggle_cb (char *word[], char *word_eol[], void *userdata) { if (!enable) { enable = 1; hexchat_print (ph, "AutoOping now enabled!\n"); } else { enable = 0; hexchat_print (ph, "AutoOping now disabled!\n"); } return HEXCHAT_EAT_ALL; /* eat this command so HexChat and other plugins can't process it */ } void hexchat_plugin_get_info (char **name, char **desc, char **version, void **reserved) { *name = PNAME; *desc = PDESC; *version = PVERSION; } int hexchat_plugin_init (hexchat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg) { /* we need to save this for use with any hexchat_* functions */ ph = plugin_handle; /* tell HexChat our info */ *plugin_name = PNAME; *plugin_desc = PDESC; *plugin_version = PVERSION; hexchat_hook_command (ph, "AutoOpToggle", HEXCHAT_PRI_NORM, autooptoggle_cb, "Usage: AUTOOPTOGGLE, Turns OFF/ON Auto Oping", 0); hexchat_hook_print (ph, "Join", HEXCHAT_PRI_NORM, join_cb, 0); hexchat_print (ph, "AutoOpPlugin loaded successfully!\n"); return 1; /* return 1 for success */ } What's *word* and *word\_eol*? ------------------------------ They are arrays of strings. They contain the parameters the user entered for the particular command. For example, if you executed: .. code-block:: none /command NICK hi there word[1] is command word[2] is NICK word[3] is hi word[4] is there word_eol[1] is command NICK hi there word_eol[2] is NICK hi there word_eol[3] is hi there word_eol[4] is there These arrays are simply provided for your convenience. You are **not** allowed to alter them. Both arrays are limited to 32 elements (index 31). *word[0]* and *word\_eol[0]* are reserved and should not be read. Lists and Fields ---------------- Lists of information (DCCs, Channels, User list, etc.) can be retreived with *hexchat\_list\_get*. All fields are **read only** and must be copied if needed for a long time after calling *hexchat\_list\_str*. The types of lists and fields available are: +--------------+--------------------------------------------------------------------+--------+ | "channels" | list of channels, querys and their servers | +--------------+--------------------------------------------------------------------+--------+ | Name | Description | Type | +==============+====================================================================+========+ | channel | Channel or query name | string | +--------------+--------------------------------------------------------------------+--------+ | channelkey | Channels key or NULL (2.9.6+) | string | +--------------+--------------------------------------------------------------------+--------+ | chantypes | Channel types e.g. “#!&” | string | +--------------+--------------------------------------------------------------------+--------+ | context | (hexchat_context \*) pointer. Can be used with hexchat_set_context | string | +--------------+--------------------------------------------------------------------+--------+ | flags | - 1 = Connected | int | | | - 2 = Connecting | | | | - 4 = Marked away | | | | - 8 = End of MOTD | | | | - 16 = Has WHOX | | | | - 32 = Has IDMSG | | | | - 64 = Hide Join/Parts | | | | - 128 = Hide Join/Parts unset | | | | - 256 = Beep on Message | | | | - 512 = Blink Tray | | | | - 1024 = Blink Taskbar | | | | - 2048 = Logging | | | | - 4096 = Logging unset | | | | - 8192 = Scrollback | | | | - 16384 = Scrollback unset | | | | - 32768 = Strip colors | | | | - 65536 = Strip colors unset | | +--------------+--------------------------------------------------------------------+--------+ | id | Unique server ID | int | +--------------+--------------------------------------------------------------------+--------+ | lag | Lag in milliseconds | int | +--------------+--------------------------------------------------------------------+--------+ | maxmodes | Maximum modes per line | int | +--------------+--------------------------------------------------------------------+--------+ | network | Maximum modes per line | int | +--------------+--------------------------------------------------------------------+--------+ | nickprefixes | Nickname prefixes e.g. “@+” | string | +--------------+--------------------------------------------------------------------+--------+ | nickmodes | Nickname mode chars e.g. “ov” | string | +--------------+--------------------------------------------------------------------+--------+ | queue | Number of bytes in the send-queue | int | +--------------+--------------------------------------------------------------------+--------+ | server | Server name to which this channel belongs | string | +--------------+--------------------------------------------------------------------+--------+ | type | - 1 = Server | int | | | - 2 = Channel | | | | - 3 = Dialog | | | | - 4 = Notice | | | | - 5 = SNotice | | +--------------+--------------------------------------------------------------------+--------+ | users | Number of users in this channel | int | +--------------+--------------------------------------------------------------------+--------+ +------------+----------------------------------------------------------------------+--------+ | "dcc" | list of DCC file transfers | +------------+----------------------------------------------------------------------+--------+ | Name | Description | Type | +============+======================================================================+========+ | address32 | Address of the remote user (ipv4 address) | int | +------------+----------------------------------------------------------------------+--------+ | cps | Bytes per second (speed) | int | +------------+----------------------------------------------------------------------+--------+ | destfile | Destination full pathname | string | +------------+----------------------------------------------------------------------+--------+ | file | File name | string | +------------+----------------------------------------------------------------------+--------+ | nick | Nickname of person who the file is from/to | string | +------------+----------------------------------------------------------------------+--------+ | port | TCP port number | int | +------------+----------------------------------------------------------------------+--------+ | pos | Bytes sent/received | int | +------------+----------------------------------------------------------------------+--------+ | poshigh | Bytes sent/received, high order 32 bits | int | +------------+----------------------------------------------------------------------+--------+ | resume | Point at which this file was resumed (or zero if it was not resumed) | int | +------------+----------------------------------------------------------------------+--------+ | resumehigh | Point at which this file was resumed, high order 32 bits | int | +------------+----------------------------------------------------------------------+--------+ | size | File size in bytes, low order 32 bits (cast it to unsigned) | int | +------------+----------------------------------------------------------------------+--------+ | sizehigh | File size in bytes, high order 32 bits | int | +------------+----------------------------------------------------------------------+--------+ | status | - 0 = Queued | int | | | - 1 = Active | | | | - 2 = Failed | | | | - 3 = Done | | | | - 4 = Connecting | | | | - 5 = Aborted | | +------------+----------------------------------------------------------------------+--------+ | type | - 0 = Send | int | | | - 1 = Recieve | | | | - 1 = ChatRecv | | | | - 1 = ChatSend | | +------------+----------------------------------------------------------------------+--------+ +----------+----------------------------------------------+--------+ | "ignore" | current ignore list | +----------+----------------------------------------------+--------+ | Name | Description | Type | +==========+==============================================+========+ | mask | Ignore mask. .e.g. \*\!\*\@\*.aol.com | string | +----------+----------------------------------------------+--------+ | flags | - 0 = Private | int | | | - 1 = Notice | | | | - 2 = Channel | | | | - 3 = CTCP | | | | - 4 = Invite | | | | - 5 = Unignore | | | | - 6 = NoSave | | | | - 7 = DCC | | +----------+----------------------------------------------+--------+ ======== ================================================================== ======= "notify" list of people on notify -------- -------------------------------------------------------------------------- Name Description Type ======== ================================================================== ======= networks Networks to which this nick applies. Comma separated. May be NULL. string nick Nickname string flags Bit field of flags. 0=Is online. int on Time when user came online. time\_t off Time when user went offline. time\_t seen Time when user the user was last verified still online. time\_t ======== ================================================================== ======= Fields are only valid for the context when hexchat\_list\_get() was called (i.e. you get information about the user ON THAT ONE SERVER ONLY). You may cycle through the "channels" list to find notify information for every server. ========== ============================================================================================ ======== "users" list of users in the current channel ---------- ----------------------------------------------------------------------------------------------------- Name Description Type ========== ============================================================================================ ======== account Account name or NULL (2.9.6+) string away Away status (boolean) int lasttalk Last time the user was seen talking time\_t nick Nick name string host Host name in the form: user\@host (or NULL if not known). string prefix Prefix character, .e.g: @ or +. Points to a single char. string realname Real name or NULL string selected Selected status in the user list, only works for retrieving the user list of the focused tab int ========== ============================================================================================ ======== Example: .. code-block:: c list = hexchat_list_get (ph, "dcc"); if (list) { hexchat_print (ph, "--- DCC LIST ------------------\nFile To/From KB/s Position\n"); while (hexchat_list_next (ph, list)) { hexchat_printf (ph, "%6s %10s %.2f %d\n", hexchat_list_str (ph, list, "file"), hexchat_list_str (ph, list, "nick"), hexchat_list_int (ph, list, "cps") / 1024, hexchat_list_int (ph, list, "pos")); } hexchat_list_free (ph, list); } Plugins on Windows (Win32) -------------------------- All you need is Visual Studio setup as explained in `Building `_. Your best bet is to use an existing plugin (such as the currently unused SASL plugin) in the HexChat solution as a starting point. You should have the following files: - `hexchat-plugin.h `_ - main plugin header - plugin.c - Your plugin, you need to write this one :) - plugin.def - A simple text file containing the following: .. code-block:: none EXPORTS hexchat_plugin_init hexchat_plugin_deinit hexchat_plugin_get_info Leave out *hexchat\_plugin\_deinit* if you don't intend to define that function. Then compile your plugin in Visual Studio as usual. **Caveat:** plugins compiled on Win32 **must** have a global variable called *ph*, which is the *plugin\_handle*, much like in the sample plugin above. Controlling the GUI ------------------- A simple way to perform basic GUI functions is to use the */GUI* command. You can execute this command through the input box, or by calling *hexchat\_command (ph, "GUI .....");*. - **GUI ATTACH:** Same function as "Attach Window" in the HexChat menu. - **GUI DETACH:** Same function as "Detach Tab" in the HexChat menu. - **GUI APPLY:** Similar to clicking OK in the settings window. Execute this after /SET to activate GUI changes. - **GUI COLOR *n*:** Change the tab color of the current context, where *n* is a number from 0 to 3. - **GUI FOCUS:** Focus the current window or tab. - **GUI FLASH:** Flash the taskbar button. It will flash only if the window isn't focused and will stop when it is focused by the user. - **GUI HIDE:** Hide the main HexChat window completely. - **GUI ICONIFY:** Iconify (minimize to taskbar) the current HexChat window. - **GUI MSGBOX *text*:** Displays a asynchronous message box with your text. - **GUI SHOW:** Show the main HexChat window (if currently hidden). You can add your own items to the menu bar. The menu command has this syntax: .. code-block:: none MENU [-eX] [-i] [-k,] [-m] [-pX] [-rX,group] [-tX] {ADD|DEL} [command] [unselect command] For example: .. code-block:: none MENU -p5 ADD FServe MENU ADD "FServe/Show File List" "fs list" MENU ADD FServe/- MENU -k4,101 -t1 ADD "FServe/Enabled" "fs on" "fs off" MENU -e0 ADD "FServe/Do Something" "fs action" In the example above, it would be recommended to execute *MENU DEL FServe* inside your *hexchat\_plugin\_deinit* function. The special item with name "-" will add a separator line. Parameters and flags: - **-eX:** Set enable flag to X. -e0 for disable, -e1 for enable. This lets you create a disabled (shaded) item. - **-iFILE:** Use an icon filename FILE. Not supported for toggles or radio items. - **-k,:** Specify a keyboard shortcut. "mod" is the modifier which is a bitwise OR of: 1-SHIFT 4- CTRL 8-ALT in decimal. "key" is the key value in decimal, e.g. -k5,101 would specify SHIFT-CTRL-E. - **-m:** Specify that this label should be treated as Pango Markup language. Since forward slash ("/") is already used in menu paths, you should replace closing tags with an ASCII 003 instead e.g.: hexchat\_command (ph, "MENU -m ADD "Bold Menu<03b>""); - **-pX:** Specify a menu item's position number. e.g. -p5 will cause the item to be inserted in the 5th place. If the position is a negative number, it will be used as an offset from the bottom/right-most item. - **-rX,group:** Specify a radio menu item, with initial state X and a group name. The group name should be the exact label of another menu item (without the path) that this item will be grouped with. For radio items, only a select command will be executed (no unselect command). - **-tX:** Specify a toggle menu item with an initial state. -t0 for an "unticked" item and -t1 for a "ticked" item. If you want to change an item's toggle state or enabled flag, just *ADD* an item with exactly the same name and command and specify the *-tX -eX* parameters you need. It's also possible to add items to HexChat's existing menus, for example: .. code-block:: none MENU ADD "Settings/Sub Menu" MENU -t0 ADD "Settings/Sub Menu/My Setting" myseton mysetoff However, internal names and layouts of HexChat's menu may change in the future, so use at own risk. Here is an example of Radio items: .. code-block:: none MENU ADD "Language" MENU -r1,"English" ADD "Language/English" cmd1 MENU -r0,"English" ADD "Language/Spanish" cmd2 MENU -r0,"English" ADD "Language/German" cmd3 You can also change menus other than the main one (i.e popup menus). Currently they are: ============ ============================================================ Root Name Menu ============ ============================================================ $TAB Tab menu (right click a channel/query tab or treeview row) $TRAY System Tray menu $URL URL link menu $NICK Userlist nick-name popup menu $CHAN Menu when clicking a channel in the text area ============ ============================================================ Example: .. code-block:: none MENU -p0 ADD "$TAB/Cycle Channel" cycle You can manipulate HexChat's system tray icon using the */TRAY* command: .. code-block:: none Usage: TRAY -f [] Flash tray between two icons. Leave off file2 to use default HexChat icon. TRAY -f Set tray to a fixed icon. TRAY -i Flash tray with an internal icon. TRAY -t Set the tray tooltip. TRAY -b <text> Set the tray balloon. Icon numbers: - 2: Message - 5: Highlight - 8: Private - 11:File For tray balloons on Linux, you'll need libnotify. Filenames can be *ICO* or *PNG* format. *PNG* format is supported on Linux/BSD and Windows XP. Set a timeout of -1 to use HexChat's default. Handling UTF-8/Unicode strings ------------------------------ The HexChat plugin API specifies that strings passed to and from HexChat must be encoded in UTF-8. What does this mean for the plugin programmer? You just have to be a little careful when passing strings obtained from IRC to system calls. For example, if you're writing a file-server bot, someone might message you a filename. Can you pass this filename directly to open()? Maybe! If you're lazy... The correct thing to do is to convert the string to "system locale encoding", otherwise your plugin will fail on non-ascii characters. Here are examples on how to do this conversion on Unix and Windows. In this example, someone will CTCP you the message "SHOWFILE <filename>". .. code-block:: c static int ctcp_cb (char *word[], char *word_eol[], void *userdata) { if(strcmp(word[1], "SHOWFILE") == 0) { get_file_name (nick, word[2]); } return HEXCHAT_EAT_HEXCHAT; } static void get_file_name (char *nick, char *fname) { char buf[256]; FILE *fp; /* the fname is in UTF-8, because it came from the HexChat API */ #ifdef _WIN32 wchar_t wide_name[MAX_PATH]; /* convert UTF-8 to WIDECHARs (aka UTF-16LE) */ if (MultiByteToWideChar (CP_UTF8, 0, fname, -1, wide_name, MAX_PATH) < 1) { return; } /* now we have WIDECHARs, so we can _wopen() or CreateFileW(). */ /* _wfopen actually requires NT4, Win2000, XP or newer. */ fp = _wfopen (wide_name, "r"); #else char *loc_name; /* convert UTF-8 to System Encoding */ loc_name = g_filename_from_utf8 (fname, -1, 0, 0, 0); if(!loc_name) { return; } /* now open using the system's encoding */ fp = fopen (loc_name, "r"); g_free (loc_name); #endif if (fp) { while (fgets (buf, sizeof (buf), fp)) { /* send every line to the user that requested it */ hexchat_commandf (ph, "QUOTE NOTICE %s :%s", nick, buf); } fclose (fp); } } Types and Constants ------------------- .. type:: hexchat_plugin hexchat_list hexchat_hook hexchat_context hexchat_event_attrs .. var:: HEXCHAT_PRI_HIGHEST HEXCHAT_PRI_HIGH HEXCHAT_PRI_NORM HEXCHAT_PRI_LOW HEXCHAT_PRI_LOWEST .. var:: HEXCHAT_EAT_NONE HEXCHAT_EAT_XCHAT HEXCHAT_EAT_PLUGIN HEXCHAT_EAT_ALL .. var:: HEXCHAT_FD_READ HEXCHAT_FD_WRITE HEXCHAT_FD_EXCEPTION HEXCHAT_FD_NOTSOCKET Functions --------- General Functions ''''''''''''''''' .. function:: void hexchat_command (hexchat_plugin *ph, const char *command) Executes a command as if it were typed in HexChat's input box. :param ph: Plugin handle (as given to `hexchat_plugin_init`). :param command: Command to execute, without the forward slash "/". .. function:: void hexchat_commandf (hexchat_plugin *ph, const char *format, ...) Executes a command as if it were typed in HexChat's input box and provides string formatting like `printf`. :param ph: Plugin handle (as given to `hexchat_plugin_init`). :param format: The format string. .. function:: void hexchat_print (hexchat_plugin *ph, const char *text) Prints some text to the current tab/window. :param ph: Plugin handle (as given to `hexchat_plugin_init`). :param text: Text to print. May contain mIRC color codes. .. function:: void hexchat_printf (hexchat_plugin *ph, const char *format, ...) Prints some text to the current tab/window and provides formatting like `printf`. :param ph: Plugin handle (as given to `hexchat_plugin_init`). :param format: The format string. .. function:: int hexchat_emit_print (hexchat_plugin *ph, const char *event_name, ...) Generates a print event. This can be any event found in the :menuselection:`Settings --> Text Events` window. The vararg parameter list **must** always be NULL terminated. Special care should be taken when calling this function inside a print callback (from :func:`hexchat_hook_print`), as not to cause endless recursion. :param ph: Plugin handle (as given to `hexchat_plugin_init`). :param event_name: Text event to print. :returns: 0 on Failure, 1 on Success **Example:** .. code-block:: c hexchat_emit_print (ph, "Channel Message", "John", "Hi there", "@", NULL); .. function:: int hexchat_emit_print_attrs (hexchat_plugin *ph, hexchat_event_attrs *attrs, const char *event_name, ...) Generates a print event. This is the same as :func:`hexchat_emit_print` but it passes an :type:`hexchat_event_attrs *` to hexchat with the print attributes. :param ph: Plugin handle (as given to `hexchat_plugin_init`). :param attrs: Print attributes. This should be obtained with :func:`hexchat_event_attrs_create` and freed with :func:`hexchat_event_attrs_free`. :param event_name: Text event to print. :returns: 0 on Failure, 1 on Success .. versionadded:: 2.9.6 **Example:** .. code-block:: c hexchat_event_attrs *attrs; attrs = hexchat_event_attrs_create (ph); attrs->server_time_utc = 1342224702; hexchat_emit_print (ph, attrs, "Channel Message", "John", "Hi there", "@", NULL); hexchat_event_attrs_free (ph, attrs); .. function:: void hexchat_send_modes (hexchat_plugin *ph, const char *targets[], int ntargets, \ int modes_per_line, char sign, char mode) Sends a number of channel mode changes to the current channel. For example, you can Op a whole group of people in one go. It may send multiple MODE lines if the request doesn't fit on one. Pass 0 for *modes_per_line* to use the current server's maximum possible. This function should only be called while in a channel context. :param ph: Plugin handle (as given to `hexchat_plugin_init`). :param targets: Array of targets (strings). The names of people whom the action will be performed on. :param ntargets: Number of elements in the array given. :param modes_per_line: Maximum modes to send per line. :param sign: Mode sign, '-' or '+'. :param mode: Mode char, e.g. 'o' for Ops. **Example:** (Ops the three names given) .. code-block:: c const char *names_to_Op[] = {"John", "Jack", "Jill"}; hexchat_send_modes (ph, names_to_Op, 3, 0, '+', 'o'); .. function:: int hexchat_nickcmp (hexchat_plugin *ph, const char *s1, const char *s2) Performs a nick name comparision, based on the current server connection. This might be an RFC1459 compliant string compare, or plain ascii (in the case of DALNet). Use this to compare channels and nicknames. The function works the same way as `strcasecmp`. :param ph: Plugin handle (as given to `hexchat_plugin_init`). :param s1: String to compare. :param s2: String to compare *s1* to. **Quote from RFC1459:** >Because of IRC's scandanavian origin, the characters {}\| are considered to be the lower case equivalents of the characters [], respectively. This is a critical issue when determining the equivalence of two nicknames. :returns: An integer less than, equal to, or greater than zero if *s1* is found, respectively, to be less than, to match, or be greater than *s2*. .. function:: char* hexchat_strip (hexchat_plugin *ph, const char *str, int len, int flags) Strips mIRC color codes and/or text attributes (bold, underlined etc) from the given string and returns a newly allocated string. :param ph: Plugin handle (as given to `hexchat_plugin_init`). :param str: String to strip. :param len: Length of the string (or -1 for NULL terminated). :param flags: Bit-field of flags: - 0: Strip mIRC colors. - 1: Strip text attributes. :returns: A newly allocated string or NULL for failure. You must free this string with :func:`hexchat_free`. **Example:** .. code-block:: c { char *new_text; /* strip both colors and attributes by using the 0 and 1 bits (1 BITWISE-OR 2) */ new_text = hexchat_strip (ph, "\00312Blue\003 \002Bold!\002", -1, 1 | 2); if (new_text) { /* new_text should now contain only "Blue Bold!" */ hexchat_printf (ph, "%s\n", new_text); hexchat_free (ph, new_text); } } .. function:: void hexchat_free (hexchat_plugin *ph, void *ptr) Frees a string returned by **hexchat\_\*** functions. Currently only used to free strings from :func:`hexchat_strip`. :param ph: Plugin handle (as given to `hexchat_plugin_init`). :param ptr: Pointer to free. .. function:: hexchat_event_attrs *hexchat_event_attrs_create (hexchat_plugin *ph) Allocates a new :type:`hexchat_event_attrs`. The attributes are initially marked as unused. :returns: A pointer to the allocated :type:`hexchat_event_attrs`. Should be freed by :func:`hexchat_event_attrs_free`. .. versionadded:: 2.9.6 .. function:: void hexchat_event_attrs_free (hexchat_plugin *ph, hexchat_event_attrs *attrs) Frees an :type:`hexchat_event_attrs`. :param attrs: Attributes previously allocated by :func:`hexchat_event_attrs_create`. .. versionadded:: 2.9.6 Getting Information ''''''''''''''''''' .. function:: const char* hexchat_get_info (hexchat_plugin *ph, const char *id) Returns information based on your current context. :param ph: Plugin handle (as given to `hexchat_plugin_init`). :param id: ID of the information you want. List of ID's(case sensitive): - **away:** away reason or NULL if you are not away. - **channel:** current channel name. - **charset:** character-set used in the current context. - **configdir:** HexChat config directory, e.g.: ``/home/user/.config/hexchat``. This string is encoded in UTF-8. - **event\_text <name>:** text event format string for *name*. - **gtkwin\_ptr:** (GtkWindow \*). - **host:** real hostname of the server you connected to. - **inputbox:** the input-box contents, what the user has typed. - **libdirfs:** library directory. e.g. /usr/lib/hexchat. The same directory used for auto-loading plugins. This string isn't necessarily UTF-8, but local file system encoding. - **modes:** channel modes, if known, or NULL. - **network:** current network name or NULL. - **nick:** your current nick name. - **nickserv:** nickserv password for this network or NULL. - **server:** current server name (what the server claims to be). NULL if you are not connected. - **topic:** current channel topic. - **version:** HexChat version number. - **win\_ptr:** native window pointer. Unix: (GtkWindow \*) Win32: HWND. - **win\_status:** window status: "active", "hidden" or "normal". :returns: A string of the requested information, or NULL. This string must not be freed and must be copied if needed after the call to :func:`hexchat_get_info`. .. function:: int hexchat_get_prefs (hexchat_plugin *ph, const char *name, \ const char **string, int *integer) Provides HexChat's setting information (that which is available through the :command:`/SET` command). A few extra bits of information are available that don't appear in the :command:`/SET` list, currently they are: - **state\_cursor:** Current input box cursor position (characters, not bytes). - **id:** Unique server id :param ph: Plugin handle (as given to `hexchat_plugin_init`). :param name: Setting name required. :param string: Pointer-pointer which to set. :param integer: Pointer to an integer to set, if setting is a boolean or integer type. :returns: - 0: Failed. - 1: Returned a string. - 2: Returned an integer. - 3: Returned a boolean. **Example:** .. code-block:: c { int i; const char *str; if (hexchat_get_prefs (ph, "irc_nick1", &str, &i) == 1) { hexchat_printf (ph, "Current nickname setting: %s\n", str); } } .. function:: hexchat_list* hexchat_list_get (hexchat_plugin *ph, const char *name) Retreives lists of information. :param name: Name from the `List and Fields Table <plugins.html#lists-and-fields>`_ :returns: hexchat_list to be used by the following functions. .. function:: const char* const* hexchat_list_fields (hexchat_plugin *ph, const char *name) Lists fields in a given list. :param name: Name from the `List and Fields Table <plugins.html#lists-and-fields>`_ .. function:: int hexchat_list_next (hexchat_plugin *ph, hexchat_list *xlist) Selects the next list item in a list. :param xlist: :type:`hexchat_list` returned by :func:`hexchat_list_get` .. function:: const char* hexchat_list_str (hexchat_plugin *ph, hexchat_list *xlist, const char *name) Gets a string field from a list. :param name: Name from the `List and Fields Table <plugins.html#lists-and-fields>`_ :param xlist: :type:`hexchat_list` returned by :func:`hexchat_list_get` .. function:: int hexchat_list_int (hexchat_plugin *ph, hexchat_list *xlist, const char *name) Gets a int field from a list. :param name: Name from the `List and Fields Table <plugins.html#lists-and-fields>`_ :param xlist: :type:`hexchat_list` returned by :func:`hexchat_list_get` .. function:: time_t hexchat_list_time (hexchat_plugin *ph, hexchat_list *xlist, const char *name) Gets a time field from a list. :param name: Name from the `List and Fields Table <plugins.html#lists-and-fields>`_ :param xlist: :type:`hexchat_list` returned by :func:`hexchat_list_get` .. function:: void hexchat_list_free (hexchat_plugin *ph, hexchat_list *xlist) Frees a list. :param xlist: :type:`hexchat_list` returned by :func:`hexchat_list_get` Hook Functions '''''''''''''' .. function:: hexchat_hook* hexchat_hook_command (hexchat_plugin *ph, const char *name, int pri, \ int (*callb) (char *word[], char *word_eol[], void *user_data), \ const char *help_text, void *userdata) Adds a new :command:`/command`. This allows your program to handle commands entered at the input box. To capture text without a "/" at the start (non-commands), you may hook a special name of "". i.e **hexchat_hook_command(ph, "", ...)**. Commands hooked that begin with a period ('.') will be hidden in :command:`/HELP` and :command:`/HELP -l`. :param ph: Plugin handle (as given to `hexchat_plugin_init`). :param name: Name of the command (without the forward slash). :param pri: Priority of this command. Use :data:`HEXCHAT_PRI_NORM`. :param callb: Callback function. This will be called when the user executes the given command name. :param help_text: String of text to display when the user executes :command:`/HELP` for this command. May be NULL if you're lazy. :param userdata: Pointer passed to the callback function. :returns: Pointer to the hook. Can be passed to :func:`hexchat_unhook`. **Example:** .. code-block:: c static int onotice_cb (char *word[], char *word_eol[], void *userdata) { if (word_eol[2][0] == 0) { hexchat_printf (ph, "Second arg must be the message!\n"); return HEXCHAT_EAT_ALL; } hexchat_commandf (ph, "NOTICE @%s :%s", hexchat_get_info (ph, "channel"), word_eol[2]); return HEXCHAT_EAT_ALL; } hexchat_hook_command (ph, "ONOTICE", HEXCHAT_PRI_NORM, onotice_cb, "Usage: ONOTICE <message> Sends a notice to all ops", NULL); .. function:: hexchat_hook* hexchat_hook_fd (hexchat_plugin *ph, int fd, int flags, \ int (*callb) (int fd, int flags, void *user_data), void *userdata) Hooks a socket or file descriptor. WIN32: Passing a pipe from MSVCR71, MSVCR80 or other variations is not supported at this time. :param ph: Plugin handle (as given to *hexchat\_plugin\_init ()*). :param fd: The file descriptor or socket. :param flags: One or more of `HEXCHAT_FD_\* constants <plugins.html#types-and-constants>`_ tells HexChat that the provided *fd* is not a socket, but an "MSVCRT.DLL" pipe. :param callb: Callback function. This will be called when the socket is available for reading/writing or exception (depending on your chosen *flags*) :param userdata: Pointer passed to the callback function. :returns: Pointer to the hook. Can be passed to :func:`hexchat_unhook`. .. function:: hexchat_hook* hexchat_hook_print (hexchat_plugin *ph, const char *name, int pri, \ int (*callb) (char *word[], void *user_data), void *userdata) Registers a function to trap any print events. The event names may be any available in the :menuselection:`Settings --> Text Events` window. There are also some extra "special" events you may hook using this function. Currently they are: - "Open Context": Called when a new hexchat\_context is created. - "Close Context": Called when a hexchat\_context pointer is closed. - "Focus Tab": Called when a tab is brought to front. - "Focus Window": Called a toplevel window is focused, or the main tab-window is focused by the window manager. - "DCC Chat Text": Called when some text from a DCC Chat arrives. It provides these elements in the *word[]* array: .. code-block:: c word[1] Address word[2] Port word[3] Nick word[4] The Message - "Key Press": Called when some keys are pressed in the input box. It provides these elements in the *word[]* array: .. code-block:: c word[1] Key Value word[2] State Bitfield (shift, capslock, alt) word[3] String version of the key word[4] Length of the string (may be 0 for unprintable keys) :param ph: Plugin handle (as given to `hexchat_plugin_init`). :param name: Name of the print event (as in *Text Events* window). :param pri: Priority of this command. Use :data:`HEXCHAT_PRI_NORM`. :param callb: Callback function. This will be called when this event name is printed. :param userdata: Pointer passed to the callback function. :returns: Pointer to the hook. Can be passed to :func:`hexchat_unhook`. **Example:** .. code-block:: c static int youpart_cb (char *word[], void *userdata) { hexchat_printf (ph, "You have left channel %s\n", word[3]); return HEXCHAT_EAT_HEXCHAT; /* dont let HexChat do its normal printing */ } hexchat_hook_print (ph, "You Part", HEXCHAT_PRI_NORM, youpart_cb, NULL); .. function:: hexchat_hook* hexchat_hook_print_attrs (hexchat_plugin *ph, const char *name, int pri, \ int (*callb) (char *word[], hexchat_event_attrs *attrs, void *user_data), \ void *userdata) Registers a function to trap any print events. This is the same as :func:`hexchat_hook_print` but the callback receives an :type:`hexchat_event_attrs *` with attributes related to the print event. :param ph: Plugin handle (as given to `hexchat_plugin_init`). :param name: Name of the print event (as in *Text Events* window). :param pri: Priority of this command. Use :data:`HEXCHAT_PRI_NORM`. :param callb: Callback function. This will be called when this event name is printed. :param userdata: Pointer passed to the callback function. :returns: Pointer to the hook. Can be passed to :func:`hexchat_unhook`. .. versionadded:: 2.9.6 .. function:: hexchat_hook* hexchat_hook_server (hexchat_plugin *ph, const char *name, int pri, \ int (*callb) (char *word[], char *word_eol[], void *user_data), void *userdata) Registers a function to be called when a certain server event occurs. You can use this to trap *PRIVMSG*, *NOTICE*, *PART*, a server numeric, etc. If you want to hook every line that comes from the IRC server, you may use the special name of *RAW LINE*. :param ph: Plugin handle (as given to `hexchat_plugin_init`). :param name: Name of the server event. :param pri: Priority of this command. Use :data:`HEXCHAT_PRI_NORM`. :param callb: Callback function. This will be called when this event is received from the server. :param userdata: Pointer passed to the callback function. :returns: Pointer to the hook. Can be passed to :func:`hexchat_unhook`. **Example:** .. code-block:: c static int kick_cb (char *word[], char *word_eol[], void *userdata) { hexchat_printf (ph, "%s was kicked from %s (reason=%s)\n", word[4], word[3], word_eol[5]); return HEXCHAT_EAT_NONE; /* don't eat this event, let other plugins and HexChat see it too */ } hexchat_hook_server (ph, "KICK", HEXCHAT_PRI_NORM, kick_cb, NULL); .. function:: hexchat_hook* hexchat_hook_server_attrs (hexchat_plugin *ph, const char *name, int pri, \ int (*callb) (char *word[], char *word_eol[], \ hexchat_event_attrs *attrs, void *user_data), void *userdata) Registers a function to be called when a certain server event occurs. This is the same as :func:`hexchat_hook_server` but the callback receives an :type:`hexchat_event_attrs *` with attributes related to the server event. :param ph: Plugin handle (as given to `hexchat_plugin_init`). :param name: Name of the server event. :param pri: Priority of this command. Use :data:`HEXCHAT_PRI_NORM`. :param callb: Callback function. This will be called when this event is received from the server. :param userdata: Pointer passed to the callback function. :returns: Pointer to the hook. Can be passed to :func:`hexchat_unhook`. .. versionadded:: 2.9.6 .. function:: hexchat_hook *hexchat_hook_timer (hexchat_plugin *ph, int timeout, \ int (*callb) (void *user_data), void *userdata) Registers a function to be called every "timeout" milliseconds. :param ph: Plugin handle (as given to `hexchat_plugin_init`). :param timeout: Timeout in milliseconds (1000 is 1 second). :param callb: Callback function. This will be called every "timeout" milliseconds. :param userdata: Pointer passed to the callback function. :returns: Pointer to the hook. Can be passed to :func:`hexchat_unhook`. **Example:** .. code-block:: c static hexchat_hook *myhook; static int stop_cb (char *word[], char *word_eol[], void *userdata) { if (myhook != NULL) { hexchat_unhook (ph, myhook); myhook = NULL; hexchat_print (ph, "Timeout removed!\n"); } return HEXCHAT_EAT_ALL; } static int timeout_cb (void *userdata) { hexchat_print (ph, "Annoying message every 5 seconds! Type /STOP to stop it.\n"); return 1; /* return 1 to keep the timeout going */ } myhook = hexchat_hook_timer (ph, 5000, timeout_cb, NULL); hexchat_hook_command (ph, "STOP", HEXCHAT_PRI_NORM, stop_cb, NULL, NULL); .. function:: void* hexchat_unhook (hexchat_plugin *ph, hexchat_hook *hook) Unhooks any hook registered with **hexchat\_hook\_print/server/timer/command**. When plugins are unloaded, all of its hooks are automatically removed, so you don't need to call this within your `hexchat_plugin_deinit` function. :param ph: Plugin handle (as given to `hexchat_plugin_init`). :param hook: Pointer to the hook, as returned by **hexchat\_hook\_\***. :returns: The userdata you originally gave to **hexchat\_hook\_\***. Context Functions ''''''''''''''''' .. function:: hexchat_context* hexchat_find_context(hexchat_plugin *ph, const char *servname, const char *channel) Finds a context based on a channel and servername. If *servname* is NULL, it finds any channel (or query) by the given name. If *channel* is NULL, it finds the front-most tab/window of the given *servname*. If NULL is given for both arguments, the currently focused tab/window will be returned. :param ph: Plugin handle (as given to `hexchat_plugin_init`). :param servname: Server name or NULL. :param channel: Channel name or NULL. :returns: Context pointer (for use with :func:`hexchat_set_context`) or NULL. .. function:: hexchat_context* hexchat_get_context (hexchat_plugin *ph) Returns the current context for your plugin. You can use this later with :func:`hexchat_set_context`. :param ph: Plugin handle (as given to `hexchat_plugin_init`). :returns: Context pointer (for use with :func:`hexchat_set_context`). .. function:: int hexchat_set_context (hexchat_plugin *ph, hexchat_context *ctx) Changes your current context to the one given. :param ph: Plugin handle (as given to `hexchat_plugin_init`). :param ctx: Context to change to (obtained with :func:`hexchat_get_context` or :func:`hexchat_find_context`). :returns: - 1: Success. - 0: Failure. Plugin Preferences '''''''''''''''''' .. function:: int hexchat_pluginpref_set_str (hexchat_plugin *ph, const char *var, const char *value) Saves a plugin-specific setting with string value to a plugin-specific config file. :param ph: Plugin handle (as given to `hexchat_plugin_init`). :param var: Name of the setting to save. :param value: String value of the the setting. :returns: - 1: Success. - 0: Failure. **Example:** .. code-block:: c int hexchat_plugin_init (hexchat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg) { ph = plugin_handle; *plugin_name = "Tester Thingie"; *plugin_desc = "Testing stuff"; *plugin_version = "1.0"; hexchat_pluginpref_set_str (ph, "myvar1", "I want to save this string!"); hexchat_pluginpref_set_str (ph, "myvar2", "This is important, too."); return 1; /* return 1 for success */ } In the example above, the settings will be saved to the plugin\_tester\_thingie.conf file, and its content will be: >myvar1 = I want to save this string! myvar2 = This is important, too. You should never need to edit this file manually. .. function:: int hexchat_pluginpref_get_str (hexchat_plugin *ph, const char *var, char *dest) Loads a plugin-specific setting with string value from a plugin-specific config file. :param ph: Plugin handle (as given to `hexchat_plugin_init`). :param var: Name of the setting to load. :param dest: Array to save the loaded setting's string value to. :returns: - 1: Success. - 0: Failure. .. function:: int hexchat_pluginpref_set_int (hexchat_plugin *ph, const char *var, int value) Saves a plugin-specific setting with decimal value to a plugin-specific config file. :param ph: Plugin handle (as given to `hexchat_plugin_init`). :param var: Name of the setting to save. :param value: Decimal value of the the setting. :returns: - 1: Success. - 0: Failure. **Example:** .. code-block:: c static int saveint_cb (char *word[], char *word_eol[], void *user_data) { int buffer = atoi (word[2]); if (buffer > 0 && buffer < INT_MAX) { if (hexchat_pluginpref_set_int (ph, "myint1", buffer)) { hexchat_printf (ph, "Setting successfully saved!\n"); } else { hexchat_printf (ph, "Error while saving!\n"); } } else { hexchat_printf (ph, "Invalid input!\n"); } return HEXCHAT_EAT_HEXCHAT; } You only need such complex checks if you're saving user input, which can be non-numeric. .. function:: int hexchat_pluginpref_get_int (hexchat_plugin *ph, const char *var) Loads a plugin-specific setting with decimal value from a plugin-specific config file. :param ph: Plugin handle (as given to `hexchat_plugin_init`). :param var: Name of the setting to load. :returns: The decimal value of the requested setting upon success, -1 for failure. .. function:: int hexchat_pluginpref_delete (hexchat_plugin *ph, const char *var) Deletes a plugin-specific setting from a plugin-specific config file. :param ph: Plugin handle (as given to `hexchat_plugin_init`). :param var: Name of the setting to delete. :returns: - 1: Success. - 0: Failure. If the given setting didn't exist, it also returns 1, so 1 only indicates that the setting won't exist after the call. .. function:: int hexchat_pluginpref_list (hexchat_plugin *ph, char *dest) Builds a comma-separated list of the currently saved settings from a plugin-specific config file. :param ph: Plugin handle (as given to `hexchat_plugin_init`). :param dest: Array of size 4096 to save the list to. :returns: - 1: Success. - 0: Failure (nonexistent, empty or inaccessible config file). **Example:** .. code-block:: c static void list_settings () { char list[4096]; char buffer[512]; char *token; hexchat_pluginpref_list (ph, list); hexchat_printf (ph, "Current Settings:\n"); token = strtok (list, ","); while (token != NULL) { hexchat_pluginpref_get_str (ph, token, buffer); hexchat_printf (ph, "%s: %s\n", token, buffer); token = strtok (NULL, ","); } } In the example above we query the list of currently stored settings, then print them one by one with their respective values. We always use *hexchat\_pluginpref\_get\_str ()*, and that's because we can read an integer as string (but not vice versa). Plugin GUI '''''''''' .. function:: void* hexchat_plugingui_add (hexchat_plugin *ph, const char *filename, const char *name, \ const char *desc, const char *version, char *reserved) Adds a fake plugin to the GUI in :menuselection:`Window --> Plugins and Scripts`. This does not need to be done for your actual plugin and is only used for interfaces to other languages like our python plugin. :returns: Handle to be used with :func:`hexchat_plugingui_remove` .. function:: void hexchat_plugingui_remove (hexchat_plugin *ph, void *handle) Removes the fake plugin from the GUI. Again not to be used to remove your own plugin. :param handle: Handle returned by :func:`hexchat_plugingui_add` ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������debian/watch����������������������������������������������������������������������������������������0000664�0000000�0000000�00000000142�12301012710�010201� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������version=3 http://dl.hexchat.net/hexchat/hexchat-(.*)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz))) ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������debian/hexchat.menu���������������������������������������������������������������������������������0000664�0000000�0000000�00000000256�12276450107�011511� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������?package(hexchat):needs="X11" section="Applications/Network/Communication"\ title="HexChat" command="/usr/bin/hexchat" hints="IRC"\ icon="/usr/share/pixmaps/hexchat.xpm" ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������debian/hexchat-common.install�����������������������������������������������������������������������0000664�0000000�0000000�00000000055�12301307467�013475� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������usr/include usr/share/locale usr/share/icons �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������debian/upstream/������������������������������������������������������������������������������������0000775�0000000�0000000�00000000000�12300227212�011017� 5����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������debian/upstream/signing-key.asc���������������������������������������������������������������������0000664�0000000�0000000�00000006115�12300227212�013736� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������-----BEGIN PGP PUBLIC KEY BLOCK----- Version: SKS 1.1.4 Comment: Hostname: keys.fedoraproject.org mQINBFL9JHIBEADDKL+vc3MHctXCWxG0IcuLPm4i+WO9jH6MdF8p2bokaL5lilcJo2i0RHIm P83FpqCDj/hE7AeB3Ix3Oq3tIe6lpCz468OVbLivErX/yL8rYUhC+ybazlSJcBipTIezD3pZ I/vpFyCIC8mSEI4PJGiLotioNJWQBStQuuPqMKo4cd6cRWx6WovQMKa85rQPvv+wYCseBqU6 xBx1xSgpkjDJnAH7We5G6T8TYVM2gqXtii/JYyUC8E7Z2BBdSGkq1Dma1W6paOw7VOtLu6Yb AH9v/VUVx0UdzwiyXHQ8qLKbxeXkex9dzoe+oy8wt3bvVHirxU42IlJJVLY4NcUYhr/xOq/Y qT+3sWAqgdVM/WnzY3bPiMnQXqQ3UZ0LKXXsF2+9u2qM6FTiAHIMLtH95IlOQo1qXmDl1HRJ TNq3B41UduLDRUhPuGBaXbOtb6ql4nV3/BTxcHumisMh5ALhqXHRNOdn+mEjvT2HT6pp07Zf VhFwM4U0K78f52S+NppiS0cWtn9ibq+UmqZyvw9HMOHYt51lSUOueg/sOvsxrG1gjvcUMlJw nCgS3b+QUmZYo+pl/l13fiWPQpteVGZqKPMBBaQ4MCrwHgvikN8uppKDw8fFGs44LgbCsDoQ A8wKxNzMEMTvuhFFgCiOxMCzR0XKxlcKr8CiHZjYwovJLFfLvwARAQABtCVUaW5nUGluZyA8 dGluZ3BpbmdAZmVkb3JhcHJvamVjdC5vcmc+iQI+BBMBAgAoBQJS/SRyAhsDBQkJZgGABgsJ CAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRCzx84hDedt/GPYD/9fz6uJ1pEJKUKb2o8b1mQk 9Qa+rXv7sPm9x+KnBrjSkwdq3s17OGbEGA8kUSCvxN7+auesq4UfE8bCllB5FhiGwETtWCDU JFc1bzJAmABAoXskCrUJgn/zDw/MDAtO0uGAhnz1aw1BU17hHORRDOVPqqApE0eSg5gxN8jj dx3yVvTaanaU7aZzWCqQSkCTda6Hjks0cAljGuPwN7n3ZVzTXO1E1f5DQedGeMxBTqtorhOW 9bxBOUvbJnfHZsMOfvB3gcQKCuRFkxVj051Ua9+u+d70uZuXelFDagfIAa7SVDy0BxjqSoUY fQJEtdzPvGHVowM6sDJZfM4NrXW4tfZ1opgMklER3InhuJSsSU5pJ/gpjWShUR6zn/zfNZ5A 2N99TgNmkSfvweCJrQFT9iWGR/Y8k0hav2cgOJVtu26gXnqNHBQSOXk2wKzl/EAa1BhToIQh dpXXFVwyEzQ57aDFNBzhAflw2k27y6X61BqoycxIjjeWE8BGRAWHh3lndkkyTxXghhz37/cy jvjWs7vZovRp+w0nMVKbTFH9MiVXXuOYnTGpnGD90GFAtuPWgIMEPVE9a1lNHTjwgIloUYVQ EoZFCakJnihcq5Sqay7sF8dlgyCgnthfzYAJHmSXNEWVvzCEFeuAffcibO9pEcmTH0PO3Nz0 w79EAo2VvV/r9LkCDQRS/SRyARAAsdRSVgStUTkbvqx2udlHNPiZHK+/dQNdCLcMr+n7ANEU +pqKG+rPEb3rfDUB+kmVUaohst3fIJcZ3nU99mcR1kaCwvD3Oj50IVVwd0UmaBPVVZvc/u5x zhl1wo9GtDrIMhkhy3qxPezL5TJZH9hLDk4+oq2WQ7yR+BG5W5NVswuCuRAua+xS/+LHRy2w 1hFEd8Hpgu7NJ/SLrB8DQYk0ksaWoP3avfunlcqAN6KbKklN8JUqn5t1P9BtzBuCZMA5kt5y uIZpqpwmpHV2WqimQxmY32s7U7juUT+9ynzR0jX7K3jl2N5XV+yctanR6f4QaeghV4R7pXeG cli/jurjEXDUHX3f2/FQQ3t89i2MNwB54YwJ5sCao354R96+4mzNvhwLa4/CeUMHv9vECTkd 1H09frWFvCNG6ZwXrH84JvVadrdyM5GhnV0DrAfSnXCkVeL4oquFT0tR3bb6SwMcazcRYLiJ WAJCzCcMLmmivF/iv5IAJt6ufrcbMUf4w5g2haqo9GJ30+7PnM20pJL1wxuvLE1a9XNru9Yv ENF10kqy99P4//v/wjfZj+qCOnWEQyucAhWmMHEHuU3f24iQ1l7F6JTgtAh58tU03zb2ivm9 GJLGrO2i8qRznOcX1SSNXqL8JAaVwEEAxSaFpWbnV11L4zxbBMrfY3di1JeX2XEAEQEAAYkC JQQYAQIADwUCUv0kcgIbDAUJCWYBgAAKCRCzx84hDedt/H30D/9q1BN2RI+f5K7aYA4rf7dE IpOu+A1CqoEw0tQp20B3S6oHsiHm1DRbScxLbyPO0RlWe11agPjTVkAKFuJeGBjxBq3QdrGt ymB35UWxWycDjlU7goVcpDq8kph6TKn7J4HMad+8SEVF1+mo3YeAv164VsCqCAPQetB0gaQ6 KkRg5awwv3ch4C4d/k1fKmxUIDoSYiCeFysSyajwSImYKo6HoNNGXQbv1HvPco2sXKkp6U6D U8VPTuRPb2UQeqqGRU0oQvdvp+38ICjmtBQ9BFsMJSYIxOrxtx8G94r9cpnWY5HJbqXSfNH3 mbJnmkvBL9NhBxWsXfzQMd0nUIa1Mn+KNXOhHiI4YDUNoxNeYUi6F9b2w+KahrajblW9tyQ1 ysXJV0C5ldOeIO0gI4zOR4ZuJq4s5PmdvV5bYGIvnHpJG6XTn76UR7ohm06EydBwlTnZ2vtf PUwp7CgUGImW2TQ6a7tL+JndQ2edX/9V1ovtZVTKloRkfgBUMMmKms+89YCcrnu2BqSRTfKd x6Jj0XMhn+pGdTIz5/E7CWrPP8nD3OpWikTDMXWfTPe7/jWSDnbXqu+PKZbleBTH2ddJPKdW DUTCUGPbPhElpM5A8wUfpsrjalgTAVOQnNgKAECYfQx9fE1jabBZ/y5XEcbsY37M/BiCPDGw f7tIXJK6u3l8eA== =oYpI -----END PGP PUBLIC KEY BLOCK-----���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������debian/CHANGES��������������������������������������������������������������������������������������0000664�0000000�0000000�00000044664�12276455654�010221� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������HexChat ChangeLog ================= 2.9.6.1 (2013-09-15) -------------------- - fix some utilities causing crash `#740 <https://github.com/hexchat/hexchat/issues/740>`_ 2.9.6 (2013-09-11) ------------------ - redesign edit window in network list - rename favorites to autojoin - improve URL detection yet again (this time with more IPv6!) - implement ``/exec -o`` on Windows - improvements to the DCC window - improvements to sysinfo on Unix, including ``-e`` to print info instead of saying - add support for BLOWFISH, AES, and EXTERNAL SASL mechanisms - add reload command and button in plugingui - add support for server-time and znc.in/server-time[-iso] capabilities - add attributes to ``hook_print``/``server`` and ``emit_print`` for information such as server-time - add support for QuakeNet's challangeauth - add chanopt for stripping colors - add copy option to banlist entries - add autoconnect option to context menu of networks - add option for omitting alerts while window is focused - add python3 support along with various bugfixes - add libcanberra support on Unix - add tracking of users accounts - add ``%u`` to userlist popups for accounts - add channelkey to channel lists in plugin api - add ``MONITOR`` support for the friends list - add ``QUIET`` and ``UNQUIET`` commands - add support for the away-notify, account-notify, and extended-join capabilities - add notifications for friends away status (requires away-notify) - add events for quiet, unquiet, and quietlist - add Ctrl+N (New Server Window) keybinding - add Ctrl+Home/End keybinding for scrolling to top/bottom - add theme manager to Unix build system - fix compilation on FreeBSD - fix running as root - fix splitting ctcps and notices - fix alerts and scrollback chanopts - fix crash when attaching/detaching tabs - fix sending limited channel messages (op messages) to the wrong tab - change ``/load -e`` to load from config dir - remove Ctrl+L (Clear Text) keybinding - remove custom sound applications - remove away announce, replaced by away-notify on supported servers (`alternative python script <https://github.com/hexchat/hexchat-addons/blob/master/python/awayannounce/awayanounce.py>`_) - update network list 2.9.5 (2013-04-01) ------------------ - fix Checksum plugin with DCC download directory set - fix false positives with Update Checker - fix sound directory option on Unix - fix loading custom icons - fix tray icon not reappearing if the tray crashes - fix restoring maximized windows from tray - fix ``/QUERY -nofocus`` - fix reconnecting to channels with keys - fix compilation on FreeBSD - fix showing the join dialog when autojoining channels - fix Plugin-Tray menu not closing on Windows - fix close dialog minimizing to tray before selection - fix Python plugin compilation on Ubuntu 13.04 - fix Theme Manager crashing with read-only files - fix channel tree indentation without server tab or with icons - add auto-away support to Plugin-Tray - add Plugin-Tray option to disable blinking - add option to always show notices on current tab - add support for notification filtering in GNOME 3.8 - add support for channel keys in URLs - add option to color nicks in the user list the same way as in the chat area - add ability to automatically switch to last activity on change-page hotkey - add ability to save divider position between combined user list and channel tree - add global real name option to Preferences - add Safe Mode shortcut to the Start Menu group on Windows - add helpful links to the setup wizard on Windows - make the source tree compliant with Debian policies - install SVG icon on Unix - enable Plugin-Tray menu on Windows - enable IPv6 by default on Unix - show ``/WHOIS`` response on current tab by default - redesign the Ban List window to show invites, bans, exemptions and quiets - make user list icons slightly smaller - close all utility windows with the Esc key - improve URL and username detection in the chat area - make ``/JOIN`` focus the existing channel if already joined - change default DCC download directory to ~/Downloads on Unix - allow Plugins and Scripts utility to be opened in a tab - only beep when the HexChat window is not active - use the certs subfolder of the config folder for loading custom certificates - disable tray icon when using Unity - remove Lua and Tcl - remove HexTray in favor of built-in Plugin-Tray - remove installer theming on Windows - cease support for Perl 5.12 and 5.14 on Windows - rebuild every dependency with Visual C++ on Windows - stop using the WDK on Windows and depend on the Visual C++ Redistributable - update GTK+ to 2.24 on Windows - update default text events - update translations - update the network list 2.9.4 (2012-11-11) ------------------ - fix alerts when omit alerts in away option is set - fix dialog icon in userlist popup - fix opening links on Mac - fix default network in the Network List - fix initial folder in file dialogs - fix positioning the nick change dialog - fix error message for busy servers - fix filename encoding errors - fix Fedora spec file - fix Raw Log content being impossible to copy when auto-copy is disabled - fix rough icon rendering in most windows on Windows - fix config folder when specified with -d argument - add built-in support for SASL authentication via CAP - add support for identify-msg/multi-prefix server capabilities - add text events for CAP related messages - add support for the SysInfo plugin on Unix - add option to change update check frequency and delay for first check - add option to change GUI language on Windows - add Ignore entry to userlist popup - add Afrikaans, Asturian, Danish, Gujarati, Indonesian, Kinyarwanda and Malayalam translations - add ChangeLog and ReadMe links to Start Menu during installation on Windows - add manual page on Unix - add icon support for 3 levels above op user mode - change default colors, text events and user list/channel tree icons - make Esc key close the Raw Log window - use Consolas as the default font where available - open dialog window for double-clicking in the user list by default - variable separation, cleanup and renaming - check in the installers whether Windows release is supported by HexChat - display previous value after ``/SET`` - reorganize the Settings menu and add new options - redesign the About dialog - show certain help messages in GTK+ dialogs instead of command line - disable faulty one instance option - build system cosmetics on Unix - reorganize repo file structure - rebranding - update translations - update the network list 2.9.3 (2012-10-14) ------------------ - fix various URL detection bugs - fix default folders for file transfers in portable mode - fix Autotools warnings with recent releases - add ``/ADDSERVER`` command - add option to save URLs to disk on-the-fly - add option to omit alerts when marked as being away - add default icons for channel tree and option to turn them off - change certain default colors - enhance Non-BMP filtering performance - accept license agreement by default on Windows - update the network list 2.9.2 (2012-10-05) ------------------ - fix compilation on Red Hat and Fedora - fix portable to non-portable migrations on Windows - fix ban message in HexTray - fix icon in Connection Complete dialog - fix determining if the log folder path is full or relative - fix desktop notification icons on Unix - fix URL grabber saving an unlimited number of URLs by default - fix URL grabber memory leaks under certain circumstances - fix URL grabber trying to export URL lists to system folders by default - fix opening URLs without ``http(s)://`` - add support for regenerating text events during compilation on Windows - add support for the theme manager on Unix - add Unifont to the default list of alternative fonts - add option to retain colors in the topic - allow the installer to preserve custom GTK+ theme settings on Windows - use the icons subfolder of the config folder for loading custom icons - use port 6697 for SSL connections by default - install the SASL plugin by default on Windows - ``/lastlog`` improvements - build system cosmetics on Unix - open links with just left click by default - enable timestamps and include seconds by default - make libproxy an optional dependency on Unix - update German translation - update the network list 2.9.1 (2012-07-27) ------------------ - fix installing/loading plugins on Unix - fix restoring the HexChat window via shortcuts on Windows - fix HexTray icon rendering for certain events - fix the Show marker line option in Preferences - fix ``/lastlog`` regexp support on Windows - add support for the Checksum, Do At, FiSHLiM and SASL plugins on Unix - add option to retain colors when displaying scrollback - add MS Gothic to the default list of alternative fonts - rebranding and cleanup - eliminate lots of compiler warnings - Unix build system fixes and cosmetics - make Git ignore Unix-specific intermediate files - use better compression for Windows installers - switch to GTK+ file dialogs on Windows - restructure the Preferences window - use the addons subfolder of the config folder for auto-loading plugins/scripts - improve the dialog used for opening plugins/scripts - remember user limits in channel list between sessions - remember last search pattern during sessions - update XChat to r1521 2.9.0 (2012-07-14) ------------------ - rebranding - migrate code to GitHub - update XChat to r1515 - fix x64 Perl interface installation for Perl 5.16 - improve URL detection with new TLDs and file extensions 1508-3 (2012-06-17) ~~~~~~~~~~~~~~~~~~~ - add XChat Theme Manager - fix problems with Turkish locale 1508-2 (2012-06-15) ~~~~~~~~~~~~~~~~~~~ - add support for Perl 5.16 - update Do At plugin - fix drawing of chat area bottom - avoid false hits when restoring from tray via shortcut - migrate from NMAKE to Visual Studio 1508 (2012-06-02) ~~~~~~~~~~~~~~~~~ - remove Real Name from Network List - search window improvements - restore XChat-WDK from tray via shortcut if X-Tray is used 1507 (2012-05-13) ~~~~~~~~~~~~~~~~~ - update OpenSSL to 1.0.1c - FiSHLiM updates 1506 (2012-05-04) ~~~~~~~~~~~~~~~~~ - update OpenSSL to 1.0.1b - update German translation 1503 (2012-03-16) ~~~~~~~~~~~~~~~~~ - update OpenSSL to 1.0.1 - URL grabber updates - FiSHLiM updates 1500 (2012-02-16) ~~~~~~~~~~~~~~~~~ - add option for specifying alternative fonts - fix crash due to invalid timestamp format - X-Tray cosmetics 1499-7 (2012-02-08) ~~~~~~~~~~~~~~~~~~~ - fix update notifications - fix compilation on Linux - add IPv6 support to built-in identd 1499-6 (2012-01-20) ~~~~~~~~~~~~~~~~~~~ - add DNS plugin 1499-5 (2012-01-20) ~~~~~~~~~~~~~~~~~~~ - built-in fix for client crashes - update OpenSSL to 1.0.0g 1499-4 (2012-01-18) ~~~~~~~~~~~~~~~~~~~ - add Non-BMP plugin to avoid client crashes 1499-3 (2012-01-15) ~~~~~~~~~~~~~~~~~~~ - rework and extend plugin config API - add ``ADD``/``DEL``/``LIST`` support to X-SASL 1499-2 (2012-01-11) ~~~~~~~~~~~~~~~~~~~ - add X-SASL plugin 1499 (2012-01-09) ~~~~~~~~~~~~~~~~~ - fix saving FiSHLiM keys - update OpenSSL to 1.0.0f 1498-4 (2011-12-05) ~~~~~~~~~~~~~~~~~~~ - fix updates not overwriting old files - display WinSys output in one line for others - use Strawberry Perl for building 1498-3 (2011-12-02) ~~~~~~~~~~~~~~~~~~~ - add plugin config API - add Exec plugin - add WinSys plugin - perform periodic update checks automatically 1498-2 (2011-11-25) ~~~~~~~~~~~~~~~~~~~ - add FiSHLiM plugin - add option to allow only one instance of XChat to run 1498 (2011-11-23) ~~~~~~~~~~~~~~~~~ - separate x86 and x64 installers (uninstall any previous version!) - downgrade GTK+ to 2.16 - re-enable the transparent background option - various X-Tray improvements - add WMPA plugin - add Do At plugin - automatically save set variables to disk by default - update OpenSSL to 1.0.0e 1496-6 (2011-08-09) ~~~~~~~~~~~~~~~~~~~ - add option to auto-open new tab upon ``/MSG`` - fix the update checker to use the git repo - disable update checker cache 1496-5 (2011-08-07) ~~~~~~~~~~~~~~~~~~~ - fix attach/detach keyboard shortcut - add multi-language support to the spell checker 1496-4 (2011-07-27) ~~~~~~~~~~~~~~~~~~~ - recognize Windows 8 when displaying OS info - update OpenSSL certificate list - fix X-Tray blinking on unselected events - fix X-Tray keyboard shortcut handling - cease support for Perl 5.10 - use Strawberry Perl for 5.12 DLLs 1496-3 (2011-06-16) ~~~~~~~~~~~~~~~~~~~ - add option for changing spell checker color 1496-2 (2011-06-05) ~~~~~~~~~~~~~~~~~~~ - add support for custom license text 1496 (2011-05-30) ~~~~~~~~~~~~~~~~~ - display build type in CTPC VERSION reply - add support for Perl 5.14 1494 (2011-04-16) ~~~~~~~~~~~~~~~~~ - update Visual Studio to 2010 SP1 - update OpenSSL to 1.0.0d - ship MySpell dictionaries in a separate installer 1489 (2011-01-26) ~~~~~~~~~~~~~~~~~ - fix unloading the Winamp plugin - enable the Favorite Networks feature - add Channel Message event support to X-Tray - add mpcInfo plugin 1486 (2011-01-16) ~~~~~~~~~~~~~~~~~ - fix a possible memory leak in the update checker - fix XChat-Text shortcut creation - fix XChat version check via the plugin interface - add option for limiting the size of files to be checksummed - add X-Tray as an install option - disable Plugin-Tray context menu completely 1479-2 (2011-01-10) ~~~~~~~~~~~~~~~~~~~ - improve command-line argument support - add auto-copy options - enable XChat-Text - disable faulty tray menu items 1479 (2010-12-29) ~~~~~~~~~~~~~~~~~ - update GTK+ to 2.22.1 - update OpenSSL to 1.0.0c - update Python to 2.7.1 - replace X-Tray with Plugin-Tray 1469-3 (2010-10-20) ~~~~~~~~~~~~~~~~~~~ - add Checksum plugin - menu integration for Update Checker and Winamp 1469-2 (2010-10-09) ~~~~~~~~~~~~~~~~~~~ - fix DCC file sending - native open/save dialogs - make the version info nicer - register XChat-WDK as IRC protocol handler - add option to run XChat-WDK after installation - disable erroneous uninstall warnings - disable Plugin-Tray, provide X-Tray only - cease support for Perl 5.8 - replace EasyWinampControl with Winamp 1469 (2010-10-08) ~~~~~~~~~~~~~~~~~ - use Visual C++ 2010 for all WDK builds - build Enchant with WDK and update it to 1.6.0 - fix SSL validation - fix opening the config folder from GUI in portable mode - further improve dialog placement for closing network tabs 1468-2 (2010-10-02) ~~~~~~~~~~~~~~~~~~~ - update GTK+ to 2.22 - spelling support - more config compatibility with official build - improve dialog placement for closing network tabs - remove themes from the installer - disable toggle for favorite networks until it's usable - disable transparent backgrounds - hide mnemonic underlines until Alt key pressed - fix XP lagometer and throttlemeter rendering 1468 (2010-09-19) ~~~~~~~~~~~~~~~~~ - update Perl to 5.12.2 - update Tcl to 8.5.9 - fix scrollback shrinking - enable advanced settings pane - retain emoticon settings - add ``/IGNALL`` command 1464-6 (2010-09-06) ~~~~~~~~~~~~~~~~~~~ - fix Perl interface breakage - update checker plugin 1464-5 (2010-08-30) ~~~~~~~~~~~~~~~~~~~ - primitive update checker 1464-4 (2010-08-30) ~~~~~~~~~~~~~~~~~~~ - selectable tray icon - selectable theme for portable - selectable plugins 1464-3 (2010-08-29) ~~~~~~~~~~~~~~~~~~~ - black theme for portable 1464-2 (2010-08-29) ~~~~~~~~~~~~~~~~~~~ - make Perl version selectable during install 1464 (2010-08-26) ~~~~~~~~~~~~~~~~~ - Perl interface updates 1462 (2010-08-25) ~~~~~~~~~~~~~~~~~ - update XChat to r1462 - build system cleanup 1459-3 (2010-08-23) ~~~~~~~~~~~~~~~~~~~ - more installer changes (uninstall any previous version!) 1459-2 (2010-08-23) ~~~~~~~~~~~~~~~~~~~ - universal installer - update build dependencies 1459 (2010-08-19) ~~~~~~~~~~~~~~~~~ - portable mode and installer fixes 1457 (2010-08-17) ~~~~~~~~~~~~~~~~~ - disable GUI warnings 1455-2 (2010-08-17) ~~~~~~~~~~~~~~~~~~~ - unified installer for standard and portable 1455 (2010-08-15) ~~~~~~~~~~~~~~~~~ - support for gtkwin\_ptr in the Perl interface 1454 (2010-08-14) ~~~~~~~~~~~~~~~~~ - gtkwin\_ptr for plugins introduced 1452 (2010-08-14) ~~~~~~~~~~~~~~~~~ - fix taskbar alerts on x86 - upgrade Perl to 5.12 and make 5.8/5.10 builds available separately 1451-6 (2010-08-12) ~~~~~~~~~~~~~~~~~~~ - include Lua-WDK with the installer 1451-5 (2010-08-12) ~~~~~~~~~~~~~~~~~~~ - switch to Inno Setup (uninstall any previous version!) - add Lua support 1451-4 (2010-08-11) ~~~~~~~~~~~~~~~~~~~ - enable the XDCC plugin 1451-3 (2010-08-11) ~~~~~~~~~~~~~~~~~~~ - enable Python support 1451-2 (2010-08-11) ~~~~~~~~~~~~~~~~~~~ - enable SSL support - fix simultaneous connections - re-enable identd by default 1451 (2010-08-10) ~~~~~~~~~~~~~~~~~ - update XChat to r1451 - disable identd by default - remove DNS plugin 1444 (2010-07-30) ~~~~~~~~~~~~~~~~~ - update XChat to r1444 - downgrade Tcl to 8.5 - add Tcl support to the x64 build 1441 (2010-06-15) ~~~~~~~~~~~~~~~~~ - update XChat to r1441 - enable transfer of files bigger than 4 GB 1439 (2010-05-30) ~~~~~~~~~~~~~~~~~ - update XChat to r1439 (2.8.8) 1431-6 (2010-05-30) ~~~~~~~~~~~~~~~~~~~ - re-enable the transparent background option - add branding to Plugin-Tray - installer updates 1431-5 (2010-05-29) ~~~~~~~~~~~~~~~~~~~ - fix installer - add DNS plugin status messages 1431-4 (2010-05-28) ~~~~~~~~~~~~~~~~~~~ - disable the transparent background option - downgrade GTK+ to more stable 2.16 1431-3 (2010-05-23) ~~~~~~~~~~~~~~~~~~~ - add portable build support 1431-2 (2010-05-22) ~~~~~~~~~~~~~~~~~~~ - replace X-Tray with Plugin-Tray 1431 (2010-05-21) ~~~~~~~~~~~~~~~~~ - update XChat to r1431 - include a lot of XChat translations added since 2.8.6 1412-3 (2010-05-02) ~~~~~~~~~~~~~~~~~~~ - fix GTK function call 1412-2 (2010-05-02) ~~~~~~~~~~~~~~~~~~~ - re-enable taskbar alerts on x64 1412 (2010-05-02) ~~~~~~~~~~~~~~~~~ - update XChat to r1412 - update GTK+ and friends - update Visual Studio to 2010 - fix Perl warning message - include GTK L10n with the installer 1409-9 (2010-04-18) ~~~~~~~~~~~~~~~~~~~ - fix loading of scrollback 1409-8 (2010-04-03) ~~~~~~~~~~~~~~~~~~~ - fix X-Tray on x64 1409-7 (2010-04-02) ~~~~~~~~~~~~~~~~~~~ - disable taskbar notification options 1409-6 (2010-03-31) ~~~~~~~~~~~~~~~~~~~ - display version numbers everywhere 1409-5 (2010-03-31) ~~~~~~~~~~~~~~~~~~~ - add DNS plugin - add EasyWinampControl plugin - disable Plugin-Tray settings 1409-4 (2010-03-30) ~~~~~~~~~~~~~~~~~~~ - add X-Tray 1409-3 (2010-03-29) ~~~~~~~~~~~~~~~~~~~ - plugin linkage fixes 1409-2 (2010-03-29) ~~~~~~~~~~~~~~~~~~~ - enable IPv6 support - enable NLS support - enable Perl support - enable Tcl support 1409 (2010-03-29) ~~~~~~~~~~~~~~~~~ - initial release ����������������������������������������������������������������������������debian/hexchat.lintian-overrides��������������������������������������������������������������������0000664�0000000�0000000�00000000370�12303274013�014167� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# intentional typo as example for autoreplace function hexchat: spelling-error-in-binary usr/bin/hexchat teh the # source is confirmed as building with -D_FORTIFY_SOURCE=2 hexchat: hardening-no-fortify-functions usr/lib/*/hexchat/plugins/python.so ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������debian/rules����������������������������������������������������������������������������������������0000775�0000000�0000000�00000001212�12303224624�010242� 0����������������������������������������������������������������������������������������������������ustar ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 %: dh $@ --with autoreconf override_dh_auto_configure: dh_auto_configure -- --disable-silent-rules override_dh_auto_build: convert -resize 32x32 src/pixmaps/hexchat.png debian/hexchat.xpm gzip -c9 debian/CHANGES > debian/changelog.gz dh_auto_build override_dh_auto_clean: rm -f po/*.gmo rm -f src/common/dbus/org.hexchat.service.service rm -f src/common/textenums.h rm -f src/common/textevents.h rm -f src/common/make-te rm -f po/stamp-po rm -f debian/substvars rm -f debian/changelog.gz rm -f debian/hexchat.xpm dh_auto_clean ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������