Make on_give_me_ops independent from endofwho
This commit is contained in:
parent
37c0c075fa
commit
b251a34e31
@ -138,22 +138,22 @@ def connect_callback(cli):
|
|||||||
cmodes.append(("-v", nick))
|
cmodes.append(("-v", nick))
|
||||||
# devoice all on connect
|
# devoice all on connect
|
||||||
|
|
||||||
@hook("mode", hookid=294)
|
@hook("mode", hookid=294)
|
||||||
def on_give_me_ops(cli, blah, blahh, modeaction, target="", *other):
|
def on_give_me_ops(cli, blah, blahh, modeaction, target="", *other):
|
||||||
if modeaction == "+o" and target == botconfig.NICK:
|
if modeaction == "+o" and target == botconfig.NICK:
|
||||||
var.OPPED = True
|
var.OPPED = True
|
||||||
|
|
||||||
if var.PHASE == "none":
|
if var.PHASE == "none":
|
||||||
@hook("quietlistend", 294)
|
@hook("quietlistend", 294)
|
||||||
def on_quietlist_end(cli, svr, nick, chan, *etc):
|
def on_quietlist_end(cli, svr, nick, chan, *etc):
|
||||||
if chan == botconfig.CHANNEL:
|
if chan == botconfig.CHANNEL:
|
||||||
mass_mode(cli, cmodes)
|
mass_mode(cli, cmodes)
|
||||||
|
|
||||||
cli.mode(botconfig.CHANNEL, "q") # unquiet all
|
cli.mode(botconfig.CHANNEL, "q") # unquiet all
|
||||||
cli.mode(botconfig.CHANNEL, "-m") # remove -m mode from channel
|
cli.mode(botconfig.CHANNEL, "-m") # remove -m mode from channel
|
||||||
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)
|
cli.msg("ChanServ", "op " + botconfig.CHANNEL)
|
||||||
|
|
||||||
|
|
||||||
cli.who(botconfig.CHANNEL, "%nuhaf")
|
cli.who(botconfig.CHANNEL, "%nuhaf")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user