all repos — dotfiles @ 7880dcac7e7591284b30618910093981a5b14e5b

my *nix dotfiles

weechat/gt.py (view raw)

 1import weechat, re
 2# modifies the string about to be sent to the IRC server
 3# thus, not interfering with non-IRC buffer text like wee-slack
 4
 5weechat.register(
 6    "gt.py", "icyphox", "1.0", "MIT", "greentexting like the hacker called 4chan", "", ""
 7)
 8
 9def greentext_cb(data, modifier, modifier_data, string):
10    return re.sub(r">(?! )", "\x033>", string)
11
12weechat.hook_modifier("irc_out1_privmsg", "greentext_cb", "")