Skip to content

Commit

Permalink
Merge pull request #44 from clarissavazquez/master
Browse files Browse the repository at this point in the history
Nickname authentication
  • Loading branch information
shaunagm committed Dec 10, 2014
2 parents 1edf735 + a88442e commit 971c13c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
channel_greeters = ['shauna', 'paulproteus', 'marktraceur']
wait_time = 60
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.


#########################
Expand Down Expand Up @@ -71,6 +72,10 @@ 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()
if registered == true:
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
Expand Down Expand Up @@ -220,7 +225,7 @@ def wait_time_change(actor, ircmsg, ircsock):
def pong(ircsock):
ircsock.send("PONG :pingis\n")


##########################
### The main function. ###
##########################
Expand Down

0 comments on commit 971c13c

Please sign in to comment.