1
0
mirror of https://github.com/craigerl/aprsd.git synced 2024-12-25 11:42:01 -05:00
aprsd/examples/plugins/example_plugin.py

20 lines
412 B
Python
Raw Normal View History

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