Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Sceleratis/Adonis
Browse files Browse the repository at this point in the history
  • Loading branch information
Sceleratis committed Sep 8, 2021
2 parents 9f19c4f + 67fb6d4 commit 786c64f
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions MainModule/Server/Core/Process.lua
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,27 @@ return function(Vargs)
Core.LoadExistingPlayer(p);
end
end

service.TrackTask("Thread: ChatCharacterLimit", function()
local ChatModules = service.Chat:WaitForChild("ClientChatModules",5)
if ChatModules then
local ChatSettings = ChatModules:WaitForChild("ChatSettings",5)
if ChatSettings then
local success, ChatSettingsModule = pcall(function()
return require(ChatSettings)
end)
if success then
local NewChatLimit = ChatSettingsModule.MaximumMessageLength
if NewChatLimit and type(NewChatLimit) == 'number' then
Process.MaxChatCharacterLimit = NewChatLimit
AddLog("Script", "Chat Character Limit automatically set to " .. NewChatLimit);
end
else
AddLog("Script", "Failed to automatically get ChatSettings Character Limit, ignore if you use a custom chat system");
end
end
end
end)

Process.RunAfterPlugins = nil;
AddLog("Script", "Process Module RunAfterPlugins Finished");
Expand Down

0 comments on commit 786c64f

Please sign in to comment.