WHOISFiberDelegate

Functionality for catching WHOIS results and calling passed function aliases with the resulting account information that was divined from it, in the form of the actual IRCEvent, the target IRCUser within it, the user's account field, or merely alone as an arity-0 function.

The mixed in function to call is named enqueueAndWHOIS. It will construct the Fiber, enqueue it as awaiting the proper IRCEvent types, and issue the WHOIS query.

Members

Aliases

paramNames
alias paramNames = ParameterIdentifierTuple!(mixin (__FUNCTION__))
Undocumented in source.

Functions

enqueueAndWHOIS
void enqueueAndWHOIS(string nickname, Flag!"issueWhois" issueWhois, Flag!"background" background)

Constructs a CarryingFiber carrying a IRCEvent and enqueues it into the IRCPluginState.awaitingFibers

associative array, then issues a WHOIS query (unless overridden via the issueWhois parameter).

whoisFiberDelegate
void whoisFiberDelegate()

Reusable mixin that catches WHOIS results.

Manifest constants

hasWHOISFiber
enum hasWHOISFiber;

Flag denoting that WHOISFiberDelegate has been mixed in.

message
enum message;
Undocumented in source.
message
enum message;
Undocumented in source.
pattern
enum pattern;
Undocumented in source.
pattern
enum pattern;
Undocumented in source.

Static variables

whoisEventTypes
IRCEvent.Type[6] whoisEventTypes;

Event types that we may encounter as responses to WHOIS queries.

Variables

_kamelosoCarriedNickname
string _kamelosoCarriedNickname;

Nickname being looked up, stored outside of any separate function to make it available to all of them.

Parameters

onSuccess

Function alias to call when successfully having received account information from the server's WHOIS response.

onFailure

Function alias to call when the server didn't respond with account information, or when the user is offline.

alwaysLookup

Whether or not to always issue a WHOIS query, even if the requested user's account is already known.

Examples

void onSuccess(const ref IRCEvent successEvent) { /* ... */ }
void onFailure(const IRCUser failureUser) { /* .. */ }

mixin WHOISFiberDelegate!(onSuccess, onFailure);

enqueueAndWHOIS(specifiedNickname);

Meta