1
0
mirror of https://github.com/Earu/EasyChat.git synced 2025-03-04 03:13:20 -05:00

Fix a bug in mentions and module ignore list

This commit is contained in:
Earu 2021-07-26 18:49:36 +02:00
parent caba7a6e34
commit 946e36ad8b
3 changed files with 3 additions and 3 deletions

View File

@ -4,7 +4,7 @@ local ignore_list = {}
local MODULE_IGNORE_LIST_PATH = "easychat/module_ignore_list.txt"
if file.Exists(MODULE_IGNORE_LIST_PATH, "DATA") then
local file_contents = file.Read(MODULE_IGNORE_LIST_PATH, "DATA")
local lines = ("\r?\n"):Explode(file_contents)
local lines = ("\r?\n"):Explode(file_contents, true)
for _, line in pairs(lines) do
line = line:Trim()
if #line > 0 then

View File

@ -12,7 +12,7 @@ EasyChat.Mentions = mentions
if file.Exists(FILTER_PATH, "DATA") then
local contents = file.Read(FILTER_PATH, "DATA")
if #contents:Trim() > 0 then
mentions.Filters = ("\r?\n"):Explode(contents)
mentions.Filters = ("\r?\n"):Explode(contents, true)
else
mentions.Filters = {}
end

View File

@ -133,7 +133,7 @@ if SERVER then
if ply:IsAdmin() and file.Exists(MODULE_IGNORE_LIST_PATH, "DATA") then
EasyChat.RunOnNextFrame(function()
local file_contents = file.Read(MODULE_IGNORE_LIST_PATH, "DATA")
local paths = ("\r?\n"):Explode(file_contents)
local paths = ("\r?\n"):Explode(file_contents, true)
net.Start(NET_MODULE_IGNORE_LIST)
net.WriteTable(paths)
net.Send(ply)