Strange addons downloading to my clients using +host_workshop_collection

I use +host_workshop_collection for my Garry’s Mod server and it works fine, don’t get me wrong but there’s items in the collection that people seem to be downloading but are not in the collection, things such as “Star Wars player models” or “HomeStuck Ragdolls” etc… and I’ve done several server restarts and checked the entire collection one by one (not a big collection) and I can’t seem to find these addons, what’s going on, is this normal? http://steamcommunity.com/sharedfiles/filedetails/?id=204963816 That’s the link to my collection.

Any chance one of the items in the collection includes a script that runs resource.AddWorkshop?

Or, have you tried turning off +host_workshop_collection; perhaps it is a script in your file directory doing this?

I checked my files and there’s none of that. Could it be a some files in my add ons directory doing this or does host workshop only download things from the collection?

+host_workshop_collection does not affect what people download from your server. There must be resource.AddWorkshop somewhere on your server that does this.

+host_workshop_collection doesn’t send files to the client, resource.AddWorkshop does.

Dammit Robotboy

I checked lua/autorun/server and searched the server for a resource.AddWorkshop and there was nothing. I never added one anyway…

It could also be in lua/autorun.

Like I said, I did a directory search and I searched the lua/autorun too just to make sure and still nothing is there. Why would it be there anyway? I never heard of these addons and they don’t seem interesting to me.

One of the addons inside your collection is doing this.

Why would anyone put a resource.addworkshop in their addon if it doesn’t even download something required for the addon? Besides searching through these addons will take years…

Download those addons to your client, open with notepad++ and search all opened files for AddWorkshop. It will take 1 hour tops.

I did exactly that and extracted all of the server addons and opened up their autorun files and found nothing in relation to workshop. Before you told me.

It is not necessarily must be in autorun. It can be in any serverside or shared file.

Like I said for the last time, I checked all autorun files in notpad++ NOTHING FOUND

Open lua/includes/init.lua.

Put this at the very top of the file:


if SERVER then
	local o = resource.AddWorkshop
	
	function resource.AddWorkshop( id )
		o( id )
		
		local info = debug.getinfo( 2 )
	
		MsgN( "*** " .. info.source .. " called resource.AddWorkshop '" .. id .. "' on line " .. ( info.currentline or "N/A" ) .. " ***" )
	end
end

Launch your server.

You now have the path of, line, and requested id of each and every time something calls resource.AddWorkshop.

At time of posting, I couldn’t think of a way to find out which addon it originates from if it comes from a gma, but there must be a way since if it errors the game knows which addon the error comes from.

You could try just putting error( “Called resource.AddWorkshop!” ) at the end of the function.

It’s going to take some digging but it will narrow it down for you.

I love you. This actually worked, it was a madcow addon causing all this shit to download onto my clients… I don’t know how to thank you more!

Whose mad cow add on?

Madcow is a weapon base.