diff --git a/source/birchwood/config/conninfo.d b/source/birchwood/config/conninfo.d index c9d01f0..934fc98 100644 --- a/source/birchwood/config/conninfo.d +++ b/source/birchwood/config/conninfo.d @@ -40,6 +40,12 @@ public shared struct ConnectionInfo */ public const string quitMessage; + /** + * Key-value pairs learnt from the + * server + */ + private string[string] db; + /* TODO: before publishing change this bulk size */ /** @@ -116,6 +122,26 @@ public shared struct ConnectionInfo this.fakeLag = fakeLag; } + public void updateDB(string key, string value) + { + db[key] = value; + } + + public string getDB(string key) + { + // TODO: Do existence check + if(key in db) + { + return db[key]; + } + else + { + // TODO: Should throw an exception + return ""; + } + } + + /** * Creates a ConnectionInfo struct representing a client configuration which * can be provided to the Client class to create a new connection based on its