Indenting fixes, still need to finish on commands_comsys, will pick it up later unless someone beats me to it.
This commit is contained in:
parent
65df59ff53
commit
44701530dc
3 changed files with 94 additions and 85 deletions
|
|
@ -28,6 +28,7 @@ ctable = {
|
||||||
"version": commands_general.cmd_version,
|
"version": commands_general.cmd_version,
|
||||||
"who": commands_general.cmd_who,
|
"who": commands_general.cmd_who,
|
||||||
"@ccreate": commands_comsys.cmd_ccreate,
|
"@ccreate": commands_comsys.cmd_ccreate,
|
||||||
|
"@clist": commands_comsys.cmd_clist,
|
||||||
"@create": commands_privileged.cmd_create,
|
"@create": commands_privileged.cmd_create,
|
||||||
"@description": commands_privileged.cmd_description,
|
"@description": commands_privileged.cmd_description,
|
||||||
"@destroy": commands_privileged.cmd_destroy,
|
"@destroy": commands_privileged.cmd_destroy,
|
||||||
|
|
|
||||||
|
|
@ -14,114 +14,117 @@ now.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def cmd_addcom(cdat):
|
def cmd_addcom(cdat):
|
||||||
"""
|
"""
|
||||||
addcom
|
addcom
|
||||||
|
|
||||||
Adds an alias for a channel.
|
Adds an alias for a channel.
|
||||||
addcom foo=Bar
|
addcom foo=Bar
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def cmd_allcom(cdat):
|
def cmd_allcom(cdat):
|
||||||
"""
|
"""
|
||||||
allcom
|
allcom
|
||||||
|
|
||||||
Allows the user to universally turn off or on all channels they are on,
|
Allows the user to universally turn off or on all channels they are on,
|
||||||
as well as perform a "who" for all channels they are on.
|
as well as perform a "who" for all channels they are on.
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def cmd_comtitle(cdat):
|
def cmd_comtitle(cdat):
|
||||||
"""
|
"""
|
||||||
comtitle
|
comtitle
|
||||||
|
|
||||||
Sets a prefix to the user's name on the specified channel.
|
Sets a prefix to the user's name on the specified channel.
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def cmd_clearcom(cdat):
|
def cmd_clearcom(cdat):
|
||||||
"""
|
"""
|
||||||
clearcom
|
clearcom
|
||||||
|
|
||||||
Effectively runs delcom on all channels the user is on. It will remove their aliases,
|
Effectively runs delcom on all channels the user is on. It will remove their aliases,
|
||||||
remove them from the channel, and clear any titles they have set.
|
remove them from the channel, and clear any titles they have set.
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def cmd_clist(cdat):
|
def cmd_clist(cdat):
|
||||||
"""
|
"""
|
||||||
@clist
|
@clist
|
||||||
|
|
||||||
Lists all available channels on the game.
|
Lists all available channels on the game.
|
||||||
"""
|
"""
|
||||||
pass
|
session = cdat['session']
|
||||||
|
session.msg("*** Channel Owner Description")
|
||||||
|
for chan in functions_comsys.get_all_channels():
|
||||||
|
session.msg("--- %s %s" % (chan.get_name(), chan.get_owner().get_name())
|
||||||
|
|
||||||
def cmd_cdestroy(cdat):
|
def cmd_cdestroy(cdat):
|
||||||
"""
|
"""
|
||||||
@cdestroy
|
@cdestroy
|
||||||
|
|
||||||
Destroys a channel.
|
Destroys a channel.
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def cmd_cset(cdat):
|
def cmd_cset(cdat):
|
||||||
"""
|
"""
|
||||||
@cset
|
@cset
|
||||||
|
|
||||||
Sets various flags on a channel.
|
Sets various flags on a channel.
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def cmd_cpflags(cdat):
|
def cmd_cpflags(cdat):
|
||||||
"""
|
"""
|
||||||
@cpflags
|
@cpflags
|
||||||
|
|
||||||
Sets various flags on a channel relating to players.
|
Sets various flags on a channel relating to players.
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def cmd_coflags(cdat):
|
def cmd_coflags(cdat):
|
||||||
"""
|
"""
|
||||||
@coflags
|
@coflags
|
||||||
|
|
||||||
Sets various flags on a channel relating to objects.
|
Sets various flags on a channel relating to objects.
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def cmd_ccharge(cdat):
|
def cmd_ccharge(cdat):
|
||||||
"""
|
"""
|
||||||
@ccharge
|
@ccharge
|
||||||
|
|
||||||
Sets the cost to transmit over a channel. Default is free.
|
Sets the cost to transmit over a channel. Default is free.
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def cmd_cboot(cdat):
|
def cmd_cboot(cdat):
|
||||||
"""
|
"""
|
||||||
@cboot
|
@cboot
|
||||||
|
|
||||||
Kicks a player or object from the channel.
|
Kicks a player or object from the channel.
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def cmd_cemit(cdat):
|
def cmd_cemit(cdat):
|
||||||
"""
|
"""
|
||||||
@cemit
|
@cemit
|
||||||
|
|
||||||
Allows the user to send a message over a channel as long as
|
Allows the user to send a message over a channel as long as
|
||||||
they own or control it. It does not show the user's name.
|
they own or control it. It does not show the user's name.
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def cmd_cwho(cdat):
|
def cmd_cwho(cdat):
|
||||||
"""
|
"""
|
||||||
@cwho
|
@cwho
|
||||||
|
|
||||||
Displays the name, status and object type for a given channel.
|
Displays the name, status and object type for a given channel.
|
||||||
Adding /all after the channel name will list disconnected players
|
Adding /all after the channel name will list disconnected players
|
||||||
as well.
|
as well.
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def cmd_ccreate(cdat):
|
def cmd_ccreate(cdat):
|
||||||
"""
|
"""
|
||||||
|
|
@ -140,22 +143,21 @@ def cmd_ccreate(cdat):
|
||||||
# Create and set the object up.
|
# Create and set the object up.
|
||||||
cdat = {"name": cname, "owner": pobject}
|
cdat = {"name": cname, "owner": pobject}
|
||||||
new_chan = functions_comsys.create_channel(cdat)
|
new_chan = functions_comsys.create_channel(cdat)
|
||||||
|
|
||||||
session.msg("Channel %s created." % (new_chan.get_name(),))
|
session.msg("Channel %s created." % (new_chan.get_name(),))
|
||||||
|
|
||||||
def cmd_cchown(cdat):
|
def cmd_cchown(cdat):
|
||||||
"""
|
"""
|
||||||
@cchown
|
@cchown
|
||||||
|
|
||||||
Changes the owner of a channel.
|
Changes the owner of a channel.
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def cmd_delcom(cdat):
|
def cmd_delcom(cdat):
|
||||||
"""
|
"""
|
||||||
delcom
|
delcom
|
||||||
|
|
||||||
Removes the specified alias to a channel. If this is the last alias,
|
Removes the specified alias to a channel. If this is the last alias,
|
||||||
the user is effectively removed from the channel.
|
the user is effectively removed from the channel.
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,12 @@ def get_com_who(channel, muted=False, disconnected=False):
|
||||||
def get_user_channels(player):
|
def get_user_channels(player):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def get_all_channels():
|
||||||
|
"""
|
||||||
|
Returns all channel objects.
|
||||||
|
"""
|
||||||
|
return CommChannel.objects.all()
|
||||||
|
|
||||||
def create_channel(cdat):
|
def create_channel(cdat):
|
||||||
"""
|
"""
|
||||||
Create a new channel. cdat is a dictionary that contains the following keys.
|
Create a new channel. cdat is a dictionary that contains the following keys.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue