Created
May 6, 2015 23:03
-
-
Save Treevs/ff95009c5a455b3c8e3c to your computer and use it in GitHub Desktop.
Hexchat script test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__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