Skip to content

Instantly share code, notes, and snippets.

@tusbar
Created June 28, 2013 12:02
Show Gist options
  • Save tusbar/5884198 to your computer and use it in GitHub Desktop.
Save tusbar/5884198 to your computer and use it in GitHub Desktop.
ALL CAPS EVERYTHING
use strict;
use vars qw($VERSION %IRSSI);
use Irssi;
use utf8;
$VERSION = '1.0';
%IRSSI = (
authors=> 'tusbar',
contact=> 'b@pk.am',
name=> 'allcaps',
description=> 'ALL CAPS EVERYTHING',
license=> 'Public Domain',
url=> 'http://pk.am'
);
sub message {
my ($server, $msg, $target) = @_;
return unless (defined $server && defined $target && defined $msg);
utf8::decode($msg);
$msg = uc($msg);
utf8::encode($msg);
Irssi::signal_stop();
Irssi::signal_remove("message own_public", "message");
Irssi::signal_emit("message own_public", $server, $msg, $target);
Irssi::signal_add_first("message own_public", "message");
}
Irssi::signal_add_first('message own_public', 'message');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment