Skip to content

Commit c56efad

Browse files
authored
Update sv_deferrals.lua
- Localize source, prevent any hiccups.
1 parent 9ba5cc3 commit c56efad

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

sv_deferrals.lua

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,22 @@ local _isInGuild = isInGuild
66
local GuildRequired = Config.GuildRequired
77

88
AddEventHandler("playerConnecting", function(_, _, deferrals)
9+
local src = source
910
deferrals.defer()
1011
Wait(0)
1112

12-
local identifiers = _GetIdentifiersTable(source)
13+
local identifiers = _GetIdentifiersTable(src)
1314
local discord = identifiers.discord
1415

1516
if not discord then
1617
deferrals.done("You must have Discord open to join this server.")
1718
return
1819
end
1920

20-
if GuildRequired and not _isInGuild(source) then
21+
if GuildRequired and not _isInGuild(src) then
2122
deferrals.done("You must be in the Discord server to join this server.")
2223
return
2324
end
2425

2526
deferrals.done()
26-
end)
27+
end)

0 commit comments

Comments
 (0)