viewing paste Unknown #48336 | Text

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
import hexchat
import re
 
__module_name__ = ">greentext"
__module_version__ = "1.0.1.5"
__module_description__ = "adds 4chan style greentext to hexchat"
 
 
 
def greentext(word, word_eol, userdata):
        text = word_eol[0]
 
        match = re.search(">[^ ]", text)
        if match != None :
                        idx = match.start()
                        text = text[:idx] + "\00303>" + text[idx+1:]
       
        hexchat.command(" ".join(["msg", hexchat.get_info("channel"), text]))
        return hexchat.EAT_ALL
 
 
hexchat.hook_command("", greentext)
 
#and text.index(">") == 0
Viewed 545 times, submitted by unknown.