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

7
modules/common.py

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

Loading…
Cancel
Save