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