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