Created
June 28, 2013 12:02
-
-
Save tusbar/5884198 to your computer and use it in GitHub Desktop.
ALL CAPS EVERYTHING
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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