Merge pull request #11404 from farie82/popup-limiter-fix

Fixes some edge cases for the popup limiting
This commit is contained in:
variableundefined
2019-04-29 22:29:33 +08:00
committed by GitHub
+7 -2
View File
@@ -113,9 +113,14 @@
/proc/typing_input(mob/user, message = "", title = "", default = "")
if(user.client.checkTyping()) // Prevent double windows
return null
user.client.typing = TRUE
var/client/C = user.client // Save it in a var in case the client disconnects from the mob
C.typing = TRUE
var/msg = input(user, message, title, default) as text|null
user.client.typing = FALSE
if(!C)
return null
C.typing = FALSE
if(!user || C != user.client) // User got out of the mob for some reason or the mob is gone
return null
return msg
//Filters out undesirable characters from names