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:
Greg Taylor 2007-05-11 15:43:06 +00:00
parent 65df59ff53
commit 44701530dc
3 changed files with 94 additions and 85 deletions

View file

@ -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,

View file

@ -54,7 +54,10 @@ def cmd_clist(cdat):
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):
""" """
@ -140,7 +143,6 @@ 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):

View file

@ -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.