Last active
December 26, 2015 01:19
-
-
Save Sanqui/7070127 to your computer and use it in GitHub Desktop.
xchat twitch auto bot ban
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__ = "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