2019-12-05 00:16:11 +01:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
from pyln.client import Plugin
|
|
|
|
|
|
|
|
|
|
plugin = Plugin()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@plugin.hook('custommsg')
|
2021-02-23 11:36:56 +01:00
|
|
|
def on_custommsg(peer_id, payload, plugin, message=None, **kwargs):
|
2021-01-27 12:56:29 +01:00
|
|
|
plugin.log("Got custommessage_a {msg} from peer {peer_id}".format(
|
2021-02-23 11:36:56 +01:00
|
|
|
msg=payload,
|
2019-12-05 00:16:11 +01:00
|
|
|
peer_id=peer_id
|
|
|
|
|
))
|
2021-01-27 12:49:55 +01:00
|
|
|
return {'result': 'continue'}
|
2019-12-05 00:16:11 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
plugin.run()
|