1
0
mirror of https://github.com/craigerl/aprsd.git synced 2025-09-03 21:57:47 -04:00
aprsd/aprsd/plugins/version.py
Hemna af48c43eb2 Added tracing facility
You can enable debug tracing iff loglevel == DEBUG AND
config file has aprsd:trace:True
2021-01-29 10:07:49 -05:00

24 lines
540 B
Python

import logging
import aprsd
from aprsd import plugin, trace
LOG = logging.getLogger("APRSD")
class VersionPlugin(plugin.APRSDPluginBase):
"""Version of APRSD Plugin."""
version = "1.0"
command_regex = "^[vV]"
command_name = "version"
# message_number:time combos so we don't resend the same email in
# five mins {int:int}
email_sent_dict = {}
@trace.trace
def command(self, fromcall, message, ack):
LOG.info("Version COMMAND")
return "APRSD version '{}'".format(aprsd.__version__)