Skip to content

Commit c9de2a3

Browse files
Small bugfix
- Fixed error when inserting the server into the database
1 parent dd01fa0 commit c9de2a3

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

addon.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"README.md",
1313
"*.sql",
1414
".git/*",
15-
".git"
15+
".git*",
16+
".vscode*"
1617
]
1718
}

lua/msync/server/sv_mysql.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,14 +153,14 @@ function MSync.mysql.saveServer()
153153
]] )
154154

155155
local hostname = GetHostName()
156-
local ip, port = string.Split(game.GetIPAddress(), ":")
156+
local gameAddress = string.Split(game.GetIPAddress(), ":")
157157

158158
if string.len(hostname) > 75 then
159159
hostname = string.sub( hostname, 1, 75 )
160160
end
161161
addServer:setString(1, hostname)
162-
addServer:setString(2, ip)
163-
addServer:setString(3, port)
162+
addServer:setString(2, gameAddress[1])
163+
addServer:setString(3, gameAddress[2])
164164
addServer:setString(4, MSync.settings.data.serverGroup)
165165

166166
function addServer.onSuccess()

0 commit comments

Comments
 (0)