irssi, bitlbee, jabber, openfire and ASCII Control Characters

August 7th, 2013

I’ve recently been hit by an issue where irssi (and bitlbee, and openfire) have been leaking non-printable ASCII Control characters to a Jabber chat room.

This has been triggering an XML Parse Error in Pidgin clients, which causes them to disconnect and reconnect to the Jabber server. This is especially annoying when the server replays chat history to clients. You end up with all Pidgin clients unable to stay connected to your Jabber server. Oops.

I’ve written a quick hacky script for irssi that filters out non-ASCII characters, so they’re not sent to the server and that warns you that you’re doing somethig wrong:

use Irssi;
use strict;
 
use vars qw($VERSION %IRSSI);
 
$VERSION = "0.1";
%IRSSI = (
    authors     => 'Andy Millar',
    name        => 'filter_charset',
    description => 'Filter Outbount Charset',
    license     => 'none',
    url         => 'none',
);
 
 
Irssi::signal_add_first 'send text', 'filter_charset';
 
sub filter_charset {
  my ($text, $server, $win_item) = @_;
  if ($text =~ m/[^[:print:]]/) {
    Irssi::active_win->print("Cannot send line - invalid characters: ##$text##", MSGLEVEL_CLIENTCRAP);
    Irssi::signal_stop();
  }
}

Put this in ~/.irssi/scripts/filter_charset.pl and then /load filter_charset.pl.

Monkey in the spring sun…

February 20th, 2012

Monkey in spring sun on 19th February 2012

Monkey after the snow…

February 20th, 2012

Monkey after snow on 12th February 2012

Logon failure: the user has not been granted the requested logon type at this computer

November 12th, 2011

If you get the error:

Logon failure: the user has not been granted the requested logon type at this computer

When trying to add a computer to a domain or trying to map a network drive, then chances are someone has been stupid.

Check rsop to make sure that the following policy hasn’t been changed to anything silly:

Administrative Tools
> Local Security Settings
>> Local Policies
>>> User Rights Assignment
>>>> Access this computer from the network

This should probably be the list that is suggested in the explanation for this policy and at least include Authenticated Users.

Bacon Explosion!

June 29th, 2011

I was linked to an entertaining recipe on The Bacon Explosion today and couldn’t resist trying it. I figured I should take photographic evidence of the process as proof, so here it is…

The ingredients:

You need an insane amount of:

  • Streaky Bacon
  • Sausage Meat
  • BBQ Sauce
  • BBQ Rub/Powder

Firstly you make a lattice of bacon, you’re supposed to make it as tight as you can.

You should end up with something looking rather close to:

Now sprinkle the lattice with BBQ Rub/Powder:

Then squash your sausage meat ontop:

Now liberally apply chopped cooked bacon:

Cover with copious amounts of BBQ Sauce:

And roll up into a sausage, leaving the lattice behind:

Pinch the ends a little to keep all the goodness in:

Now roll the lattice around the sausage meat, and place the seam at the bottom. Cover liberally in BBQ Rub/Powder:

Now place in a pre-heated oven at 180c for around 75 minutes, I used a glass dish to keep the fat and juices in:

Around half way through the cooking it looked like:

And now it’s done, look at all that bacon juice:

Take out of the cooking container and place on a chopping board to cut:

And now display pure bacon perfection:

The recipe is shamelessly stolen from BBQ Addicts

Orange 3G with Fedora 13

June 27th, 2011

Orange’s 3G internet dongle is a HUAWEI E1752.

By default, this doesn’t appear to be detected by NetworkManager with Fedora 13.

This is because it requires usb_modeswitch to work. Installing the usb_modeswitch package fixed it and the dongle was picked up by NetworkManager.

Is Bitcoin a terrorist invention?

May 16th, 2011

Bitcoin (http://www.bitcoin.org/) is an anonymous peer-to-peer currency with no central controlling authority…

Seems ideal for money laundering and supplying the likes of Al-Qaeda with funds.