Created
January 30, 2015 02:34
-
-
Save dcat/8dd0c33ad30abb059352 to your computer and use it in GitHub Desktop.
quote.pl for weechat
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 quote_cb { | |
my ($data, $mod, $mod_data, $msg) = @_; | |
if ($msg =~ /^>/) { | |
$msg="\x03" . int(rand(15)) . $msg; | |
} | |
return $msg; | |
} | |
weechat::register("quote.pl", "dcat", "1.1", "beerware", "quote", "", ""); | |
weechat::hook_modifier("input_text_for_buffer", "quote_cb", ""); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment