2020-12-12 15:53:06 -05:00
|
|
|
import logging
|
|
|
|
|
|
|
|
from aprsd import plugin
|
|
|
|
|
2021-08-23 12:14:19 -04:00
|
|
|
|
2020-12-12 15:53:06 -05:00
|
|
|
LOG = logging.getLogger("APRSD")
|
|
|
|
|
|
|
|
|
2022-12-18 08:52:58 -05:00
|
|
|
class HelloPlugin(plugin.APRSDRegexCommandPluginBase):
|
2020-12-12 15:53:06 -05:00
|
|
|
"""Hello World."""
|
|
|
|
|
|
|
|
version = "1.0"
|
|
|
|
# matches any string starting with h or H
|
|
|
|
command_regex = "^[hH]"
|
2020-12-13 21:31:01 -05:00
|
|
|
command_name = "hello"
|
2020-12-12 15:53:06 -05:00
|
|
|
|
2023-05-19 18:53:15 -04:00
|
|
|
def process(self, packet):
|
2020-12-12 15:53:06 -05:00
|
|
|
LOG.info("HelloPlugin")
|
2022-12-18 08:52:58 -05:00
|
|
|
reply = f"Hello '{packet.from_call}'"
|
2020-12-12 15:53:06 -05:00
|
|
|
return reply
|