Blockland Forums > Modification Help
[BL SOURCE CODE/REFERENCE] Building related functions
Shift Kitty:
They all used eval and had a way of manipulating it to run code.
phflack:
I guess that's one way to force an addon to be updated
Shift Kitty:
--- Quote from: phflack on November 19, 2017, 10:24:31 PM ---I guess that's one way to force an addon to be updated
--- End quote ---
The functions cannot be overwritten. So yeah, they'd have to be changed in an update. Hopefully not making the same mistake again.
There's crapon name for when something needs to go.
There's crapon crc so that people don't just rename it. But of course, people could just change the description (i think) to get around that if they really want.
Then for real serious stuff, there's breaking the function from existing entirely, so that people will stop doing dumb stuff to get backdoored add-ons to work on their servers.
mctwist:
--- Quote from: Tendon on November 19, 2017, 06:34:18 PM ---I've no idea why those RP functions are broken like that, but whatever.
--- End quote ---
--- Quote from: Shift Kitty on November 19, 2017, 10:20:21 PM ---They all used eval and had a way of manipulating it to run code.
--- End quote ---
--- Quote from: Shift Kitty on November 20, 2017, 12:27:18 AM ---The functions cannot be overwritten. So yeah, they'd have to be changed in an update. Hopefully not making the same mistake again.
[...]
Then for real serious stuff, there's breaking the function from existing entirely, so that people will stop doing dumb stuff to get backdoored add-ons to work on their servers.
--- End quote ---
That is RP Core. All those four functions had eval in it. The first one was obvious and I removed it due to that. The other three was perfectly fine, unless some other Add-On modified its variables to make it look like RP Core was the culprit.
I am well aware that I should have handled it differently, but at the time I was taken by surprise when Badspot suddenly pulled the plug without even giving a reason for it. I had a discussion with Iban about it as well, and now, 7 years later, I understand why he was bothered by it. However, I am really annoyed how both reacted instead of trying to help to fix it. For instance, there is this these handful of magic functions that will help with making data for eval work better:
--- Code: ---expandEscape
getSafeVariableName
--- End code ---
I didn't know them at the time, and no one told me about it either. Everyone expects new scripters to be an expert as everyone else. If you don't, then they are going to punch you so hard that you wont script anything ever again. I could add more, but that belongs to Drama.
phflack:
I've never heard of those functions before
that would be useful to know