Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- __module_name__ = "greentexter"
- __module_version__ = "0.1"
- __module_description__ = "Colours each message starting with a > green"
- import xchat
- COLOR = "3"
- def greentext(word, word_eol, userdata):
- text = word_eol[0]
- ctx = xchat.get_context()
- server = ctx.get_info("server")
- channel = ctx.get_info("channel")
- nick = xchat.get_info("nick")
- if text.strip()[0] == ">":
- text = "\3" + COLOR + text
- xchat.command("PRIVMSG %s :%s" % (channel, text))
- xchat.emit_print("Your Message", nick, text)
- return xchat.EAT_ALL
- xchat.hook_command("", greentext)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement