allow domain names as ip input

This commit is contained in:
tommy 2024-01-23 16:34:09 -05:00
parent cec36522d1
commit 3d9c955718
No known key found for this signature in database
GPG Key ID: AF3CD89B80478500

View File

@ -27,7 +27,7 @@ Commands:Add('setip',{},'set ip for status',function(CommandData)
return CommandMessage:reply('No IP provided')
end
local ServerIP=ServerIPStr:match("(%d+%.%d+%.%d+%.%d+)")
local ServerIP=ServerIPStr:match("(%d+%.%d+%.%d+%.%d+)") or ServerIPStr:match("(%w*%.?%w+%.%w+)")
if not ServerIP then
return CommandMessage:reply('Invalid server IP')
end