<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.9.5">Jekyll</generator><link href="https://hexchat.github.io/atom.xml" rel="self" type="application/atom+xml" /><link href="https://hexchat.github.io/" rel="alternate" type="text/html" /><updated>2024-06-15T23:49:07+00:00</updated><id>https://hexchat.github.io/atom.xml</id><title type="html">HexChat</title><subtitle>Homepage</subtitle><entry><title type="html">2.16.2, The Final Release</title><link href="https://hexchat.github.io/news/2.16.2.html" rel="alternate" type="text/html" title="2.16.2, The Final Release" /><published>2024-02-09T00:00:00+00:00</published><updated>2024-02-09T00:00:00+00:00</updated><id>https://hexchat.github.io/news/2.16.2</id><content type="html" xml:base="https://hexchat.github.io/news/2.16.2.html"><![CDATA[<p>This week 2.16.2 has been released. It contains some small fixes and features
that have accumulated over the past two years since the last release.</p>

<p>This will be the last release I make of HexChat. The project has largely been
unmaintained for years now and nobody else stepped up to do that work.</p>

<p>I want to say thank you to all of the contributors, users, and chatters I’ve
interacted with over the years. HexChat was a very important and formative
project for me; I started contributing to it as a teenager, learned so much,
met many great people, and it led to greater things in my life. It is hard to
let go but the time has come for me to move on.</p>

<p>I am going to move all data that I can to be hosted on Github, so all documentation,
installers, and dependencies will be there until the end of Microsoft.</p>

<p>Forks of the project are welcomed. Nobody can stop the code from living on.</p>

<h4 id="links">Links</h4>

<ul>
  <li><a href="https://hexchat.github.io/downloads.html">Downloads</a></li>
  <li><a href="https://hexchat.readthedocs.org/en/latest/changelog.html">Changelog</a></li>
  <li><a href="https://github.com/hexchat/hexchat/compare/v2.16.1...v2.16.2">Git log</a></li>
</ul>]]></content><author><name></name></author><category term="release" /><summary type="html"><![CDATA[This week 2.16.2 has been released. It contains some small fixes and features that have accumulated over the past two years since the last release.]]></summary></entry><entry><title type="html">2.16.0 released and help wanted</title><link href="https://hexchat.github.io/news/2.16.0.html" rel="alternate" type="text/html" title="2.16.0 released and help wanted" /><published>2021-10-01T00:00:00+00:00</published><updated>2021-10-01T00:00:00+00:00</updated><id>https://hexchat.github.io/news/2.16.0</id><content type="html" xml:base="https://hexchat.github.io/news/2.16.0.html"><![CDATA[<p>There is a new major release out with some new features: Thanks to @SadieCat there
has been a number of new IRCv3 features and also strikethrough formatting support. Thanks
to @BakasuraRCE the flishlim plugin got a lot of love and now supports CBC mode. And fans
of Python scripts should be happy with a drastic reduction in memory usage with multiple scripts.</p>

<p>This release also comes with some bad news; The HexChat project has been undermaintained for quite
a while now. I’ve been involved with this project since I was a high school student but that
is long past and I simply don’t have the time to dedicate to it any longer. The Windows builds
in particular are very draining and in a poor state which has kept smaller releases from happening
more frequently. If anybody out there doesn’t mind building things on Windows or wants to help with
maintainance contact @TingPing on Libera.Chat.</p>

<h4 id="links">Links</h4>

<ul>
  <li><a href="https://hexchat.github.io/downloads.html">Downloads</a></li>
  <li><a href="https://hexchat.readthedocs.org/en/latest/changelog.html">Changelog</a></li>
  <li><a href="https://github.com/hexchat/hexchat/compare/v2.14.3...v2.16.0">Git log</a></li>
</ul>]]></content><author><name></name></author><category term="release" /><summary type="html"><![CDATA[There is a new major release out with some new features: Thanks to @SadieCat there has been a number of new IRCv3 features and also strikethrough formatting support. Thanks to @BakasuraRCE the flishlim plugin got a lot of love and now supports CBC mode. And fans of Python scripts should be happy with a drastic reduction in memory usage with multiple scripts.]]></summary></entry><entry><title type="html">#hexchat is now on Libera.Chat</title><link href="https://hexchat.github.io/news/hexchat-channel.html" rel="alternate" type="text/html" title="#hexchat is now on Libera.Chat" /><published>2021-05-26T00:00:00+00:00</published><updated>2021-05-26T00:00:00+00:00</updated><id>https://hexchat.github.io/news/hexchat-channel</id><content type="html" xml:base="https://hexchat.github.io/news/hexchat-channel.html"><![CDATA[<p>For those not in the know freenode has had new ownership forcefuly take over which lead to many of the staff making a new network, <a href="https://libera.chat">Libera.Chat</a>.</p>

<p>Soon after the split #hexchat was registered there with no immediate
plans of closing #hexchat on freenode, rather I hoped to set up a relay bot eventually. It actually wasn’t reasonable for us to close it because its the default recommended network on existing HexChat installations. However I did set the topic to say the channel is on Libera.Chat.</p>

<p>Today freenode decided to mass take ownership of every channel
with Libera.Chat in their topic and clear all set modes and flags
removing all moderators entirely. This move shows how little respect they have for projects and that the network is no longer a safe home for any FOSS project.</p>

<p>The only action that can possibly be taken is to move to a different network. You can find #hexchat here: ircs://irc.libera.chat/hexchat.</p>]]></content><author><name></name></author><summary type="html"><![CDATA[For those not in the know freenode has had new ownership forcefuly take over which lead to many of the staff making a new network, Libera.Chat.]]></summary></entry><entry><title type="html">2.14.2 released</title><link href="https://hexchat.github.io/news/2.14.2.html" rel="alternate" type="text/html" title="2.14.2 released" /><published>2018-08-29T00:00:00+00:00</published><updated>2018-08-29T00:00:00+00:00</updated><id>https://hexchat.github.io/news/2.14.2</id><content type="html" xml:base="https://hexchat.github.io/news/2.14.2.html"><![CDATA[<p>This is a new minor release. The main reason for this release is that there was a
crash found in a library we use, Pango, that could be triggered by posting text
in a channel so a new release was made for Windows.</p>

<p>If you use Flatpak or the Windows installer simply update and you will have the fix.
The Microsoft Store version is in review and will be released soon. If you use any
version on Linux and experience the crash please report this to your vendor
with these details: <a href="https://nvd.nist.gov/vuln/detail/CVE-2018-15120">https://nvd.nist.gov/vuln/detail/CVE-2018-15120</a></p>

<h4 id="links">Links</h4>

<ul>
  <li><a href="https://hexchat.github.io/downloads.html">Downloads</a></li>
  <li><a href="https://hexchat.readthedocs.org/en/latest/changelog.html">Changelog</a></li>
  <li><a href="https://github.com/hexchat/hexchat/compare/v2.14.0...v2.14.2">Git log</a></li>
</ul>]]></content><author><name></name></author><category term="release" /><summary type="html"><![CDATA[This is a new minor release. The main reason for this release is that there was a crash found in a library we use, Pango, that could be triggered by posting text in a channel so a new release was made for Windows.]]></summary></entry><entry><title type="html">2.14.0 released</title><link href="https://hexchat.github.io/news/2.14.0.html" rel="alternate" type="text/html" title="2.14.0 released" /><published>2018-03-12T00:00:00+00:00</published><updated>2018-03-12T00:00:00+00:00</updated><id>https://hexchat.github.io/news/2.14.0</id><content type="html" xml:base="https://hexchat.github.io/news/2.14.0.html"><![CDATA[<p>HexChat 2.14.0 has finally been released. The reason for the long delay since
the last release was that there was no longer a dedicated Windows maintainer
so the builds stagnated and needed a lot of love to get everything relatively
up to date. Overall though this is mostly a bug fix release with no major features
but there have been a few behind the scenes changes that are worth discussing.</p>

<h3 id="packages">Packages</h3>

<p>This is the first ever release where HexChat has 4 upstream installation methods
where in the past it only had Windows installers.</p>

<h4 id="microsoft-store">Microsoft Store</h4>

<p>As you may have noticed there is now a HexChat package on the Microsoft Store.
Microsoft now has a SKU of Windows (<a href="https://www.microsoft.com/en-us/windows/windows-10-s">10 S</a>)
that cannot install any applications outside of the store by default. This was
brought to my attention by a user requesting a store version so I tried it out
and everything largely went smoothly so I released it.</p>

<p>You may also notice it has a purchase option there; I took this opportunity to expose an easy way
for users to “donate” to the project but sadly Microsoft has no actual donation
option and it must be a purchase. Do not worry though as you can install it without paying
indefinitely with all features they just refer to it as a trial.</p>

<p>It is worth noting this version is not exactly identical to the normal release in that it doesn’t
ship Perl or Python support which I would like to investigate adding in the future. It also
(sometimes?) uses a more obscure configuration directory so it is a bit more inconvenient to
to fiddle with config files but that is more of a design fault of HexChat that it ever
requires the user interacting with that directory directly.</p>

<h4 id="flathub">Flathub</h4>

<p>In recent times there have also been a lot of buzz about solutions to making
portable binaries for Linux including <a href="https://flatpak.org">Flatpak</a>. These
are built and hosted on the <a href="https://flathub.org">Flathub</a> store. This is
my recommended method for installing on Linux as I can directly support it,
reproduce issues with it easily, and update it in minutes.</p>

<h4 id="snapcraft">Snapcraft</h4>

<p>The other big solution in this space is Snap. While I did make a HexChat
Snap I do not recommend it for most users as it has some bugs unique to it,
is less portable than and uses more space than Flatpak, and it is the more
complex and difficult format for me to support. It does have a single advantage
keeping it around which is that Ubuntu users can see this in the store out of the
box so it is the only real method to get up to date versions to these users
who may not know any better.</p>

<h3 id="build-system">Build system</h3>

<p>This release also converted the project from Autotools to <a href="http://mesonbuild.org">Meson</a>.
This decision will likely be controversial to some as the old method would run without
Python 3 but that isn’t a particularly crazy dependency IMO. The actual change here
that will impact older distros is that we now require a very recent <code class="language-plaintext highlighter-rouge">gettext</code> but
outside of that the transition seems to have gone very smoothly and is a pleasure
to work with compared to autotools and it can eventually replace hand maintained
Visual Studio projects on Windows.</p>

<h4 id="links">Links</h4>

<ul>
  <li><a href="https://hexchat.github.io/downloads.html">Downloads</a></li>
  <li><a href="https://hexchat.readthedocs.org/en/latest/changelog.html">Changelog</a></li>
  <li><a href="https://github.com/hexchat/hexchat/compare/v2.14.1...v2.14.2">Git log</a></li>
</ul>]]></content><author><name></name></author><category term="release" /><summary type="html"><![CDATA[HexChat 2.14.0 has finally been released. The reason for the long delay since the last release was that there was no longer a dedicated Windows maintainer so the builds stagnated and needed a lot of love to get everything relatively up to date. Overall though this is mostly a bug fix release with no major features but there have been a few behind the scenes changes that are worth discussing.]]></summary></entry><entry><title type="html">HexChat and antivirus</title><link href="https://hexchat.github.io/news/hexchat-and-antivirus.html" rel="alternate" type="text/html" title="HexChat and antivirus" /><published>2016-12-13T00:00:00+00:00</published><updated>2016-12-13T00:00:00+00:00</updated><id>https://hexchat.github.io/news/hexchat-and-antivirus</id><content type="html" xml:base="https://hexchat.github.io/news/hexchat-and-antivirus.html"><![CDATA[<p>A common issue when we make a new release is anti-virus software on Windows flips out and starts flagging it.
In this post I’ll try to discuss some of our release process, how to verify you are safe, and that there is
nothing we can actually do about that.</p>

<h4 id="our-release-process">Our release process</h4>

<p>HexChat tries to take security of releases seriously and I would like to think does a better job at it
than most small open source projects.</p>

<p>Firstly our main website is hosted on Github Pages over HTTPS only, it is only a landing page and
does not host any files. Our downloads are hosted by me (@tingping) personally on a <a href="https://m.do.co/c/4ba63fec1971">DigitialOcean VPS</a>.
This website is only accessible over HTTPS using modern security practices at <a href="https://dl.hexchat.net">dl.hexchat.net</a>.
Our Windows installer <a href="https://github.com/hexchat/hexchat/blob/master/win32/installer/hexchat.iss.tt">downloads files at runtime</a>
all over HTTPS only.</p>

<p>So at that point you should have gotten everything securely but we can go a step further to verify this. The source downloads
and the <a href="https://dl.tingping.se/flatpak/">Flatpak repo</a> for Linux are signed by <a href="https://keys.fedoraproject.org/pks/lookup?op=get&amp;search=0xB3C7CE210DE76DFC">my GPG key</a>.
All Windows installers are built, signed, and uploaded by @tomek. We two are the only people you should trust
any official HexChat download from.</p>

<p>The source to <a href="https://github.com/hexchat/hexchat">HexChat</a> is of course open but also <a href="https://github.com/hexchat/gtk-win32">our build script and all of
the source to build our Gtk stack</a> on Windows is open source and can be
<a href="http://hexchat.readthedocs.io/en/latest/building.html">built yourself</a>. If anybody finds anything about this that could be
improved or might be an issue feel free to contact us on IRC.</p>

<h4 id="verifying-the-installer">Verifying the installer</h4>

<ol>
  <li>Download the HexChat installer</li>
  <li>
    <p>Run it and you should see this including the Publisher line:</p>

    <p><img src="https://i.imgur.com/CIQ7PnC.png" alt="" /></p>
  </li>
  <li>
    <p>Click on the publisher name to see more information:</p>

    <p><img src="https://i.imgur.com/DLUU2ya.png" alt="" /></p>
  </li>
  <li>
    <p>And lastly you can click <em>View Certificate</em> to see exact details:</p>

    <p><img src="https://i.imgur.com/FI325dx.png" alt="" /></p>
  </li>
  <li>
    <p>The exact public key to compare against:</p>

    <p><code class="language-plaintext highlighter-rouge">30 82 01 0a 02 82 01 01 00 a4 44 55 27 b5 f1 64 bf 11 09 15 38 aa 5f b2 01 72 06 a2 db 95 79 0f 17 d1 62 29 4c 08 f1 e1 e0 dd 65 da f8 b9 db 1b c5 fa 49 93 e4 9e 3b d9 56 03 cf 1e d8 a4 6a 27 3b 9b 21 50 86 a8 1a 2a c9 3b c5 77 b0 b6 53 ad 81 8a 39 e5 20 bc 5c f9 d4 00 0d e1 d2 47 a0 ca 7b 69 96 61 24 56 1d bd bd 42 37 72 81 27 8e 8c 9a f4 07 84 24 fc b5 a2 51 7f 24 6a 8b 5b 2b 0b fe 79 a8 fa 73 53 c7 f6 d3 ae 6a 08 46 10 37 37 f1 45 80 39 18 86 39 9c 0d 88 ef 57 cc 6c 50 b0 40 4a a2 b1 fb c4 e5 21 45 2b 11 33 69 62 98 5b 8a 57 0c 7d 43 a1 3a 6c e4 e7 95 b4 df 8e 1d c3 cd b4 58 75 62 f5 4a 55 0a 94 05 1f 92 54 31 18 17 08 99 10 0a 88 eb 41 02 2c 25 0b eb 2d b5 e2 86 ac 59 ae f2 d2 4c 3d 7c 43 3d e4 83 00 c0 a5 fb f9 a9 25 cc 1c a6 d8 2b b3 02 55 75 29 cf 28 89 91 91 7e 99 56 2d e1 b7 02 03 01 00 01</code></p>
  </li>
</ol>

<p>Now that the installer is verified does that mean it is safe? Well the truth is that this is impossible to assert.
You must have impllict trust that @tomek and I are not malicous. There is also a very small chance that
a third party whos software we use is actually malicious but as mentioned above you can verify all software
we use.</p>

<h4 id="why-is-it-flagged">Why is it flagged?</h4>

<p>We don’t write your AV software so we don’t actually know. There are plenty of assumptions that can be made though;
For one thing IRC has historically been used in a lot of malware and since [He]xChat is open source it is plausible some
of that very code was used or they just flag the IRC protocol entirely outside of whitelisted applications.</p>

<p>Another common reason HexChat is flagged is because other users can write arbitrary things in chat that we log. A
tactic some spammers use is to print malicious HTML in chat; This is absolutely harmless to us as we do not parse HTML
or execute JavaScript at all but it will make your AV angry.</p>

<h4 id="what-can-be-done">What can be done?</h4>

<p>The only course of action is to whitelist HexChat for now and contact support for your AV.
This happens every release and usually a few weeks after they will add it to the whitelist. You might suggest that
we contact every provider ourselves but this is a task that does not scale up nor is it our problem. Hopefully we
can make you feel a little more confident that it is probably not actually malware though.</p>]]></content><author><name></name></author><category term="blog" /><summary type="html"><![CDATA[A common issue when we make a new release is anti-virus software on Windows flips out and starts flagging it. In this post I’ll try to discuss some of our release process, how to verify you are safe, and that there is nothing we can actually do about that.]]></summary></entry><entry><title type="html">2.12.2 released</title><link href="https://hexchat.github.io/news/2.12.2.html" rel="alternate" type="text/html" title="2.12.2 released" /><published>2016-10-08T00:00:00+00:00</published><updated>2016-10-08T00:00:00+00:00</updated><id>https://hexchat.github.io/news/2.12.2</id><content type="html" xml:base="https://hexchat.github.io/news/2.12.2.html"><![CDATA[<p>Yet another bug fix release in the 2.12 series has been uploaded. This one is fairly uneventful so I
will keep it short.</p>

<h4 id="fishlim">Fishlim</h4>

<p>The fish plugin did get some love this cycle fixing a few bugs and implementing key exchange (<code class="language-plaintext highlighter-rouge">/keyx</code>) which
allows two clients to negotiate a more secure password. It also finally handles basic things like <code class="language-plaintext highlighter-rouge">/me</code> working
so enjoy.</p>

<h4 id="plugin-api">Plugin API</h4>

<p>There were also a few fixes and additions for any addon creators:</p>

<ul>
  <li>The channel list has a “<em>chanmodes</em>” entry
and you can see a use for it in my <a href="https://github.com/TingPing/plugins/pull/14">buffextras.lua script</a>.</li>
  <li>The <code class="language-plaintext highlighter-rouge">hexchat_pluginpref_get_int()</code> API returned <em>0</em> or <em>-1</em> on failure inconsistent with the docs so that was
fixed which also fixed the lua plugin.</li>
  <li>If you ate an event that causes a highlight the UI used to still change which was fixed allowing <a href="https://github.com/TingPing/plugins/blob/master/HexChat/masshighlightignore.lua">nohighlight scripts</a>
to be greatly simplified.</li>
  <li>There have been longstanding issues with hooking “<em>Close Context</em>” where
you could very easily trigger a crash; These have not been fully fixed and may never be but the common
cases have been handled.</li>
</ul>

<h4 id="links">Links</h4>

<ul>
  <li><a href="https://hexchat.github.io/downloads.html">Downloads</a></li>
  <li><a href="https://hexchat.readthedocs.org/en/latest/changelog.html">Changelog</a></li>
  <li><a href="https://github.com/hexchat/hexchat/compare/v2.12.1...v2.12.2">Git log</a></li>
</ul>]]></content><author><name></name></author><category term="release" /><summary type="html"><![CDATA[Yet another bug fix release in the 2.12 series has been uploaded. This one is fairly uneventful so I will keep it short.]]></summary></entry><entry><title type="html">2.12.1 released</title><link href="https://hexchat.github.io/news/2.12.1.html" rel="alternate" type="text/html" title="2.12.1 released" /><published>2016-05-01T00:00:00+00:00</published><updated>2016-05-01T00:00:00+00:00</updated><id>https://hexchat.github.io/news/2.12.1</id><content type="html" xml:base="https://hexchat.github.io/news/2.12.1.html"><![CDATA[<p>A new bug fix release is out, mostly minor fixes which you can see in the changelog.
There is one new feature though that I am rather excited about; There are new Lua
bindings for scripts thanks to @mniip. If you are a scripter I’ll go more into detail on what makes
this great…</p>

<h4 id="links">Links</h4>

<ul>
  <li><a href="https://hexchat.github.io/downloads.html">Downloads</a></li>
  <li><a href="https://hexchat.readthedocs.org/en/latest/changelog.html">Changelog</a></li>
  <li><a href="https://github.com/hexchat/hexchat/compare/v2.12.0...v2.12.1">Git log</a></li>
</ul>

<h2 id="lua">Lua</h2>

<p>Just some quick background information: the plugin supports lua[jit] 5.1-5.3, is shipped on all
platforms, and the documentation can be found <a href="https://hexchat.readthedocs.org/en/latest/script_lua.html">here</a>.</p>

<p>The first thing that really stands out when switching from Python scripts to Lua ones is the resource usage.
I have around 10 scripts loaded at any given time and the python plugin alone would use around 60MB of ram,
when I rewrote every script in Lua that number decreased to about 4MB. On top of that luajit is an extremely
fast interpreter though scripts are rarely CPU bound.</p>

<p>Another useful feature is that Lua is extremely portable, this means that Windows users do not need
to deal with the hassle of downloading a giant Python installer that ends up broken, requires rebooting,
or is incompatable with a script. The Windows installer will include all of Lua itself which is effectively
a 1MB single binary and will be installed by default so scripters can be confident users have it.</p>

<p>Lastly and my favorite feature is the ability to use a library called <a href="https://github.com/pavouk/lgi">lgi</a>.
<a href="https://wiki.gnome.org/Projects/GObjectIntrospection">GObject-Introspection</a> is a technology that allows
information about C libraries to be used externally (usually from other languages). This means that
scripts can integrate with the same libraries HexChat uses itself such as GLib and Gtk. This library is
small enough that we will be bundling it on Windows which means for the first time all Windows users
can have scripts that can easily modify the UI or integrate with the mainloop.</p>

<p>Here are some basic examples that should give you an idea of more advanced things you can do with this
ability:</p>

<figure class="highlight"><pre><code class="language-lua" data-lang="lua"><span class="kd">local</span> <span class="n">lgi</span> <span class="o">=</span> <span class="nb">require</span><span class="p">(</span><span class="s1">'lgi'</span><span class="p">)</span>
<span class="kd">local</span> <span class="n">GLib</span> <span class="o">=</span> <span class="n">lgi</span><span class="p">.</span><span class="n">require</span><span class="p">(</span><span class="s1">'GLib'</span><span class="p">)</span>
<span class="kd">local</span> <span class="n">Gio</span> <span class="o">=</span> <span class="n">lgi</span><span class="p">.</span><span class="n">require</span><span class="p">(</span><span class="s1">'Gio'</span><span class="p">)</span>

<span class="n">hexchat</span><span class="p">.</span><span class="n">register</span><span class="p">(</span><span class="s1">'FileTest'</span><span class="p">,</span> <span class="s1">'1'</span><span class="p">,</span> <span class="s1">'Opens a file async'</span><span class="p">)</span>

<span class="cm">--[[ A common problem in scripts is that they have to do blocking IO
     operations and in a graphical application like HexChat this means
     locking up the client. To avoid this GLib provides many asynchronous
     APIs that use threads and the mainloop to avoid blocking. This is just
     an example of opening a large file without blocking. ]]</span><span class="c1">--</span>

<span class="n">hexchat</span><span class="p">.</span><span class="n">hook_command</span><span class="p">(</span><span class="s1">'readfile'</span><span class="p">,</span> <span class="k">function</span> <span class="p">(</span><span class="n">word</span><span class="p">,</span> <span class="n">word_eol</span><span class="p">)</span>
	<span class="k">if</span> <span class="o">#</span><span class="n">word</span> <span class="o">&lt;</span> <span class="mi">2</span> <span class="k">then</span>
		<span class="nb">print</span><span class="p">(</span><span class="s1">'Need a file name'</span><span class="p">)</span>
		<span class="k">return</span> <span class="n">hexchat</span><span class="p">.</span><span class="n">EAT_ALL</span>
	<span class="k">elseif</span> <span class="ow">not</span> <span class="n">GLib</span><span class="p">.</span><span class="n">path_is_absolute</span><span class="p">(</span><span class="n">word</span><span class="p">[</span><span class="mi">2</span><span class="p">])</span> <span class="k">then</span>
		<span class="nb">print</span><span class="p">(</span><span class="s1">'Need an absolute path'</span><span class="p">)</span>
		<span class="k">return</span> <span class="n">hexchat</span><span class="p">.</span><span class="n">EAT_ALL</span>
	<span class="k">end</span>

	<span class="kd">local</span> <span class="n">file</span> <span class="o">=</span> <span class="n">Gio</span><span class="p">.</span><span class="n">File</span><span class="p">.</span><span class="n">new_for_path</span><span class="p">(</span><span class="n">word</span><span class="p">[</span><span class="mi">2</span><span class="p">])</span>
	<span class="kd">local</span> <span class="n">original_context</span> <span class="o">=</span> <span class="n">hexchat</span><span class="p">.</span><span class="n">props</span><span class="p">.</span><span class="n">context</span>

	<span class="c1">-- This starts another thread and calls the function when it is finished</span>
	<span class="n">file</span><span class="p">:</span><span class="n">load_contents_async</span><span class="p">(</span><span class="kc">nil</span><span class="p">,</span> <span class="k">function</span> <span class="p">(</span><span class="n">file</span><span class="p">,</span> <span class="n">result</span><span class="p">)</span>
		<span class="kd">local</span> <span class="n">contents</span><span class="p">,</span> <span class="n">etag</span><span class="p">,</span> <span class="n">err</span> <span class="o">=</span> <span class="n">file</span><span class="p">:</span><span class="n">load_contents_finish</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>

		<span class="c1">-- We need to manually reset the context as it may have changed</span>
		<span class="k">if</span> <span class="ow">not</span> <span class="n">original_context</span><span class="p">:</span><span class="n">set</span><span class="p">()</span> <span class="k">then</span>
			<span class="n">hexchat</span><span class="p">.</span><span class="n">find_context</span><span class="p">():</span><span class="n">set</span><span class="p">()</span> <span class="c1">-- front</span>
			<span class="nb">print</span><span class="p">(</span><span class="s1">'Original context lost'</span><span class="p">)</span>
		<span class="k">end</span>

		<span class="k">if</span> <span class="n">err</span> <span class="k">then</span>
			<span class="nb">print</span><span class="p">(</span><span class="s1">'Error reading file: '</span> <span class="o">..</span> <span class="nb">tostring</span><span class="p">(</span><span class="n">err</span><span class="p">))</span>
		<span class="k">else</span>
			<span class="nb">print</span><span class="p">(</span><span class="s1">'File contained: '</span> <span class="o">..</span> <span class="o">#</span><span class="n">contents</span> <span class="o">..</span> <span class="s1">' bytes'</span><span class="p">)</span>
		<span class="k">end</span>
	<span class="k">end</span><span class="p">)</span>

	<span class="k">return</span> <span class="n">hexchat</span><span class="p">.</span><span class="n">EAT_ALL</span>
<span class="k">end</span><span class="p">)</span></code></pre></figure>

<figure class="highlight"><pre><code class="language-lua" data-lang="lua"><span class="kd">local</span> <span class="n">lgi</span> <span class="o">=</span> <span class="nb">require</span><span class="p">(</span><span class="s1">'lgi'</span><span class="p">)</span>
<span class="kd">local</span> <span class="n">Gtk</span> <span class="o">=</span> <span class="n">lgi</span><span class="p">.</span><span class="n">require</span><span class="p">(</span><span class="s1">'Gtk'</span><span class="p">,</span> <span class="s1">'2.0'</span><span class="p">)</span>

<span class="n">hexchat</span><span class="p">.</span><span class="n">register</span><span class="p">(</span><span class="s1">'WinTile'</span><span class="p">,</span> <span class="s1">'1'</span><span class="p">,</span> <span class="s1">'Tile the window left/right'</span><span class="p">)</span>

<span class="cm">--[[ HexChat being a graphical application many times you want scripts
     to modify the UI, this is just a simple script that takes a reference
     to the main window and modifies it in a simple way (moving and resizing).
     In practice you can do any operation you would like including spawning
     new windows and modifying widgets. ]]</span><span class="c1">--</span>

<span class="n">hexchat</span><span class="p">.</span><span class="n">hook_command</span><span class="p">(</span><span class="s1">'tile'</span><span class="p">,</span> <span class="k">function</span> <span class="p">(</span><span class="n">word</span><span class="p">,</span> <span class="n">word_eol</span><span class="p">)</span>
	<span class="k">if</span> <span class="o">#</span><span class="n">word</span> <span class="o">&lt;</span> <span class="mi">2</span> <span class="k">then</span>
		<span class="nb">print</span><span class="p">(</span><span class="s1">'Need side, left, right, or reset'</span><span class="p">)</span>
		<span class="k">return</span> <span class="n">hexchat</span><span class="p">.</span><span class="n">EAT_ALL</span>
	<span class="k">end</span>
	<span class="kd">local</span> <span class="n">side</span> <span class="o">=</span> <span class="n">word</span><span class="p">[</span><span class="mi">2</span><span class="p">]:</span><span class="n">lower</span><span class="p">()</span>
	<span class="kd">local</span> <span class="n">window</span> <span class="o">=</span> <span class="n">Gtk</span><span class="p">.</span><span class="n">Window</span><span class="p">(</span><span class="n">hexchat</span><span class="p">.</span><span class="n">get_info</span><span class="p">(</span><span class="s1">'gtkwin_ptr'</span><span class="p">))</span>

	<span class="k">if</span> <span class="n">side</span> <span class="o">==</span> <span class="s1">'reset'</span> <span class="k">then</span>
		<span class="kd">local</span> <span class="n">width</span><span class="p">,</span> <span class="n">height</span> <span class="o">=</span> <span class="n">hexchat</span><span class="p">.</span><span class="n">prefs</span><span class="p">[</span><span class="s1">'gui_win_width'</span><span class="p">],</span> <span class="n">hexchat</span><span class="p">.</span><span class="n">prefs</span><span class="p">[</span><span class="s1">'gui_win_height'</span><span class="p">]</span>
		<span class="kd">local</span> <span class="n">x</span><span class="p">,</span> <span class="n">y</span> <span class="o">=</span> <span class="n">hexchat</span><span class="p">.</span><span class="n">prefs</span><span class="p">[</span><span class="s1">'gui_win_left'</span><span class="p">],</span> <span class="n">hexchat</span><span class="p">.</span><span class="n">prefs</span><span class="p">[</span><span class="s1">'gui_win_top'</span><span class="p">]</span>

		<span class="n">window</span><span class="p">:</span><span class="n">resize</span><span class="p">(</span><span class="n">width</span><span class="p">,</span> <span class="n">height</span><span class="p">)</span>
		<span class="n">window</span><span class="p">:</span><span class="n">move</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span>

		<span class="n">hexchat</span><span class="p">.</span><span class="n">command</span><span class="p">(</span><span class="s1">'set -quiet gui_win_save on'</span><span class="p">)</span>
	<span class="k">elseif</span> <span class="n">side</span> <span class="o">==</span> <span class="s1">'left'</span> <span class="ow">or</span> <span class="n">side</span> <span class="o">==</span> <span class="s1">'right'</span> <span class="k">then</span>
		<span class="kd">local</span> <span class="n">screen</span> <span class="o">=</span> <span class="n">window</span><span class="p">:</span><span class="n">get_screen</span><span class="p">()</span>
		<span class="kd">local</span> <span class="n">width</span><span class="p">,</span> <span class="n">height</span> <span class="o">=</span> <span class="n">screen</span><span class="p">:</span><span class="n">get_width</span><span class="p">(),</span> <span class="n">screen</span><span class="p">:</span><span class="n">get_height</span><span class="p">()</span>

		<span class="n">hexchat</span><span class="p">.</span><span class="n">command</span><span class="p">(</span><span class="s1">'set -quiet gui_win_save off'</span><span class="p">)</span> <span class="c1">-- We don't want to save the temporary size</span>

		<span class="n">window</span><span class="p">:</span><span class="n">resize</span><span class="p">(</span><span class="n">width</span> <span class="o">/</span> <span class="mi">2</span><span class="p">,</span> <span class="n">height</span><span class="p">)</span>

		<span class="k">if</span> <span class="n">side</span> <span class="o">==</span> <span class="s1">'left'</span> <span class="k">then</span>
			<span class="n">window</span><span class="p">:</span><span class="n">move</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
		<span class="k">else</span>
			<span class="n">window</span><span class="p">:</span><span class="n">move</span><span class="p">(</span><span class="n">width</span> <span class="o">/</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
		<span class="k">end</span>
	<span class="k">else</span>
		<span class="nb">print</span><span class="p">(</span><span class="s1">'Invalid side. Need left, right, or reset'</span><span class="p">)</span>
	<span class="k">end</span>

	<span class="k">return</span> <span class="n">hexchat</span><span class="p">.</span><span class="n">EAT_ALL</span>
<span class="k">end</span><span class="p">)</span></code></pre></figure>]]></content><author><name></name></author><category term="release" /><summary type="html"><![CDATA[A new bug fix release is out, mostly minor fixes which you can see in the changelog. There is one new feature though that I am rather excited about; There are new Lua bindings for scripts thanks to @mniip. If you are a scripter I’ll go more into detail on what makes this great…]]></summary></entry><entry><title type="html">2.12.0 released</title><link href="https://hexchat.github.io/news/2.12.0.html" rel="alternate" type="text/html" title="2.12.0 released" /><published>2016-03-12T00:00:00+00:00</published><updated>2016-03-12T00:00:00+00:00</updated><id>https://hexchat.github.io/news/2.12.0</id><content type="html" xml:base="https://hexchat.github.io/news/2.12.0.html"><![CDATA[<p>A new major release is finally out after a very long delay. I won’t get into excuses
but this does have a fairly sizable changelog. Having been such a long release window
there were a lot of areas that got some love. As always there have been a massive
number of bug fixes that won’t be mentioned here.</p>

<h4 id="links">Links</h4>

<ul>
  <li><a href="https://hexchat.github.io/downloads.html">Downloads</a></li>
  <li><a href="https://hexchat.readthedocs.org/en/latest/changelog.html">Changelog</a></li>
  <li><a href="https://github.com/hexchat/hexchat/compare/v2.10.2...v2.12.0">Git log</a></li>
</ul>

<h2 id="platform-integration">Platform Integration</h2>

<p>Firstly there has been a lot of improvement in making various features equal across
platforms.</p>

<h3 id="notifications">Notifications</h3>

<p>Since Windows 8.1 there has been notification support built into Windows and as of this
release we finally support them natively thanks to @leeter. The same treatment has also
been done on OSX so we now support notifications on all platforms.</p>

<p><img src="https://i.imgur.com/wxbYnQt.png" alt="HexChat Windows 8 toast" /></p>

<h3 id="spell-check">Spell Check</h3>

<p>Windows 8 also added native support for spell checking without installing any external
dictionaries so we can now make use of that.</p>

<h2 id="plugins">Plugins</h2>

<p>Secondly a number of plugins were completely rewritten from scratch fixing numerous
problems, adding requested features, and improving cross platform support.</p>

<h3 id="sysinfo">Sysinfo</h3>

<p>The sysinfo plugin got a major rewrite making the plugin unified across all platforms.
This added initial support for OSX, added a lot of information to the Windows plugin
such as storage space and multiple gpus, and cleaned up the formatting.</p>

<p><img src="https://i.imgur.com/pxN6iYf.png" alt="HexChat sysinfo plugin" /></p>

<h3 id="identd">Identd</h3>

<p>The identd feature has been rewritten from scratch to be cross platform as well as
fixing numerous issues and adding the abililty to customize the port. This can be
configured in <em>Settings &gt; Preferences &gt; Identd</em>.</p>

<h3 id="updater">Updater</h3>

<p>The update plugin has always been rather basic so with this release we have started
using <a href="https://winsparkle.org/">WinSparkle</a> for updates which allow us to show a graphical update dialog
showing the changelog.</p>

<p><img src="https://i.imgur.com/JBuTDQt.png" alt="HexChat update plugin" /></p>

<h2 id="ircv32">IRCv3.2</h2>

<p>A new round of specs from IRCv3 released this cycle and we have added support for a few.
The most interesting of these at the moment is <a href="http://ircv3.net/specs/extensions/cap-notify-3.2.html">cap-notify</a>.
This allows for the server to dynamically add and remove new capabilities which is heavily used in an upcoming
<a href="http://wiki.znc.in/ZNC">ZNC</a> release to support various capabillities exposed by networks.</p>

<h2 id="encoding-changes">Encoding Changes</h2>

<p>This will be a somewhat more contraversal change but this release of HexChat has made major
changes to how encodings are handled. Previously if an invalid encoded message was
recieved the client would always attempt to decode it as ISO-8859-1 which while possibly
working would often just result in corrupted and incorrect text, now it is replaced with “�”
as per the standard.</p>

<p>On top of that the <a href="http://xchat.org/encoding/">“IRC” encoding</a> has been
entirely removed; This was a hybrid encoding that would try to support both CP1252 and UTF-8.
HexChat now pushes everybody to use normal UTF-8, this might be a problem in some communities
but in the long term this is a better solution that all clients can support.</p>]]></content><author><name></name></author><category term="release" /><summary type="html"><![CDATA[A new major release is finally out after a very long delay. I won’t get into excuses but this does have a fairly sizable changelog. Having been such a long release window there were a lot of areas that got some love. As always there have been a massive number of bug fixes that won’t be mentioned here.]]></summary></entry><entry><title type="html">2.10.2 released</title><link href="https://hexchat.github.io/news/2.10.2.html" rel="alternate" type="text/html" title="2.10.2 released" /><published>2014-11-25T00:00:00+00:00</published><updated>2014-11-25T00:00:00+00:00</updated><id>https://hexchat.github.io/news/2.10.2</id><content type="html" xml:base="https://hexchat.github.io/news/2.10.2.html"><![CDATA[<p>Yet another bug-fix release for 2.10.x has been released. The list of bugs fixed is not particuarly
long or interesting so I’ll save those for the Changelog below but this release cycle does come with 
some much needed security improvements.</p>

<p>Historically XChat has not used ssl very securely; The last release of it used terrible defaults such
as forcing SSLv3 (which is known insecure) and does not take any effort to verify the cert is for the
correct address you connected to. With this HexChat release this has finally changed; Now only TLSv1.0+
are accepted and all hostnames are verified as well as a few other more secure options. The <em>next</em>
release will hopefully take this a step further including features such as supporting <a href="http://en.wikipedia.org/wiki/Transport_Layer_Security#Certificate_pinning">certificate pinning</a>.</p>

<p>Outside of HexChat itself the project has taken measures to ensure our releases are secure.
Recently I moved <a href="https://dl.hexchat.net">dl.hexchat.net</a>, which hosts all project related downloads,
entirely over to https. Since 2.10.0 all source releases have been signed by <a href="https://keys.fedoraproject.org/pks/lookup?search=tingping">my personal gpg key</a> and the Windows installers are all
now signed by <a href="https://github.com/tomek">tomek</a>.</p>

<h4 id="links">Links</h4>

<ul>
  <li><a href="https://hexchat.github.io/downloads.html">Downloads</a></li>
  <li><a href="https://hexchat.readthedocs.org/en/latest/changelog.html">Changelog</a></li>
  <li><a href="https://github.com/hexchat/hexchat/compare/v2.10.1...v2.10.2">Git log</a></li>
</ul>]]></content><author><name></name></author><category term="release" /><category term="security" /><summary type="html"><![CDATA[Yet another bug-fix release for 2.10.x has been released. The list of bugs fixed is not particuarly long or interesting so I’ll save those for the Changelog below but this release cycle does come with some much needed security improvements.]]></summary></entry></feed>