Merge pull request #192 from laneatomic/fix-night-rejoin

Fix voicing on rejoin at night when devoice during night is enabled
This commit is contained in:
jacob1 2015-11-14 00:45:36 -05:00
commit 131a5762ef

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()