We're calling @-prefixed commands privileged commands instead of staff commands.
This commit is contained in:
parent
4641aa8a4e
commit
18994e4ca0
4 changed files with 6 additions and 7 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
import commands_staff
|
import commands_privileged
|
||||||
import commands_general
|
import commands_general
|
||||||
import commands_unloggedin
|
import commands_unloggedin
|
||||||
import functions_db
|
import functions_db
|
||||||
|
|
@ -61,7 +61,7 @@ def handle(cdat):
|
||||||
cmd = getattr(commands_general, 'cmd_%s' % (parsed_input['root_cmd'],), None )
|
cmd = getattr(commands_general, 'cmd_%s' % (parsed_input['root_cmd'],), None )
|
||||||
else:
|
else:
|
||||||
parsed_input['root_cmd'] = parsed_input['root_cmd'][1:]
|
parsed_input['root_cmd'] = parsed_input['root_cmd'][1:]
|
||||||
cmd = getattr(commands_staff, 'cmd_%s' % (parsed_input['root_cmd'],), None )
|
cmd = getattr(commands_privileged, 'cmd_%s' % (parsed_input['root_cmd'],), None )
|
||||||
else:
|
else:
|
||||||
cmd = getattr(commands_unloggedin, 'cmd_%s' % (parsed_input['root_cmd'],), None )
|
cmd = getattr(commands_unloggedin, 'cmd_%s' % (parsed_input['root_cmd'],), None )
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,7 @@ import defines_global
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from apps.objects.models import Object
|
from apps.objects.models import Object
|
||||||
"""
|
"""
|
||||||
Staff commands may be a bad description for this file, but it'll do for
|
Any command here is prefixed by an '@' sign, usually denoting a
|
||||||
now. Any command here is prefixed by an '@' sign, usually denoting a
|
|
||||||
builder, staff or otherwise manipulative command that doesn't fall within
|
builder, staff or otherwise manipulative command that doesn't fall within
|
||||||
the scope of normal gameplay.
|
the scope of normal gameplay.
|
||||||
"""
|
"""
|
||||||
|
|
@ -77,7 +76,7 @@ def cmd_list(cdat):
|
||||||
args = cdat['uinput']['splitted'][1:]
|
args = cdat['uinput']['splitted'][1:]
|
||||||
argstr = ''.join(args)
|
argstr = ''.join(args)
|
||||||
|
|
||||||
msg_invalid = "Unknown option. Use one of: commands, process"
|
msg_invalid = "Unknown option. Use one of: commands, flags, process"
|
||||||
|
|
||||||
if len(argstr) == 0:
|
if len(argstr) == 0:
|
||||||
session.msg(msg_invalid)
|
session.msg(msg_invalid)
|
||||||
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
||||||
import session_mgr
|
import session_mgr
|
||||||
import commands_staff
|
import commands_privileged
|
||||||
import commands_general
|
import commands_general
|
||||||
import commands_unloggedin
|
import commands_unloggedin
|
||||||
"""
|
"""
|
||||||
|
|
@ -10,7 +10,7 @@ def command_list():
|
||||||
Return a list of all commands.
|
Return a list of all commands.
|
||||||
"""
|
"""
|
||||||
commands = dir(commands_unloggedin) + dir(commands_general)
|
commands = dir(commands_unloggedin) + dir(commands_general)
|
||||||
stf_commands = dir(commands_staff)
|
stf_commands = dir(commands_privileged)
|
||||||
filtered = [prospect for prospect in commands if "cmd_" in prospect]
|
filtered = [prospect for prospect in commands if "cmd_" in prospect]
|
||||||
stf_filtered = [prospect for prospect in stf_commands if "cmd_" in prospect]
|
stf_filtered = [prospect for prospect in stf_commands if "cmd_" in prospect]
|
||||||
processed = []
|
processed = []
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue