all repos — dotfiles @ 80e2a806c30ffd3e1f61d032c2276e4e86583f04

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", "")