We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4802010 commit e49da8fCopy full SHA for e49da8f
server.py
@@ -209,8 +209,9 @@ def checkRequest(server):
209
if data[1] == "bool" and type(server[name]).__name__ == "str":
210
server[name] = True if server[name].lower() in ("true", "1") else False
211
continue
212
- # clients_max was sent as a string instead of an integer
213
- if name == "clients_max" and type(server[name]).__name__ == "str":
+ # Accept strings in integer fields but convert it to an
+ # integer, for interoperability with e.g. minetest.write_json.
214
+ if data[1] == "int" and type(server[name]).__name__ == "str":
215
server[name] = int(server[name])
216
217
#### End compatibility code ####
0 commit comments