- Defined as the mode describes how birchwood will act when encounterin invalid characters that were provided BY the user TO birchwood
ConnectionInfo
- Use `ChecksMode.EASY` by default
- Catch more specific exception, `FatalException` rather than `SnoozeError`
- Adjusted error message printed out in unittest-builds on occurence of such an exception
Sender
- Catch more specific exception, `FatalException` rather than `SnoozeError`
- Adjusted error message printed out in unittest-builds on occurence of such an exception
- When `wait()` has an `InterruptedException` then go back to the loop again (retry the `wait()`)
- On `SnoozeError` (for now) we also do the same even though we should stop the loop
Receiver
- When `wait()` has an `InterruptedException` then go back to the loop again (retry the `wait()`)
- On `SnoozeError` (for now) we also do the same even though we should stop the loop
Dub
- Upgraded to `libsnooze` version `1.0.0-beta`
- Made field `nickname` public
- Added public fields `username` and `realname`
- Updated constructor to take in additional parameters `username` and `realname`
Client
- Calling `connect()` on a `Client` object will now call `doAuth()` which will do `/NICK` and `/USER` for you automatically (no need to do it manually anymore)
- The newly added `doAuth()` will take `hostname=username` from `connInfo.username`, it will set `servername` to `"bogus.net"` and `realname==connInfo.realname`
- Added `user(username, hostname, servername, realname)`
- 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
- Commented all of `BirchwoodException`
- Moved `ErrorType` up to the module-level
- Documented `ErrorType` and all of its member enums
Client
- Fixed usage of `ErrorType`
ConnInfo
- Documented `ConnectionInfo`
- Fixed usage of `ErrorType`