mirror of
https://github.com/craigerl/aprsd.git
synced 2025-08-06 15:22:28 -04:00
Merge pull request #68 from craigerl/plugins_multiple_msgs
Enable multiple replies for plugins
This commit is contained in:
commit
911730b28a
@ -253,6 +253,20 @@ class APRSDRXThread(APRSDThread):
|
|||||||
try:
|
try:
|
||||||
results = pm.run(packet)
|
results = pm.run(packet)
|
||||||
for reply in results:
|
for reply in results:
|
||||||
|
if isinstance(reply, list):
|
||||||
|
# one of the plugins wants to send multiple messages
|
||||||
|
found_command = True
|
||||||
|
for subreply in reply:
|
||||||
|
LOG.debug("Sending '{}'".format(subreply))
|
||||||
|
|
||||||
|
msg = messaging.TextMessage(
|
||||||
|
self.config["aprs"]["login"],
|
||||||
|
fromcall,
|
||||||
|
subreply,
|
||||||
|
)
|
||||||
|
self.msg_queues["tx"].put(msg)
|
||||||
|
|
||||||
|
else:
|
||||||
found_command = True
|
found_command = True
|
||||||
# A plugin can return a null message flag which signals
|
# A plugin can return a null message flag which signals
|
||||||
# us that they processed the message correctly, but have
|
# us that they processed the message correctly, but have
|
||||||
|
Loading…
x
Reference in New Issue
Block a user