mirror of
https://github.com/craigerl/aprsd.git
synced 2024-11-17 22:01:49 -05:00
19 lines
385 B
Python
19 lines
385 B
Python
|
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]"
|
||
|
|
||
|
def command(self, fromcall, message, ack):
|
||
|
LOG.info("HelloPlugin")
|
||
|
reply = "Hello '{}'".format(fromcall)
|
||
|
return reply
|