Make use of botconfig vars for chanserv
Missed these the first time around...
This commit is contained in:
parent
602c99a6ff
commit
c32b9031d3
@ -260,7 +260,8 @@ def connect_callback(cli):
|
|||||||
cli.mode(botconfig.CHANNEL, var.QUIET_MODE) # unquiet all
|
cli.mode(botconfig.CHANNEL, var.QUIET_MODE) # unquiet all
|
||||||
elif modeaction == "-o" and target == botconfig.NICK:
|
elif modeaction == "-o" and target == botconfig.NICK:
|
||||||
var.OPPED = False
|
var.OPPED = False
|
||||||
cli.msg("ChanServ", "op " + botconfig.CHANNEL)
|
if var.CHANSERV_OP_COMMAND:
|
||||||
|
cli.msg(var.CHANSERV, var.CHANSERV_OP_COMMAND.format(channel=botconfig.CHANNEL))
|
||||||
|
|
||||||
|
|
||||||
if var.DISABLE_ACCOUNTS:
|
if var.DISABLE_ACCOUNTS:
|
||||||
@ -1150,7 +1151,8 @@ def join_player(cli, player, chan, who=None, forced=False, *, sanity=True):
|
|||||||
|
|
||||||
if not var.OPPED:
|
if not var.OPPED:
|
||||||
cli.notice(who, messages["bot_not_opped"].format(chan))
|
cli.notice(who, messages["bot_not_opped"].format(chan))
|
||||||
cli.msg("ChanServ", "op " + botconfig.CHANNEL)
|
if var.CHANSERV_OP_COMMAND:
|
||||||
|
cli.msg(var.CHANSERV, var.CHANSERV_OP_COMMAND.format(channel=botconfig.CHANNEL))
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if player in var.USERS:
|
if player in var.USERS:
|
||||||
@ -1318,7 +1320,8 @@ def fjoin(cli, nick, chan, rest):
|
|||||||
fake = False
|
fake = False
|
||||||
if not var.OPPED:
|
if not var.OPPED:
|
||||||
cli.notice(nick, messages["bot_not_opped"].format(chan))
|
cli.notice(nick, messages["bot_not_opped"].format(chan))
|
||||||
cli.msg("ChanServ", "op " + botconfig.CHANNEL)
|
if var.CHANSERV_OP_COMMAND:
|
||||||
|
cli.msg(var.CHANSERV, var.CHANSERV_OP_COMMAND.format(channel=botconfig.CHANNEL))
|
||||||
return
|
return
|
||||||
if not rest.strip():
|
if not rest.strip():
|
||||||
evt.data["join_player"](cli, nick, chan, forced=True)
|
evt.data["join_player"](cli, nick, chan, forced=True)
|
||||||
@ -1420,8 +1423,8 @@ def fstart(cli, nick, chan, rest):
|
|||||||
def on_kicked(cli, nick, chan, victim, reason):
|
def on_kicked(cli, nick, chan, victim, reason):
|
||||||
if victim == botconfig.NICK:
|
if victim == botconfig.NICK:
|
||||||
cli.join(chan)
|
cli.join(chan)
|
||||||
if chan == botconfig.CHANNEL:
|
if chan == botconfig.CHANNEL and var.CHANSERV_OP_COMMAND:
|
||||||
cli.msg("ChanServ", "op "+botconfig.CHANNEL)
|
cli.msg(var.CHANSERV, var.CHANSERV_OP_COMMAND.format(channel=botconfig.CHANNEL))
|
||||||
if var.AUTO_TOGGLE_MODES and victim in var.USERS:
|
if var.AUTO_TOGGLE_MODES and victim in var.USERS:
|
||||||
var.USERS[victim]["modes"] = set()
|
var.USERS[victim]["modes"] = set()
|
||||||
var.USERS[victim]["moded"] = set()
|
var.USERS[victim]["moded"] = set()
|
||||||
@ -3382,8 +3385,8 @@ def on_join(cli, raw_nick, chan, acc="*", rname=""):
|
|||||||
if nick == botconfig.NICK:
|
if nick == botconfig.NICK:
|
||||||
var.OPPED = False
|
var.OPPED = False
|
||||||
cli.send("NAMES " + chan)
|
cli.send("NAMES " + chan)
|
||||||
if nick == "ChanServ" and not var.OPPED:
|
if nick == var.CHANSERV and not var.OPPED and var.CHANSERV_OP_COMMAND:
|
||||||
cli.msg("ChanServ", "op " + chan)
|
cli.msg(var.CHANSERV, var.CHANSERV_OP_COMMAND.format(channel=botconfig.CHANNEL))
|
||||||
|
|
||||||
@hook("namreply")
|
@hook("namreply")
|
||||||
def on_names(cli, _, __, *names):
|
def on_names(cli, _, __, *names):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user