1
0
mirror of https://github.com/craigerl/aprsd.git synced 2026-06-11 02:18:40 -04:00
Files
aprsd/examples/plugins/example_plugin.py
T

21 lines
405 B
Python
Raw Normal View History

2020-12-12 15:53:06 -05:00
import logging
from aprsd import plugin
2020-12-12 15:53:06 -05:00
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"
2020-12-12 15:53:06 -05:00
def command(self, fromcall, message, ack):
LOG.info("HelloPlugin")
reply = f"Hello '{fromcall}'"
2020-12-12 15:53:06 -05:00
return reply