Skip to content

Commit

Permalink
Temporary friendslist patch
Browse files Browse the repository at this point in the history
  • Loading branch information
Vurv78 committed Oct 31, 2023
1 parent fc57bdb commit be75c7d
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions lua/wire/stools/friendslist.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,16 @@ local function netWriteValues( values )
end
end
local function netReadValues()
local t = {}
local amount = net.ReadUInt(11)
for i=1,amount do
t[i] = net.ReadString()
local t, bytes = {}, 0
for i = 1, net.ReadUInt(11) do
local str = net.ReadString() -- todo: delete and redo practically this entire file cause this is horrible. we should just be sending steamid64s as numbers. theres writeuint64 and readuint64 now which would be perfect for this.
bytes = bytes + #str

t[i] = string.sub(str, 1, 32)

if bytes > 32 * 2 ^ 11 --[[ someone is writing more than they are supposed to be. ]] then
return t
end
end
return t
end
Expand Down

0 comments on commit be75c7d

Please sign in to comment.