Last active
August 29, 2015 14:07
-
-
Save dcat/90bbfe22a7df1d7bacb0 to your computer and use it in GitHub Desktop.
WeeChat greentext.pl
This file contains hidden or 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 strict; | |
use utf8; | |
sub greentext_cb { | |
my ($data, $mod, $mod_data, $msg) = @_; | |
if ($msg =~ /^>/) { | |
$msg="\x033" . $msg; | |
} | |
return $msg; | |
} | |
weechat::register("greentext.pl", "dcat,kori", "1.0", "beerware", "greentext", "", ""); | |
weechat::hook_modifier("input_text_for_buffer", "greentext_cb", ""); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment