diff --git a/botconfig.py.example b/botconfig.py.example index c1363c4..95eb446 100644 --- a/botconfig.py.example +++ b/botconfig.py.example @@ -75,4 +75,6 @@ TIMESTAMP_FORMAT = "[%Y-%m-%d %H:%M:%S{tzoffset}]" #CHANSERV = "x@channels.undernet.org" #CHANSERV_OP_COMMAND = "OP {channel}" +USE_NICKSERV_GHOST = False # If set to True, the bot will GHOST users using the bot's nick. Otherwise, it will use RELEASE + # vim: set ft=python: diff --git a/src/handler.py b/src/handler.py index 188c1d6..c362153 100644 --- a/src/handler.py +++ b/src/handler.py @@ -91,7 +91,7 @@ def connect_callback(cli): if not botconfig.PASS or bot_nick == nick: return # prevents the bot from trying to release without a password func = cli.ns_release - if getattr(botconfig, "USE_NICKSERV_GHOST", False): # FIXME + if botconfig.USE_NICKSERV_GHOST: func = cli.ns_ghost func(nick=botconfig.NICK, password=botconfig.PASS, nickserv=var.NICKSERV, command=var.NICKSERV_RELEASE_COMMAND) users.Bot.change_nick(botconfig.NICK) diff --git a/wolfbot.py b/wolfbot.py index f391291..e8f551b 100755 --- a/wolfbot.py +++ b/wolfbot.py @@ -53,6 +53,15 @@ except AttributeError: sep="\n") sys.exit(1) +try: + botconfig.USE_NICKSERV_GHOST +except AttributeError: + print("Please set up your config to include a USE_NICKSERV_GHOST variable", + "It should be a boolean value, determining whether to use GHOST or RELEASE", + "(See botconfig.py.example for an informative comment)", + sep="\n") + sys.exit(1) + from oyoyo.client import IRCClient import src