Fixed error where doing /timer in lobby would crash the server

This commit is contained in:
Deukhoofd committed 2016-04-12 19:57:50 +02:00
1 parent 5e52d0186d
commit 686ac81b27
1 file changed
+2
+2
View File
@@ -355,6 +355,8 @@ makeOwnerCommand "eval", (user, room, next, pieces...) ->
desc "Makes the battle timed" desc "Makes the battle timed"
makeCommand "timer", (user, room, next) -> makeCommand "timer", (user, room, next) ->
if !(_.has room, "turn")
return
controller = server_.findBattle(room.id) controller = server_.findBattle(room.id)
isBattler = false isBattler = false
player = room.getPlayer(user.id) player = room.getPlayer(user.id)