Skip to content

Instantly share code, notes, and snippets.

@Treevs
Created May 6, 2015 23:03
Show Gist options
  • Save Treevs/ff95009c5a455b3c8e3c to your computer and use it in GitHub Desktop.
Save Treevs/ff95009c5a455b3c8e3c to your computer and use it in GitHub Desktop.
Hexchat script test
__module_name__ = "test"
__module_version__ = "1.0"
__module_description__ = "Python module test"
import hexchat
channel = "#foo"
username = "bar"
def on_message(word, word_eol, userdata):
if hexchat.get_info('channel').startswith(channel) and username in word[0]:
if word[1].startswith("shut up") or word[1] is "k" or word[1].startswith("aight") or word[1] is "sh" or word[1].startswith("shh") or word[1].startswith("ugh") or word[1].startswith("w/e"):
hexchat.command("say " + word[1])
hexchat.hook_print('Channel message', on_message)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment