From 20ca1cf66123c110cc14aa452a840e5f62cd74ff Mon Sep 17 00:00:00 2001
From: fusion32 <marcopuzziello@gmail.com>
Date: Tue, 5 Aug 2025 03:39:51 -0300
Subject: store world hostname and resolve at runtime

---
 sql/schema.sql | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

(limited to 'sql/schema.sql')

diff --git a/sql/schema.sql b/sql/schema.sql
index 90f59a8..18fabd9 100644
--- a/sql/schema.sql
+++ b/sql/schema.sql
@@ -5,10 +5,7 @@ CREATE TABLE IF NOT EXISTS Worlds (
 	Name TEXT NOT NULL COLLATE NOCASE,
 	Type INTEGER NOT NULL,
 	RebootTime INTEGER NOT NULL,
-	IPAddress INTEGER NOT NULL,
-	-- TODO(fusion): Have some hostname resolution cache and send the resolved
-	-- addresses instead of hardcoding them into the database.
-	--Host TEXT NOT NULL,
+	Host TEXT NOT NULL,
 	Port INTEGER NOT NULL,
 	MaxPlayers INTEGER NOT NULL,
 	PremiumPlayerBuffer INTEGER NOT NULL,
@@ -268,9 +265,9 @@ CREATE TABLE IF NOT EXISTS OnlineCharacters (
 
 -- REMOVE(fusion): Testing Data.
 --==============================================================================
-INSERT INTO Worlds (WorldID, Name, Type, RebootTime, IPAddress, Port, MaxPlayers,
+INSERT INTO Worlds (WorldID, Name, Type, RebootTime, Host, Port, MaxPlayers,
 					PremiumPlayerBuffer, MaxNewbies, PremiumNewbieBuffer)
-	VALUES (1, 'Zanera', 0, 5, 0x7F000001, 7172, 1000, 100, 300, 100);
+	VALUES (1, 'Zanera', 0, 5, 'localhost', 7172, 1000, 100, 300, 100);
 
 -- 111111/tibia
 INSERT INTO Accounts (AccountID, Email, Auth)
-- 
cgit v1.2.3

