(peer, plugin, **kwargs)
| 14 | |
| 15 | @plugin.hook('peer_connected') |
| 16 | def on_connected(peer, plugin, **kwargs): |
| 17 | if peer['id'] in plugin.reject_ids: |
| 18 | print("{} is in reject list, disconnecting".format(peer['id'])) |
| 19 | return {'result': 'disconnect', 'error_message': 'You are in reject list'} |
| 20 | |
| 21 | print("{} is allowed".format(peer['id'])) |
| 22 | return {'result': 'continue'} |
| 23 | |
| 24 | |
| 25 | @plugin.init() |
nothing calls this directly
no outgoing calls
no test coverage detected