Last active
August 29, 2015 14:07
-
-
Save dcat/44194c30c41c92132699 to your computer and use it in GitHub Desktop.
Irssi greentext.pl
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
#!/usr/bin/env perl -w | |
use vars qw($VERSION %IRSSI); | |
$VERSION = "1"; | |
%IRSSI = ( | |
authors => "dcat,kori", | |
name => "greentext.pl", | |
license => "beerware" | |
); | |
sub greentext () { | |
my ($text, $server, $witem) =@_; | |
if ($text =~ /^>/) { | |
$text = "\0033" . $text; | |
} | |
Irssi::signal_continue($text, $server, $witem); | |
return 0; | |
} | |
Irssi::signal_add_first("send text", "greentext"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment