The handler now, instead of returning Registration,
sets the Client's internal ClientState.
This means useful state info is more readily-available to handlers.
Updated examples to match.
Rewrites SaslLogic, which now outputs into a SecretBuf and
reports the name of the mechanism in use instead of Sasl.
The Sasl trait now returns a Vec of SaslLogics.
Adds a Password authenticator to auth using PLAIN
(or, in the future, SCRAM).
The SASL handler now processes a whole SaslQueue.
Removes Authenticate and implements MakeHandler on
names::cmd::AUTHENTICATE instead.
Simplifies the registration handler thanks to these changes.
Secrets can now be loaded during deserialization of a struct containing them
(e.g. Options). They are also typed more-strongly.
Adds SecretBuf, a mutable buffer for containing sensitive data
before constructing a Bytes from it.
Sasl::logic is now infallible, as secrets are supposed to have been loaded
earlier.
The password-retrieval function in Register is now infallible.
As such, Register's handler construction now uses the Infallible error type.
RFC 1216 will hopefully be stabilized at some point soon.
Adds CString conversions to NoNul and friends.
Removes zeroize as a feature and optional dependency.
We'll just write_volatile directly.
Oftentimes the channel spec isn't going to change frequently,
so it becomes fairly redundant as a parameter on Client::add.
This alters the Client creation functions to include the channel spec,
as well as adding a type parameter to Client for it.
Also removes new_client as it's basically pointless.
Client is now Send (but not Sync yet).
The new implementation of the oneshot channel has cloneable senders
and is Send for non-Sync values.
Non-consuming read-only access to the contained value via peek
is now behind an explicit T: Sync requirement.
Renames Receiver::recv_nonblocking to Receiver::recv_now to be more accurate.
Moves the modules in channel to their own files.
Adds `oneshot` as essentially wrapped `Arc<OnceLock>`s,
but with a nicer interface and weak references on the sender side.
The senders can be cloned for usecases where one only cares about the first
operation to complete.
Adds `parker` for thread-parking, allowing the oneshot channels to block.
Very untested at the moment.
Changes the receiver type on Sender from `Arc<Self>` to `&mut Self`.
Also changes `ChannelSpec` and `*::make_channel` to match.
`Arc`s are not structural and oneshot-type channels really want to consume
the sender, which is quite clumsy when everything is an `Arc`.
Instead, `Sender` is impl'd for `Option`s containing oneshot senders.
This is for parsing of messages after they're ClientMsgs/ServerMsgs.
Adds the WIP TargetedMsg for messages that are sent to specific targets.
Implements NameValued for a few message types using TargetedMsg.
Adds the YieldParsed handler for convenient extraction of specific messages.
Adds an example using these features!
TagMaps are a way of mapping Tags to lazily-parsed values.
Additional information can be stored alongside the "natural" value for a tag.
This commit makes changes to FlatMap to support this new type.
Migrates ISUPPORT tokens to the new system,
and removes the serverinfo module (including ISupportParser).
Adds a module for common IRCv3 capabilities.
Also adds a public way to get SASL mechanisms out of the capability string.
Changes capabilities and ISUPPORT in Registration to use TagMaps.
This has particular benefits for capabilities, as now consumers of vinezombie
have access to info about unrequested capabilities.
Tag as in "tagged union", not as in "IRCv3 message".
This lays the foundation for using something like what ISUPPORT handling does,
but for other classes of tags.
Will migrate ISUPPORT to this later.
Completely reworked nick generation AGAIN.
We now parse RPL_ISUPPORT and RPL_BOUNCE (both of them)!
The reg handler also now waits until the MOTD to finish.
The `MakeHandler` that creates a registration handler is now `Features`,
a struct that is used to extract information from an options struct.
Renamed `Register` to `Options` and trimmed it down a little.
Used by the `Features` that replace `ClientDefaults` and `BotDefaults`.
Changed default behaviors for connection registration.
Silly hashing for the Ping handler and elsewhere now uses SipHash.
Further testing necessary,
but this system should be VASTLY more flexible than what existed prior.
Also adds some cheeky labeled-response support to Queue.
Also removes the logging from ircmsg and moves it to Client.
Renames TlsConfig -> TlsConfigOptions.
Adds a type alias for Arc<ClientConfig> named TlsConfg.
connect and connect_tokio now take a function that fallibly returns a
TlsConfg. This allows for lazy TlsConfig construction that previously
wasn't convenient to do.
Fixes deprecation warning due to use of with_single_cert.
Moved capability options into Register.
This was originally kept seperate due to being especially
application-specific (where most of Register's other options aren't),
but ultimately this way is tidier, and applications can always
change caps before calling handler.
nicks is now a struct containing nickgen (as "gen").
This should make things a bit tidier.
Added an option to skip attempting to use the first nick.
Useful for having the first nick exclusively as a fallback,
or just jumping directly to generated nicks.
The abstractions are nowhere near done,
but vinezombie is useful as a plain IRC library despite that.
This commit removes the WIP state and update modules,
reorganizes some code and feature flags to make more sense,
and updates documentation to match.
The WIP abstractions will get their own library.
Breaking: Removes client::tls::connect.
Use client::conn::ServerAddr::connect instead,
which returns a wrapper that is more-generally-convenient to work with.