Merge pull request #44 from clarissavazquez/master
Nickname authentication
This commit is contained in:
commit
971c13cc25
5
bot.py
5
bot.py
@ -12,6 +12,7 @@ channel_greeters = ['shauna', 'paulproteus', 'marktraceur']
|
|||||||
wait_time = 60
|
wait_time = 60
|
||||||
hello_list = [r'hello', r'hi', r'hey', r'yo', r'sup']
|
hello_list = [r'hello', r'hi', r'hey', r'yo', r'sup']
|
||||||
help_list = [r'help', r'info', r'faq', r'explain yourself']
|
help_list = [r'help', r'info', r'faq', r'explain yourself']
|
||||||
|
registered = true # If users don't want to identify, change the value to false.
|
||||||
|
|
||||||
|
|
||||||
#########################
|
#########################
|
||||||
@ -71,6 +72,10 @@ def join_irc(ircsock):
|
|||||||
ircsock.send("USER {0} {0} {0} :This is http://openhatch.org/'s greeter bot"
|
ircsock.send("USER {0} {0} {0} :This is http://openhatch.org/'s greeter bot"
|
||||||
".\n".format(botnick)) # bot authentication
|
".\n".format(botnick)) # bot authentication
|
||||||
ircsock.send("NICK {}\n".format(botnick)) # Assign the nick to the bot.
|
ircsock.send("NICK {}\n".format(botnick)) # Assign the nick to the bot.
|
||||||
|
with open("password.txt", 'r') as f:
|
||||||
|
password = f.read()
|
||||||
|
if registered == true:
|
||||||
|
ircsock.send("PRIVMSG {} {} {} {}".format("NickServ","IDENTIFY", botnick, password))
|
||||||
ircsock.send("JOIN {} \n".format(channel)) # Joins channel
|
ircsock.send("JOIN {} \n".format(channel)) # Joins channel
|
||||||
|
|
||||||
# Reads the messages from the server and adds them to the Queue and prints
|
# Reads the messages from the server and adds them to the Queue and prints
|
||||||
|
Loading…
Reference in New Issue
Block a user