- 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`
- Added `ppPairs` and `getPairs()` which returns a `string[]` of all parameters (excluding trailing)
- Implemented usage of new `splitter(string, ref bool)`
- The `splitter()` function now sets a flag if there is a trailer
Unit tests
- Updated unit test to use new `splitter(string ref bool)`
- Added work-in-progress `parameterParse()` which attempts to parse parameters and trailing text (if any of both)
- Added `ppTrailing` for any possible trailing text
- Added `ppKVPairs` for any potential key-value pairs
- Call `parameterParse()` on initialization of a new `Message` object
- Segmented into sections based on rfc
- Added a few new constants from RFC2812
- `RPL_BOUNCE` (`005`) is a numeric response to note as it has key-value pairs associated with it
- Parse all messages into a `Message` array (`SList`)
- If a PING is found then we put it aside and check if we have one and then reply
- The PING is removed and all normal messages remain and then get EVenty events triggered for them for `IRCEvent`
- Set default `fakeLag` to `1`
- Added `getFakeLag()` and `setFakeLag()`
Client
- Added `getConnInfo()` to return the client's associated `ConnectionInfo`
Sender
- Use the fakelag configured by user
- Updated `command(Message)` to use `sendMessage(Message)`
- Updated the `PongSignal` event handler to use `sendMessage(Message)` when sending the pong back
- Make `quit()` use the new `sendMessage(Message)`
- Disabled old `sendMessage(string)`
- Updated `joinChannel(string)` to use `sendMessage(Message)`
- Added TODO relating to implementing `joinChannels(string[])`
- `leaveChannel(string[])` now uses the new `sendMessage(Message)`
- `leaveChannel(string)` now uses the new `sendMessage(Message)`
- Fixed compilation error by adding missing `encodeMessage(string)` call
- If the encoded message (CRLF included) is over 512 bytes then throw an exception
Exceptions
- Added new `ErrorType` enum member
- Fixed a possible bug whereby the `Receiver` and `Sender` may exit on start as they get to their `client.running` read before the main thread gets to setting `running = true`
- Removed unused import
- Added comment for future work
- Fixed typo
Receiver
- Added commented out code for future work
Sender
- Added commented out code for future work
- On call to `rq(byte[])` by the `Client` thread wake up the `Receiver` thread
- Added a TODO about the first call to `notifyAll()`
- Added a `wait()` call
- Removed `yield()` calls
Sender
- On call to `sq(byte[])` by the `Client` thread wake up the `Sender` thread
- Added a TODO about the first call to `notifyAll()`
- Added a `wait()` call
- Removed `yield()` calls
Client
- Ensure we wake up the `Receiver` and `Sender` threads such that they don't hang on their calls to `wait()`
- Added a TODO comment
- Moved `IRCEventType`, `IRCEvent` and `PongEvent` to a new module `events`
Client
- Removed old `recvQueue`, `sendQueue`, their respective locks and threads
- Removed any initializations of the aforementioned
- Added calls to start the `ReceiverThread` and `SenderThread` on call to `connect()`
- Updated `disconnect()`, `sendMessage(string)` and `receiveQ(ubyte[])` to use the new `ReceiverThread` and `SenderThread`
Receiver
- Added missing import
- Updated imports
- Moved `IRCEvent`, `IRCEventType` and `PongEvent` outside of the `Client` class
- Made `engine`, `running` and `socket` package-level accessible
Package
- Fixed package for `client`
Main package
- Updated public imports for the `birchwood` package
- Fixed conflicting symbol name `Event` arising from the use of `Eventy` and `libsnooze`
- Initialize the libsnooze event
- Initialize the queue mutex
- Set the thread's worker function
Sender
- Fixed conflicting symbol name `Event` arising from the use of `Eventy` and `libsnooze`
- Initialize the libsnooze event
- Initialize the queue mutex
- Set the thread's worker function
Protocol
- Moved module `message` to new package `protocol`
- Moved module `constants` to new package `protocol`
- Fixed bug with `directMessage(string, string[])` when more than one user in a multi-case was passed in
Unit tests
- Added two more unit tests relating to direct messages
- Namely testing out two scenarios for `directMessage(string, string[])`
- Added missing `dur` import
Sender
- Added missing `dur` import
Exceptions
- Moved exceptions to its own module
Core/Client
- Renamed to `client`
Package
- Updated import for `client` module
- Added import of `BirchwoodException`
- Added import of `ConnectionInfo`
Conninfo
- Moved `ConnectionInfo` to its own module
- Fixed bug whereby the leaving of multiple channels broke after the first channel in `leaveChannel(string[])`
Unit tests
- Test leaving multiple channels, a single channel (singular) and a single channel (multi)
- Test `directMessage(string, string)` (so singular) to send to myself
- Adding such a test will test the direct message receive handler which helps us a lot in increasing code coverage
- Fixed bug in `channelMessage(string, string[])` in the case where multiple channels were specified then the message would fail to send to the channels after the first one specified
Unit tests
- Disabled using `command(string, string, string)` to join a channel, rather use `joinChannel(string)`
- Added tests for singular `channelMessage(string, string[])` and multiple `channelMessage(string, string[])`
- Added imports
- Added a receive queue with a corresponding mutex
- Added a field to hold the associated `Client` object
Send
- Added imports
- Added a send queue with a corresponding mutex
- Added a field to hold the associated `Client` object
- Fixed bug within `channelMessage(string,string[])` which would leave the channel provided instead of sending the message provided to the the channel provided as it called `leaveChannel(channel[0])` instead of `channelMessage(string, string)`
- Added a field of type `Event` to hold a libsnooze object representing when a new message has been received and is to be processed
Sender
- Added a field of type `Event` to hold a libsnooze object representing when a new message is to be sent and is to be processed