Class: Lich::Common::UpstreamHook Private

Inherits:
Object
  • Object
show all
Extended by:
HookRegistry
Defined in:
documented/common/upstreamhook.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Registry for hooks that intercept and transform text flowing from the game server to the client.

Upstream hooks receive each line of unprocessed server output and may modify or suppress it. Script-scoped hooks are automatically removed when a script dies; persistent hooks remain active.

Class Method Summary collapse

Methods included from HookRegistry

add, cleanup_on_death, hook_sources, list, remove, sources

Class Method Details

._hook_ownersHash

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns the registry of script owners for upstream hooks.

Returns:

  • (Hash)

    maps hook keys to their owning script object IDs



42
43
44
# File 'documented/common/upstreamhook.rb', line 42

def self._hook_owners
  @@upstream_hook_owners
end

._hook_persistHash

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns the registry of persistence flags for upstream hooks.

Returns:

  • (Hash)

    maps hook keys to boolean persistence flags



50
51
52
# File 'documented/common/upstreamhook.rb', line 50

def self._hook_persist
  @@upstream_hook_persist
end

._hook_sourcesHash

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns the registry of script sources for upstream hooks.

Returns:

  • (Hash)

    maps hook keys to their defining scripts



34
35
36
# File 'documented/common/upstreamhook.rb', line 34

def self._hook_sources
  @@upstream_hook_sources
end

._hooksObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Per-class storage for the shared HookRegistry methods.



26
27
28
# File 'documented/common/upstreamhook.rb', line 26

def self._hooks
  @@upstream_hooks
end