AZ
if event.log.remote_user ~= FOO|BAR then
......
Size: a a a
AZ
if event.log.remote_user ~= FOO|BAR then
......
NF
function includes(tbl, item)
for _, value in
ipairs(tbl) do
if value == item then return true end
end
end
print(includes({ 'foo', 'bar' }, event.log.remote_user)
AZ
function includes(tbl, item)
for _, value in
ipairs(tbl) do
if value == item then return true end
end
end
print(includes({ 'foo', 'bar' }, event.log.remote_user)
NF
AZ
function includes(tbl, item)
for _, value in
ipairs(tbl) do
if value == item then return true end
end
end
print(includes({ 'foo', 'bar' }, event.log.remote_user)
AZ
function includes(tbl, item)
for _, value in
ipairs(tbl) do
if value == item then return true end
end
end
print(includes({ 'foo', 'bar' }, event.log.remote_user)
NF
BD
O
S
S
S
local str = 'qwe'
print(str[2])
через getmetatable('').__index
меняется везде️
️
S
️
S
local mystring = {}
mystring.__index = mystring
function mystring:new(str)
return setmetatable({data = str}, self)
end
for k, v in pairs(string) do
mystring[k] = function(self, ...)
return v(self.data, ...)
end
end
setmetatable(mystring, {__call = mystring.new})Дальше навешиваешь свои функции.
S