Last active
December 17, 2015 17:39
-
-
Save bencentra/5648050 to your computer and use it in GitHub Desktop.
A short python script for XChat that will automatically reply for you when a user is kicked from the channel.
This file contains hidden or 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
# Import xchat module | |
import xchat | |
# Required module information | |
__module_name__ = "loose cannon" | |
__module_version__ = "1.0" | |
__module_description__ = "Annoy the ops, namely agargiulo" | |
# Define the callback method for our hook | |
def loose_cannon_cb(word, word_eol, userdata): | |
# Run /say to send the chat message | |
xchat.command("say " + word[0] + " is a LOOSE CANNON!") | |
# Don't interfere with standard xchat output | |
return xchat.EAT_NONE | |
# Hook into the "Kick" print event, run the callback method | |
xchat.hook_print("Kick", loose_cannon_cb) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment