mirror of
https://github.com/Schrolli91/BOSWatch.git
synced 2025-12-06 07:42:03 +01:00
26 lines
631 B
Python
26 lines
631 B
Python
#!/usr/bin/python
|
|
# -*- coding: cp1252 -*-
|
|
|
|
import logging
|
|
|
|
from includes import globals # Global variables
|
|
from includes import pluginloader
|
|
|
|
def throwAlarm(typ,freq,data):
|
|
logging.debug("[ ALARM ]")
|
|
for name, plugin in globals.pluginList.items():
|
|
logging.debug("call Plugin: %s", name)
|
|
plugin.run(typ,freq,data)
|
|
logging.debug("[END ALARM]")
|
|
|
|
|
|
def loadPlugins():
|
|
try:
|
|
#load plugins
|
|
logging.debug("loading plugins")
|
|
for i in pluginloader.getPlugins():
|
|
plugin = pluginloader.loadPlugin(i)
|
|
globals.pluginList[i["name"]] = plugin
|
|
|
|
except:
|
|
logging.exception("cannot load Plugins") |