Added a line that would read a password txt file so that it identifies with the server

This commit is contained in:
clarissavazquez 2014-11-15 16:29:40 -08:00
parent 8f4a11e835
commit 15cd6a6c0c
1 changed files with 4 additions and 1 deletions

3
bot.py
View File

@ -69,6 +69,9 @@ def join_irc(ircsock):
ircsock.send("USER {0} {0} {0} :This is http://openhatch.org/'s greeter bot"
".\n".format(botnick)) # bot authentication
ircsock.send("NICK {}\n".format(botnick)) # Assign the nick to the bot.
with open("password.txt", 'r') as f:
password = f.read()
ircsock.send("PRIVMSG {} {} {} {}".format("NickServ","IDENTIFY", botnick, password))
ircsock.send("JOIN {} \n".format(channel)) # Joins channel
# Reads the messages from the server and adds them to the Queue and prints