1
0
mirror of https://github.com/craigerl/aprsd.git synced 2025-03-08 04:18:59 -05:00
aprsd/examples/plugins/example_plugin.py
Hemna 4c0150dd97 Added more pre-commit hook tests
also added pre-commit job for tox.
2021-01-08 20:57:58 -05:00

21 lines
436 B
Python

# -*- coding: utf-8 -*-
import logging
from aprsd import plugin
LOG = logging.getLogger("APRSD")
class HelloPlugin(plugin.APRSDPluginBase):
"""Hello World."""
version = "1.0"
# matches any string starting with h or H
command_regex = "^[hH]"
command_name = "hello"
def command(self, fromcall, message, ack):
LOG.info("HelloPlugin")
reply = "Hello '{}'".format(fromcall)
return reply