all repos — dotfiles @ 9d4daac1b851d9a89b0a429277c3d4d64331812d

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