kameloso.plugins.services.persistence

The Persistence service keeps track of all encountered users, gathering as much information about them as possible, then injects them into IRCEvents when information about them is incomplete.

This means that even if a service only refers to a user by nickname, things like its ident and address will be available to plugins as well, assuming the Persistence service had seen that previously.

It has no commands.

Members

Classes

PersistenceService
class PersistenceService

The Persistence service melds new IRCUsers (from post-processing new IRCEvents) with old records of themselves.

Functions

initAccountResources
void initAccountResources(PersistenceService service)

Reads, completes and saves the user classification JSON file, creating one if one doesn't exist. Removes any duplicate entries.

initHostmaskResources
void initHostmaskResources(PersistenceService service)

Reads, completes and saves the hostmasks JSON file, creating one if it doesn't exist.

initResources
void initResources(PersistenceService service)

Initialises the service's hostmasks and accounts resources.

onNamesReply
void onNamesReply(PersistenceService service, IRCEvent event)

Catch users in a reply for the request for a NAMES list of all the participants in a channel.

onNick
void onNick(PersistenceService service, IRCEvent event)

Removes old user entries when someone changes nickname. The old nickname no longer exists and the storage arrays should reflect that.

onQuit
void onQuit(PersistenceService service, IRCEvent event)

Removes a user's IRCUser entry from the users associative array of the current PersistenceService's IRCPluginState upon them disconnecting.

onWelcome
void onWelcome(PersistenceService service)

Reloads classifier definitions from disk.

onWhoReply
void onWhoReply(PersistenceService service, IRCEvent event)

Catch users in a reply for the request for a WHO list of all the participants in a channel.

postprocess
void postprocess(PersistenceService service, IRCEvent event)

Hijacks a reference to a IRCEvent after parsing and fleshes out the IRCEvent.sender and/or IRCEvent.target fields, so that things like account names that are only sent sometimes carry over.

postprocessCommon
void postprocessCommon(PersistenceService service, IRCEvent event)

Postprocessing implementation common for service and hostmasks mode.

reload
void reload(PersistenceService service)

Reloads the service, rehashing the user array and loading admin/staff/operator/elevated/whitelist/blacklist classifier definitions from disk.

reloadAccountClassifiersFromDisk
void reloadAccountClassifiersFromDisk(PersistenceService service)

Reloads admin/staff/operator/elevated/whitelist/blacklist classifier definitions from disk.

reloadHostmasksFromDisk
void reloadHostmasksFromDisk(PersistenceService service)

Reloads hostmasks definitions from disk.

See Also

Meta