Merge pull request #200 from lutoma/no-start-retract-query
Only allow retracting start votes in the main channel
This commit is contained in:
commit
7a177a6360
@ -5140,15 +5140,16 @@ def retract(cli, nick, chan, rest):
|
|||||||
|
|
||||||
with var.GRAVEYARD_LOCK, var.WARNING_LOCK:
|
with var.GRAVEYARD_LOCK, var.WARNING_LOCK:
|
||||||
if var.PHASE == "join":
|
if var.PHASE == "join":
|
||||||
if not nick in var.START_VOTES:
|
if chan == botconfig.CHANNEL:
|
||||||
cli.notice(nick, messages["start_novote"])
|
if not nick in var.START_VOTES:
|
||||||
else:
|
cli.notice(nick, messages["start_novote"])
|
||||||
var.START_VOTES.discard(nick)
|
else:
|
||||||
cli.msg(chan, messages["start_retract"].format(nick))
|
var.START_VOTES.discard(nick)
|
||||||
|
cli.msg(chan, messages["start_retract"].format(nick))
|
||||||
|
|
||||||
if len(var.START_VOTES) < 1:
|
if len(var.START_VOTES) < 1:
|
||||||
var.TIMERS['start_votes'][0].cancel()
|
var.TIMERS['start_votes'][0].cancel()
|
||||||
del var.TIMERS['start_votes']
|
del var.TIMERS['start_votes']
|
||||||
return
|
return
|
||||||
|
|
||||||
if chan == nick: # PM, use different code
|
if chan == nick: # PM, use different code
|
||||||
|
Loading…
Reference in New Issue
Block a user