fixed command parser plugin command building
This commit is contained in:
parent
d0fab00e3b
commit
41eab0e98d
@ -37,7 +37,6 @@ def add_bridges(torrc: str)->str:
|
||||
|
||||
return torrc
|
||||
|
||||
|
||||
class NetController:
|
||||
'''
|
||||
This class handles hidden service setup on Tor and I2P
|
||||
|
@ -27,13 +27,13 @@ from . import arguments, recommend
|
||||
plugin_command = lambda cmd: 'on_%s_cmd' % (cmd,)
|
||||
|
||||
def register_plugin_commands(cmd):
|
||||
cmd = 'on_%s_cmd' % (cmd,)
|
||||
plugin_cmd = plugin_command(cmd)
|
||||
for pl in onionrplugins.get_enabled_plugins():
|
||||
pl = onionrplugins.get_plugin(pl)
|
||||
if hasattr(pl, plugin_cmd):
|
||||
getattr(pl, plugin_cmd)(onionrpluginapi.PluginAPI)
|
||||
return True
|
||||
return False
|
||||
|
||||
def register():
|
||||
"""Registers commands and handles help command processing"""
|
||||
|
Loading…
Reference in New Issue
Block a user