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