Properly handle the option to use ghost or release
This commit is contained in:
parent
22b353b979
commit
1766f54b21
@ -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:
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user