1
0
mirror of https://github.com/DigitalDevices/octonet.git synced 2023-10-10 13:36:52 +02:00

Prefix checking on customized server names changed

This commit is contained in:
mvoelkel 2017-03-14 21:49:57 +01:00
parent 17af2f85c8
commit 1c42bee27f
2 changed files with 4 additions and 2 deletions

View File

@ -40,8 +40,9 @@ function GetBoxName()
local boxname = ""
local tmp = io.open("/config/boxname")
if tmp then
local pat = "OctopusNet:";
boxname = tmp:read("*l")
boxname = boxname:gsub("OctopusNet:","",1);
boxname = boxname:gsub(pat:gsub(".","%."),"",1);
tmp:close()
end
return boxname

View File

@ -74,8 +74,9 @@ function GetBoxName()
local boxname = ""
local tmp = io.open("/config/boxname")
if tmp then
local pat = "OctopusNet:";
boxname = tmp:read("*l")
boxname = boxname:gsub("OctopusNet:","",1);
boxname = boxname:gsub(pat:gsub(".","%."),"",1);
tmp:close()
end
return boxname