Closed WinterPhoenix closed 3 years ago
Same with gui.OpenURL?
It doesn't have to be a think hook. Just stack some connection attempts. The more attempts the more you have to spam the yes or no button to make the popup go away.
gui.OpenURL()
isn't effected.
for i=1,100 do LocalPlayer():ConCommand'connect srv.ip' end
It doesn't have to be a think hook. Just stack some connection attempts. The more attempts the more you have to spam the yes or no button to make the popup go away. gui.OpenURL() isn't effected.
That's simply not true. They are literally using the exact same system. The previous confirmation gets discarded every time a new one is sent to the player.
That being said, it should be better now on Dev, x86-64 will receive this shortly as well.
Added "Disconnect" button to the openurl/connect confirmation dialogs
openurl/connect confirmation dialog is more resistive to spam, the "Yes" button is initially disabled for 2 seconds
openurl/connect confirmation dialog is more resistive to spam, the "Yes" button is initially disabled for 2 seconds
Wait.. what?
?
Why does it need to be disabled initially for 2 seconds?
So you don't click on it accidentally.
Fair enough.
It also helps with sneaky fucks who'd send you a different link like 1 second after sending you the initial confirmation.
That's simply not true. They are literally using the exact same system. The previous confirmation gets discarded every time a new one is sent to the player.
On the build listed by @WinterPhoenix you still have to click more than once which does not happen with gui.OpenURL()
see here
Is that in Singleplayer or Multiplayer?
multiplayer
Details
Protocol version 24 Exe version 2020.10.14 (garrysmod) Exe build: 17:22:36 Nov 2 2020 (7881) (4000) GMod version 2020.11.09, branch: x86-64, multicore: 1 Windows 64bit
Steps to reproduce
lua_run Entity(1):SendLua([[hook.Add("Think", "whoops", function() LocalPlayer():ConCommand("connect someserverip") end)]])
Actual behavior
GMOD: Swallowing input due to a modal panel!
Expected behavior
This bug was discovered due to some 6+ year old code as part of a hook in one of my gamemodes that handles auto-rejoin. The code assumed Think exits immediately after the connect command is run.
I'm aware that it was poorly written, but I can't be the only one.