Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import hexchat
- import re
- import smtplib
- __module_name__ = "srl_bot"
- __module_version__ = "1.0"
- __module_description__ = "send srl emails"
- def sendmail(message):
- try:
- smtp_ssl = smtplib.SMTP_SSL("smtp.gmail.com", 465)
- smtp_ssl.ehlo()
- smtp_ssl.login("username@gmail.com","password")
- smtp_ssl.sendmail("username@gmail.com","username@gmail.com","Subject: srl_bot race detection\n\n " + message)
- smtp_ssl.close()
- print("email sent")
- except:
- error = sys.exc_info()[0]
- print("email NOT sent: " + error)
- def messageHandler(word, word_eol, userdata):
- if re.match(".*zelda2hacks.*",word[1]):
- #print(word[0] + " said " + word[1])
- sendmail(word[0] + " " + word[1])
- #hexchat.command("say z2hacks said " + word[0] + "!")
- return hexchat.EAT_NONE
- hexchat.hook_print("Channel Message", messageHandler)
- hexchat.hook_print("Your Message", messageHandler)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement