Merge pull request #44 from clarissavazquez/master
Nickname authentication
This commit is contained in:
commit
971c13cc25
9
bot.py
9
bot.py
@ -11,7 +11,8 @@ botnick = "WelcomeBot"
|
||||
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.
|
||||
|
||||
|
||||
#########################
|
||||
@ -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
|
||||
@ -220,7 +225,7 @@ def wait_time_change(actor, ircmsg, ircsock):
|
||||
def pong(ircsock):
|
||||
ircsock.send("PONG :pingis\n")
|
||||
|
||||
|
||||
|
||||
##########################
|
||||
### The main function. ###
|
||||
##########################
|
||||
|
Loading…
Reference in New Issue
Block a user