blob: 45327e80e1cf4df8d4d570f114ef4f38b0922111 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
class_name ClientInfo
var file: String
func _init(file_path: String) -> void:
file = FileAccess.get_file_as_string(file_path)
func get_address() -> String:
var regex := RegEx.create_from_string("<address>(.*)<\\/address>")
return regex.search(file).get_string(1)
func get_port() -> int:
var regex := RegEx.create_from_string("<port>(.*)<\\/port>")
return regex.search(file).get_string(1) as int
|