Fix voicing on rejoin at night when devoice during night is enabled

This commit is contained in:
Lane Farrow 2015-11-13 21:52:34 -06:00
parent 37ce9ad17c
commit b121d3a2c4

View File

@ -3310,6 +3310,7 @@ def on_join(cli, raw_nick, chan, acc="*", rname=""):
hm = var.DISCONNECTED[nick][1] hm = var.DISCONNECTED[nick][1]
act = var.DISCONNECTED[nick][0] act = var.DISCONNECTED[nick][0]
if (acc == act and not var.DISABLE_ACCOUNTS) or (hostmask == hm and not var.ACCOUNTS_ONLY): if (acc == act and not var.DISABLE_ACCOUNTS) or (hostmask == hm and not var.ACCOUNTS_ONLY):
if not var.DEVOICE_DURING_NIGHT or var.PHASE != "night":
cli.mode(chan, "+v", nick, nick+"!*@*") cli.mode(chan, "+v", nick, nick+"!*@*")
del var.DISCONNECTED[nick] del var.DISCONNECTED[nick]
var.LAST_SAID_TIME[nick] = datetime.now() var.LAST_SAID_TIME[nick] = datetime.now()