Disabling Uploads - Adv Dupe

I’ve been on different servers that have the upload capability disabled. One server owner says he changed the lua code to disable it, but he totally blows off the question of WHAT to change.

Can anyone help me with this? Thanks.

Adv Duplicator/lua/weapons/gmod_tool/stools/adv_duplicator.lua

Remove lines 1233 to 1239 :


if AdvDupeClient.sending then
					middle:AddItem(Label("==Upload in Progress=="))
				elseif AdvDupeClient.CanUpload() then
					middle:Button("Upload File to server", "adv_duplicator_upload_cl")
				else
					middle:AddItem(Label("Server Disabled Uploads"))
				end

and then lines 1337 to 1349 :


local function AdvDupeCL_UpLoad( pl, command, args )
		if !pl:IsValid() or !pl:IsPlayer() then return end
		
		local filename = ""
		if !args[1] --if a filename wasn't passed with an arg, then get the selection in the panel
		then filename = pl:GetInfo( "adv_duplicator_load_filename_cl" )
		else filename = tostring(args[1]) end
		
		AdvDupeClient.UpLoadFile( pl, filename )
		
		AdvDuplicator_UpdateControlPanel()
	end
	concommand.Add( "adv_duplicator_upload_cl", AdvDupeCL_UpLoad )

Not tested at all but that should do the trick.

I’ll try that, thanks… is there a program that will help me with the line #'s? Forgive me but I use notepad…

EDIT:

Nevermind, I managed to find the “got to” function.

Use notepad ++