Browse Source

Check if OPER and NickServ are needed

translation
Rogier Neeleman 10 years ago
parent
commit
efb78f538d
  1. 4
      botconfig.py.example
  2. 7
      modules/common.py

4
botconfig.py.example

@ -3,8 +3,8 @@ CHANNEL = "#mywolfgame"
HOST = "irc.freenode.net" HOST = "irc.freenode.net"
PORT = 6667 PORT = 6667
USERNAME = "" # for authentication, can be left blank if same as NICK USERNAME = "" # for authentication, can be left blank if same as NICK
OPERUSER = "OPPER user" OPERUSER = ""
OPERPASS = "OPER password" OPERPASS = ""
NICK = "mywolfbot" NICK = "mywolfbot"
NICKPASS = "nickserv password" NICKPASS = "nickserv password"
CMD_CHAR = "!" CMD_CHAR = "!"

7
modules/common.py

@ -97,9 +97,10 @@ hook = decorators.generate(HOOKS, raw_nick=True, permissions=False)
def connect_callback(cli): def connect_callback(cli):
def prepare_stuff(*args): def prepare_stuff(*args):
cli.send("OPER", botconfig.OPERUSER, botconfig.OPERPASS) if botconfig.OPERUSER and botconfig.OPERPASS:
#cli.msg("NickServ", "IDENTIFY", botconfig.NICKPASS) cli.send("OPER", botconfig.OPERUSER, botconfig.OPERPASS)
cli.ns_identify(botconfig.NICKPASS) if botconfig.NICKPASS:
cli.ns_identify(botconfig.NICKPASS)
cli.join(botconfig.CHANNEL) cli.join(botconfig.CHANNEL)
cli.msg("ChanServ", "op "+botconfig.CHANNEL) cli.msg("ChanServ", "op "+botconfig.CHANNEL)

Loading…
Cancel
Save