Skip to content

Instantly share code, notes, and snippets.

@Sanqui
Last active December 26, 2015 01:19
Show Gist options
  • Save Sanqui/7070127 to your computer and use it in GitHub Desktop.
Save Sanqui/7070127 to your computer and use it in GitHub Desktop.
xchat twitch auto bot ban
__module_name__ = "twitchautoban"
__module_version__ = "0.1.0"
__module_description__ = "bans twitch spambots lol"
import xchat
import os
import re
print "twitchautoban loaded!"
def privmsg(word, word_eol, userdata):
name = word[0]
channel = word[2]
message = word_eol[3]
if re.match(".*vine.*4.*u.*", message):
print("I'm banning "+name[1:].split("!")[0])
xchat.command("PRIVMSG "+channel+" .ban "+name[1:].split("!")[0])
xchat.hook_server("PRIVMSG", privmsg)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment