Skip to content

Instantly share code, notes, and snippets.

@bencentra
Last active December 17, 2015 17:39
Show Gist options
  • Save bencentra/5648050 to your computer and use it in GitHub Desktop.
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.
# 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