mirror of
http://aero2k.de/t/repos/urlbot-native.git
synced 2017-09-06 15:25:38 +02:00
cleanup; avoid locking out via 'plugin disable plugin'
This commit is contained in:
@@ -650,7 +650,7 @@ def command_plugin_activation(args):
|
|||||||
|
|
||||||
logger('plugin', 'plugin activation plugin called')
|
logger('plugin', 'plugin activation plugin called')
|
||||||
|
|
||||||
if None == command or 'list' == command:
|
if command in (None, 'list'):
|
||||||
return {
|
return {
|
||||||
'msg': args['reply_user'] + ': known plugins: ' +
|
'msg': args['reply_user'] + ': known plugins: ' +
|
||||||
str([c['name'] for c in plugins['command']])[1:-1]
|
str([c['name'] for c in plugins['command']])[1:-1]
|
||||||
@@ -660,8 +660,12 @@ def command_plugin_activation(args):
|
|||||||
return {
|
return {
|
||||||
'msg': args['reply_user'] + ': no plugin given'
|
'msg': args['reply_user'] + ': no plugin given'
|
||||||
}
|
}
|
||||||
|
elif 'plugin' == plugin:
|
||||||
|
return {
|
||||||
|
'msg': args['reply_user'] + ': not allowed'
|
||||||
|
}
|
||||||
|
|
||||||
if 'enable' == command or 'disable' == command:
|
if command in ('enable', 'disable'):
|
||||||
for i, c in enumerate(plugins['command']):
|
for i, c in enumerate(plugins['command']):
|
||||||
if c['name'] == plugin:
|
if c['name'] == plugin:
|
||||||
plugins['command'][i]['is_enabled'] = \
|
plugins['command'][i]['is_enabled'] = \
|
||||||
|
|||||||
Reference in New Issue
Block a user