diff -r 7e225c2659b8 -r 1759c15cd0ca modulecore.py --- a/modulecore.py Sat Aug 08 14:17:06 2015 +0300 +++ b/modulecore.py Sat Aug 08 14:17:30 2015 +0300 @@ -180,12 +180,16 @@ def exec_command (commandObject): global g_lastConfirm global g_confirmCommand - cmdname = commandObject['cmdname'] - try: - func = getattr (commandObject['module'], 'cmd_' + cmdname) - except AttributeError: - command_error ('''command '%s' does not have a definition''' % cmdname) + if 'function' in commandObject: + func = commandObject['function'] + else: + cmdname = commandObject['cmdname'] + + try: + func = getattr (commandObject['module'], 'cmd_' + cmdname) + except AttributeError: + command_error ('''command '%s' does not have a definition''' % cmdname) try: func (**commandObject)