Config is now saved and synced when updated

This commit is contained in:
2020-06-07 22:47:53 -05:00
parent ab6edb7a58
commit 151df4ca57
14 changed files with 162 additions and 59 deletions

View File

@@ -8,7 +8,6 @@ module TAC
def initialize
@connection = nil
@server = nil
end
def connect(hostname = DEFAULT_HOSTNAME, port = DEFAULT_PORT, error_callback = proc {})
@@ -17,5 +16,27 @@ module TAC
@connection = Connection.new(hostname, port)
@connection.connect(error_callback)
end
def connected?
@connection && @connection.connected?
end
def client
if connected?
@connection.client
end
end
def puts(packet)
if connected?
@connection.puts(packet)
end
end
def gets
if connected?
@connection.gets
end
end
end
end