diff --git a/cmdtable.py b/cmdtable.py index adce283b80..d958995af1 100644 --- a/cmdtable.py +++ b/cmdtable.py @@ -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, diff --git a/commands_comsys.py b/commands_comsys.py index d5a6d7eb83..d3c56619ec 100644 --- a/commands_comsys.py +++ b/commands_comsys.py @@ -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 diff --git a/commands_privileged.py b/commands_privileged.py index aca755804e..4a0cab743f 100644 --- a/commands_privileged.py +++ b/commands_privileged.py @@ -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): """