establishUserInCache

Fetches a user from the cache, creating it first if it doesn't exist by assigning it to the passed user.

version(WithPersistenceService)
private
establishUserInCache

Parameters

service PersistenceService

The current PersistenceService.

user IRCUser

The user to fetch.

channelName string

The channel context from which to fetch a user.

createIfNoneExist bool

Whether to create the user if it doesn't exist.

foundExisting bool

out-parameter, set to true if the user was found in the cache; false if not.

Return Value

Type: auto

A pointer to an IRCUser in the cache. If none was found and createIfNoneExist is true, the user will have been created and the return value will be a pointer to it. If none was found and createIfNoneExist is false, the return value will be null.

See Also