diff --git a/code/world.dm b/code/world.dm index dc71eed15f..43401b0c42 100644 --- a/code/world.dm +++ b/code/world.dm @@ -56,7 +56,9 @@ /world/proc/SetRoundID() if(config.sql_enabled) if(SSdbcore.Connect()) - var/datum/DBQuery/query_round_start = SSdbcore.NewQuery("INSERT INTO [format_table_name("round")] (start_datetime, server_ip, server_port) VALUES (Now(), INET_ATON('[world.internet_address]'), '[world.port]')") + + log_world("Database connection established.") + var/datum/DBQuery/query_round_start = SSdbcore.NewQuery("INSERT INTO [format_table_name("round")] (start_datetime, server_ip, server_port) VALUES (Now(), COALESCE(INET_ATON('[world.internet_address]'), 0), '[world.port]')") query_round_start.Execute() var/datum/DBQuery/query_round_last_id = SSdbcore.NewQuery("SELECT LAST_INSERT_ID()") query_round_last_id.Execute() @@ -279,4 +281,4 @@ if (features) s += ": [jointext(features, ", ")]" - status = s \ No newline at end of file + status = s