Skip to content

Commit

Permalink
Add a message in /script for when no scripts are enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
feikname committed Dec 22, 2017
1 parent 2cb542b commit e24d855
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion piqueserver/core_commands/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ def scripts(connection):
/version
"""
scripts = connection.protocol.config.get('scripts', [])
return 'Scripts enabled: %s' % (', '.join(scripts))
if len(scripts) > 0:
return 'Scripts enabled: %s' % (', '.join(scripts))
else:
return 'No scripts are enabled currently'


@command('togglemaster', 'master', admin_only=True)
Expand Down

0 comments on commit e24d855

Please sign in to comment.