Moving @ccreate from commands_privileged to commands_comsys. Still need to add duplicate name checking.

This commit is contained in:
Greg Taylor 2007-05-11 15:25:15 +00:00
parent ac32ab05c1
commit 65df59ff53
3 changed files with 22 additions and 20 deletions

View file

@ -27,7 +27,7 @@ ctable = {
"uptime": commands_general.cmd_uptime,
"version": commands_general.cmd_version,
"who": commands_general.cmd_who,
"@ccreate": commands_privileged.cmd_ccreate,
"@ccreate": commands_comsys.cmd_ccreate,
"@create": commands_privileged.cmd_create,
"@description": commands_privileged.cmd_description,
"@destroy": commands_privileged.cmd_destroy,

View file

@ -3,6 +3,7 @@ import time
import functions_general
import functions_db
import functions_help
import functions_comsys
import defines_global as global_defines
import session_mgr
import ansi
@ -122,6 +123,26 @@ def cmd_cwho(cdat):
"""
pass
def cmd_ccreate(cdat):
"""
@ccreate
Creates a new channel with the invoker being the default owner.
"""
session = cdat['session']
pobject = session.get_pobject()
uinput= cdat['uinput']['splitted']
cname = ' '.join(uinput[1:])
if cname == '':
session.msg("You must supply a name!")
else:
# Create and set the object up.
cdat = {"name": cname, "owner": pobject}
new_chan = functions_comsys.create_channel(cdat)
session.msg("Channel %s created." % (new_chan.get_name(),))
def cmd_cchown(cdat):
"""
@cchown

View file

@ -3,7 +3,6 @@ import resource
import functions_db
import functions_general
import functions_comsys
import commands_general
import commands_unloggedin
import cmdhandler
@ -271,24 +270,6 @@ def cmd_emit(cdat):
session.msg("Emit what?")
else:
pobject.get_location().emit_to_contents(message)
def cmd_ccreate(cdat):
"""
Creates a new channel.
"""
session = cdat['session']
pobject = session.get_pobject()
uinput= cdat['uinput']['splitted']
cname = ' '.join(uinput[1:])
if cname == '':
session.msg("You must supply a name!")
else:
# Create and set the object up.
cdat = {"name": cname, "owner": pobject}
new_chan = functions_comsys.create_channel(cdat)
session.msg("Channel %s created." % (new_chan.get_name(),))
def cmd_create(cdat):
"""