Skip to content

Instantly share code, notes, and snippets.

@dcat
Last active August 29, 2015 14:07
Show Gist options
  • Save dcat/44194c30c41c92132699 to your computer and use it in GitHub Desktop.
Save dcat/44194c30c41c92132699 to your computer and use it in GitHub Desktop.
Irssi greentext.pl
#!/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