Update teams.lua

master
Minetest-j45 2021-03-21 21:16:55 +00:00 committed by GitHub
parent d9737604a7
commit 61fee1699f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -46,7 +46,7 @@ end
sumo_duels.set_waiting = function(pname, arena_number)
local current = sumo_duels.get_player_team(pname)
if current:match(".*arena_%d+") then return false, "You are already in a game or in the queue for a game, if you want to exit the queue, do /lobby" end
if current:match("arena_%d+") then return false, "You are already in a game or in the queue for a game, if you want to exit the queue, do /lobby" end
local tablenumber = sumo_duels.tablefind(sumo_duels.teams[current], pname)
table.remove(sumo_duels.teams[current], tonumber(tablenumber))
local player = minetest.get_player_by_name(pname)
@ -101,7 +101,7 @@ minetest.register_chatcommand("lobby", {
if not player then return end
if not player:is_player() then return end
local current = sumo_duels.get_player_team(name)
if current:match("arena_%d+") then return false, "You are in a game, dont try escape" end
if current:match("^arena_%d+") then return false, "You are in a game, dont try escape" end
sumo_duels.set_lobby(name)
end,
})