diff options
author | David McMackins II <contact@mcmackins.org> | 2017-04-16 10:17:46 -0500 |
---|---|---|
committer | David McMackins II <contact@mcmackins.org> | 2017-04-16 10:17:46 -0500 |
commit | 86aeecd64ac84200ce994f0e37afc32b8f96cb33 (patch) | |
tree | d36ed0cec321bd1491659e4f187117ff05a8693f | |
parent | 17b34cc292847d9db0ff012ab5cb4311ec67e8ed (diff) |
Make sure it's the player's turn before allowing them to SELECT
-rw-r--r-- | serverthread.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/serverthread.lua b/serverthread.lua index 9f6356d..68fbbe2 100644 --- a/serverthread.lua +++ b/serverthread.lua @@ -152,6 +152,11 @@ function Server:_process() elseif line == 'MAKEROOM' then self._socks[this]:send(NEGATIVE) elseif line:startswith('SELECT') then + if self._turn ~= this then + self._socks[this]:send(NEGATIVE) + break + end + line = line:split(' ') if #line ~= 2 then self._socks[this]:send(ERR_ARGNUM) |