Skip to content

Commit

Permalink
removing \n from kick messages (#1501)
Browse files Browse the repository at this point in the history
* Update Core.lua

* Update Process.lua

* Update Anti.lua

* Update Admins.lua
  • Loading branch information
ocelot81 authored May 2, 2024
1 parent dfe9b69 commit ecbd708
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion MainModule/Server/Commands/Admins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1412,7 +1412,7 @@ return function(Vargs, env)
Commands = {"nil"};
Args = {"player"};
Hidden = true;
Description = `Deletes the player forcefully, causing them to be kicked for "unexpected client behaviour"`;
Description = `Deletes the player forcefully, causing them to be kicked for "Player has been removed from the DataModel"`;
AdminLevel = "Admins";
Function = function(plr: Player, args: {string})
for _, v in service.GetPlayers(plr, args[1]) do
Expand Down
2 changes: 1 addition & 1 deletion MainModule/Server/Core/Anti.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ return function(Vargs, GetEnv)
RemovePlayer = function(p, info)
info = tostring(info) or "No Reason Given"

pcall(function()service.UnWrap(p):Kick(`:: Adonis Anti Cheat ::\n{info}`) end)
pcall(function() service.UnWrap(p):Kick(`:: Adonis Anti Cheat :: {info}`) end)

task.wait(1)

Expand Down
6 changes: 3 additions & 3 deletions MainModule/Server/Core/Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ return function(Vargs, GetEnv)
if not p.Parent then
return false
elseif not parentObj then
p:Kick("\n[CLI-102495] Loading Error \nPlayerGui Missing (Waited 10 Minutes)")
p:Kick("[CLI-102495] Loading Error - PlayerGui Missing (Waited 10 Minutes)")
return false
end

Expand Down Expand Up @@ -484,14 +484,14 @@ return function(Vargs, GetEnv)
end)

if not ok then
p:Kick(`\n[CLI-192385] Loading Error \n[HookClient Error: {err}]`)
p:Kick(`[CLI-192385] Loading Error [HookClient Error: {err}]`)
return false
else
return true
end
else
if p and p.Parent then
p:Kick("\n[CLI-5691283] Loading Error \n[HookClient: Keys Missing]")
p:Kick("[CLI-5691283] Loading Error [HookClient: Keys Missing]")
end
end
end;
Expand Down
8 changes: 4 additions & 4 deletions MainModule/Server/Core/Process.lua
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ return function(Vargs, GetEnv)
Remote.Clients[key] = keyData

local ran, err = Pcall(function()
Routine(function()
task.spawn(function()
if Anti.UserSpoofCheck(p) then
Remote.Clients[key] = nil;
Anti.Detected(p, "kick", "Username Spoofing");
Expand All @@ -786,7 +786,7 @@ return function(Vargs, GetEnv)

if Variables.ServerLock and level < 1 then
Remote.Clients[key] = nil;
p:Kick(Variables.LockMessage or "::Adonis::\nServer Locked")
p:Kick(Variables.LockMessage or "::Adonis:: Server Locked")
return "REMOVED"
end

Expand All @@ -803,7 +803,7 @@ return function(Vargs, GetEnv)

if not listed and level == 0 then
Remote.Clients[key] = nil;
p:Kick(Variables.LockMessage or "::Adonis::\nWhitelist Enabled")
p:Kick(Variables.LockMessage or "::Adonis:: Whitelist Enabled")
return "REMOVED"
end
end
Expand Down Expand Up @@ -877,7 +877,7 @@ return function(Vargs, GetEnv)
end
end)
elseif ran and err ~= "REMOVED" then
Anti.RemovePlayer(p, "\n:: Adonis ::\nLoading Error [Missing player, keys, or removed]")
Anti.RemovePlayer(p, ":: Adonis :: Loading Error [Missing player, keys, or removed]")
end
end;

Expand Down

0 comments on commit ecbd708

Please # to comment.