Browse Source
This completes the custommsg epic, finally we are back where we began all that time ago (about 4 hours really...): in a plugin that implements some custom logic.travis-debug
Christian Decker
5 years ago
2 changed files with 22 additions and 2 deletions
@ -0,0 +1,15 @@ |
|||||
|
#!/usr/bin/env python3 |
||||
|
from pyln.client import Plugin |
||||
|
|
||||
|
plugin = Plugin() |
||||
|
|
||||
|
|
||||
|
@plugin.hook('custommsg') |
||||
|
def on_custommsg(peer_id, message, plugin, **kwargs): |
||||
|
plugin.log("Got a custom message {msg} from peer {peer_id}".format( |
||||
|
msg=message, |
||||
|
peer_id=peer_id |
||||
|
)) |
||||
|
|
||||
|
|
||||
|
plugin.run() |
Loading…
Reference in new issue