mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 03:54:54 +02:00
Ignoremodule lowercase | German locale file
This commit is contained in:
@@ -47,8 +47,11 @@ function table.merge(t, src)
|
||||
end
|
||||
end
|
||||
|
||||
function table.find(t, value)
|
||||
function table.find(t, value, lowercase)
|
||||
for k,v in pairs(t) do
|
||||
if lowercase and type(value) == 'string' and type(v) == 'string' then
|
||||
if v:lower() == value:lower() then return k end
|
||||
end
|
||||
if v == value then return k end
|
||||
end
|
||||
end
|
||||
|
@@ -631,7 +631,7 @@ function onTalk(name, level, mode, message, channelId, creaturePos)
|
||||
return
|
||||
elseif speaktype.private and isIgnoringPrivate() and mode ~= MessageModes.NpcFrom then
|
||||
return
|
||||
elseif isIgnored(name) or isIgnored(name:lower()) then
|
||||
elseif isIgnored(name) then
|
||||
return
|
||||
end
|
||||
end
|
||||
@@ -787,7 +787,7 @@ function saveIgnoreSettings()
|
||||
end
|
||||
|
||||
function isIgnored(name)
|
||||
return table.find(ignoreSettings.players, name)
|
||||
return table.find(ignoreSettings.players, name, true)
|
||||
end
|
||||
|
||||
function addIgnoredPlayer(name)
|
||||
|
Reference in New Issue
Block a user