- Just import `birchwood.config` package rather
- Call `setDefaults(this.connInfo)` to assign default `db` values
- `nick(string)` will now fetch the maximum nickname length and ensure the provided nickname is in said bounds, if not then a `BirchwoodException` with `ErrorType` `NICKNAME_TOO_LONG` is thrown
Unit tests
- Updated unit test to test the updated value of `MAXNICKLEN` (which on BonoboNET is 30)
- Updated `string getDB(string)` to `T getDB(T)(string)` which will now attempt conversion to type `T`, on failure to do so it will return `T.init`
ConnInfo
- Added `setDefaults(ref ConnectionInfo)` which will set defaults in the `db`, namely so far it sets the `MAXNICKLEN` to `9` as per rfc1459
Package (`birchwood.config`)
- Now publically imports `setDefaults()`
- Added `nick(string)` command to allow setting of nickname
Unit tests
- Moved from `client.command(Message)` to `client.nick(string)` for setting nickname
- `getDB(string)` will now throw `BirchwoodException` with `ErrorType.DB_KEY_NOT_FOUND` if the key is not found
Exceptions
- Added member `DB_KEY_NOT_FOUND` to `ErrorType` enum
- Added a `string[string]` key-value pair named `db` to hold the parameters learnt from `RPL_ISUPPORT`s
- Added `updateDB(string, string)` to add an entry to the `db`
- Added `getDB(string)` to fetch a value from the `db` (if it doesn't exist then an empty string `""` is returned)
- Don't make this member appear in docs (hopefully) - by marking it as `package
Messages
- Don't make this member appear in docs (hopefully) - by marking it as `package
- Added new `ErrorType` enum member `INVALID_FORMATTING`
Formatting
- All formatting functions will now throw a `BirchwoodException` instead of a `StringException` on invalid formatting parameters
- Added TODO for import `std.string`
- Added documentation to `SimpleColor` enum
- Added documentation and code-styled `reset_fg_bg()`, `bold(string)`, `italics(string)`, `underline(string)`, `strikethrough(string)` and `monospace(string)`
- Made the `connInfo` field `package` level
- Made the `connInfo` field `shared` meaning access to teh variable (updating the "slot", a.k.a. what struct is stored there) will use a lock
- Updating anything within the struct will use a lock (besides `addrInfo` after returning from `getAddr()`)
- This ensures we can have runtime updates safely
- Added documentation to the constructor
- Added TODO for the destructor
- Re-added `getConnInfo()`
- This practice is good for cases we want to update the struct, as getting it via a function would return a copy
ConnInfo
- `ConnectionInfo` struct must now be marked as `shared` due to `Client.connInfo` being marked as such
- We cast from `shared Address` to `Address` because I don't think there is a lot of mutable data in this anyways (subject to change)
Sender
- The `SenderThread` will now access the client's connection info via the field name (`connInfo`), rather than getting a copy of the struct and then fetching the fakelag