pandorabox-io / pandorabox.io

Pandorabox infrastructure code
https://pandorabox.io
31 stars 4 forks source link

Hangglider protection message spamming #377

Closed SwissalpS closed 4 years ago

SwissalpS commented 4 years ago

When flying through an area, without flak, owned by another player, the chat is spammed with messages. I have failed to reproduce on my test-server. Only see this on pandorabox.io

thomasrudin commented 4 years ago

Only see this on pandorabox.io

interesting :confused:

OgelGames commented 4 years ago

I was able to replicate it on my test server; it only happens when in an area protected by a protection block, not for those protected by areas.

The spam is caused by this call to minetest.is_protected(): https://notabug.org/Piezo_/minetest-hangglider/src/master/init.lua#L155, and the messages come from here: https://notabug.org/TenPlus1/protector/src/master/init.lua#L239

Not quite sure how to fix it though, other than adding a timer so that the message is sent less often, just to get rid of the spamming.

thomasrudin commented 4 years ago

I'm not sure about a solution either but IMO the chat message is a very weird side-effect for a function that should just check the protection... :/

Maybe a third parameter in minetest.is_protected() that specifies the log level or something but that feels hacky and involves changing engine code if done properly.

EDIT: now that i think of it: the digtron has the same issues if you drive into protected areas if i remember correctly. This looks like a global issue...

thomasrudin commented 4 years ago

Upstream issue: https://notabug.org/TenPlus1/protector/issues/17

int-ua commented 4 years ago

Using public workshop machines is also affected.

BobFred7 commented 4 years ago

I don't think flak is actually used much on this server, so maybe we could cut out hangglider init.lua lines 155 to 163 as a temporary solution while we wait for TenPlus1 to deal with the flaws in protector?

thomasrudin commented 4 years ago

I don't think flak is actually used much on this server, so maybe we could cut out hangglider init.lua lines 155 to 163 as a temporary solution while we wait for TenPlus1 to deal with the flaws in protector?

I'd rather like to fix the protector mod instead with the above solution, lets see if Tenplus1 sees the issue...

BobFred7 commented 4 years ago

temporary solution

while we wait for TenPlus1

But okay

S-S-X commented 4 years ago

Removed "waiting" label as this can be now fixed at https://github.com/S-S-X/protector repo and can try to merge stuff to upstream later.

thomasrudin commented 4 years ago

Removed "waiting" label as this can be now fixed at https://github.com/S-S-X/protector repo and can try to merge stuff to upstream later.

@tenplus1 is aware of the issue by the way: https://notabug.org/TenPlus1/protector/issues/19

I hope we can merge that upstream again some day...

thomasrudin commented 4 years ago

@S-S-X i created a PR with your commits for the protector-tool registration: https://notabug.org/TenPlus1/protector/pulls/20

Let's see if/how 10+1 responds...