sanitize member names (thanks hysteria)
This commit is contained in:
parent
dbb049726e
commit
a5a603be6c
1 changed files with 5 additions and 0 deletions
5
init.lua
5
init.lua
|
|
@ -109,6 +109,11 @@ end
|
|||
-- add player name to table as member
|
||||
local add_member = function(meta, name)
|
||||
|
||||
-- Validate player name for MT compliance
|
||||
if name ~= string.match(name, "[%w_-]+") then
|
||||
return
|
||||
end
|
||||
|
||||
-- Constant (20) defined by player.h
|
||||
if name:len() > 25 then
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue