Only register votes on join if player was successfully joined

This commit is contained in:
Vgr E.Barry 2015-03-15 14:24:51 -04:00
parent 588d044e9e
commit dda9348fb2

View File

@ -1117,8 +1117,7 @@ def join(cli, nick, chan, rest):
if nick in var.USERS and (not var.USERS[nick]["account"] or var.USERS[nick]["account"] == "*"):
cli.notice(nick, "You are not logged in to NickServ.")
return
join_player(cli, nick, chan)
if rest and not var.FGAMED:
if join_player(cli, nick, chan) and rest and not var.FGAMED:
gamemode = rest.lower().split()[0]
if gamemode not in var.GAME_MODES.keys():
match, _ = complete_match(gamemode, var.GAME_MODES.keys() - ["roles"])
@ -1241,6 +1240,8 @@ def join_player(cli, player, chan, who = None, forced = False):
t.daemon = True
t.start()
return True
def kill_join(cli, chan):
pl = var.list_players()
pl.sort(key=lambda x: x.lower())