Added a line that would read a password txt file so that it identifies with the server
This commit is contained in:
parent
8f4a11e835
commit
15cd6a6c0c
3
bot.py
3
bot.py
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user