Tidied python plugins
Use private naming convention Move local callback functions to top
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import prof
|
||||
import getpass
|
||||
|
||||
def prof_init(version, status):
|
||||
prof.register_command("/whoami", 0, 0, "/whoami", "Call shell whoami command.", "Call shell whoami command.", cmd_whoami)
|
||||
|
||||
def cmd_whoami():
|
||||
def _cmd_whoami():
|
||||
me = getpass.getuser()
|
||||
prof.cons_show(me)
|
||||
|
||||
def prof_init(version, status):
|
||||
prof.register_command("/whoami", 0, 0, "/whoami", "Call shell whoami command.", "Call shell whoami command.", _cmd_whoami)
|
||||
|
||||
Reference in New Issue
Block a user