Created an additional conditional variable called registered
This commit is contained in:
parent
15cd6a6c0c
commit
a88442efff
2
bot.py
2
bot.py
@ -11,6 +11,7 @@ botnick = "WelcomeBot"
|
|||||||
channel_greeters = ['shauna', 'paulproteus', 'marktraceur']
|
channel_greeters = ['shauna', 'paulproteus', 'marktraceur']
|
||||||
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,7 @@ def join_irc(ircsock):
|
|||||||
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:
|
with open("password.txt", 'r') as f:
|
||||||
password = f.read()
|
password = f.read()
|
||||||
|
if registered == true:
|
||||||
ircsock.send("PRIVMSG {} {} {} {}".format("NickServ","IDENTIFY", botnick, password))
|
ircsock.send("PRIVMSG {} {} {} {}".format("NickServ","IDENTIFY", botnick, password))
|
||||||
ircsock.send("JOIN {} \n".format(channel)) # Joins channel
|
ircsock.send("JOIN {} \n".format(channel)) # Joins channel
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user