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