BOSWatch/includes/alarmHandler.py
JHCD 72ef930c7f simple filter for pocsag
- implement allow-/deny-list
- move rangefilter

restructure config.ini to follow code-structure
implemented switch to turn on/off regEx-filter
2015-05-24 21:24:26 +02:00

22 lines
686 B
Python

#!/usr/bin/python
# -*- coding: cp1252 -*-
import logging
from includes import globals # Global variables
def processAlarm(typ,freq,data):
logging.debug("[ ALARM ]")
for pluginName, plugin in globals.pluginList.items():
#if enabled use RegEx-Filter
if globals.config.getint("BOSWatch","useRegExFilter"):
from includes import filter
if filter.checkFilters(data,typ,pluginName):
logging.debug("call Plugin: %s", pluginName)
plugin.run(typ,freq,data)
logging.debug("return from: %s", pluginName)
else:
logging.debug("call Plugin: %s", pluginName)
plugin.run(typ,freq,data)
logging.debug("return from: %s", pluginName)
logging.debug("[END ALARM]")