mirror of
https://github.com/BOSWatch/BW3-Core.git
synced 2026-01-22 08:30:48 +01:00
add some documentation
This commit is contained in:
parent
edb0fae58a
commit
3b7847a515
|
|
@ -19,12 +19,16 @@ import time
|
|||
|
||||
logging.debug("- %s loaded", __name__)
|
||||
|
||||
# todo check function and document + write an test
|
||||
# todo check function - write an test
|
||||
|
||||
_additionalWildcards = {}
|
||||
|
||||
|
||||
def registerWildcard(wildcard, bwPacketField):
|
||||
"""!Register a new additional wildcard
|
||||
|
||||
@param wildcard: New wildcard string with format: '{WILDCARD}'
|
||||
@param bwPacketField: Field of the bwPacket which is used for wildcard replacement"""
|
||||
if wildcard in _additionalWildcards:
|
||||
logging.error("wildcard always registered: %s", wildcard)
|
||||
return
|
||||
|
|
@ -33,6 +37,11 @@ def registerWildcard(wildcard, bwPacketField):
|
|||
|
||||
|
||||
def replaceWildcards(message, bwPacket):
|
||||
"""!Replace the wildcards in a given message
|
||||
|
||||
@param message: Message in which wildcards should be replaced
|
||||
@param bwPacket: bwPacket instance with the replacement information
|
||||
@return Input message with the replaced wildcards"""
|
||||
_wildcards = {
|
||||
# formatting wildcards
|
||||
# todo check if br and par are needed - if not also change config
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ Folgendes gilt:
|
|||
- Sobald ein Filter mit all seinen Checks besteht, wird mit der Ausführung des Routers fortgefahren
|
||||
- Sollten alle Filter fehlschlagen wird die Ausführung des Routers beendet
|
||||
|
||||
Vereinfacht kann man sagen, dass einzelnen Router ODER-verknüpft und die jeweiligen Checks UND-verknüpft sind.
|
||||
|
||||
## Resource
|
||||
`filter.regexFilter`
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue