mirror of
https://github.com/evennia/evennia.git
synced 2026-04-02 05:57:16 +02:00
Lots of re-arranging of the comsys and near completion of comsys player commands. I'm going to halt further progres on this long enough for me to take a second look at my code and re-factor some things, then go on to work on some of the lesser-used commands. New in this revision: on, off, last, who for channels (pub who, etc.). Make sure you nuke all of your comsys-related tables and re-sync.
This commit is contained in:
parent
49b6a0ba57
commit
c7f32f904d
6 changed files with 249 additions and 77 deletions
|
|
@ -9,6 +9,7 @@ import commands_unloggedin
|
|||
import cmdtable
|
||||
import functions_db
|
||||
import functions_general
|
||||
import functions_comsys
|
||||
|
||||
"""
|
||||
This is the command processing module. It is instanced once in the main
|
||||
|
|
@ -95,9 +96,28 @@ def handle(cdat):
|
|||
parsed_input['splitted'][1] = parsed_input['splitted'][1][1:]
|
||||
parsed_input['root_cmd'] = 'pose'
|
||||
# Channel alias match.
|
||||
elif session.has_user_channel(parsed_input['root_cmd'], alias_search=True, return_muted=False):
|
||||
cname = session.channels_subscribed.get(parsed_input['root_cmd'])[0]
|
||||
elif functions_comsys.plr_has_channel(session,
|
||||
parsed_input['root_cmd'],
|
||||
alias_search=True,
|
||||
return_muted=True):
|
||||
|
||||
calias = parsed_input['root_cmd']
|
||||
cname = functions_comsys.plr_cname_from_alias(session, calias)
|
||||
cmessage = ' '.join(parsed_input['splitted'][1:])
|
||||
|
||||
if cmessage == "who":
|
||||
functions_comsys.msg_cwho(session, cname)
|
||||
return
|
||||
elif cmessage == "on":
|
||||
functions_comsys.plr_chan_on(session, calias)
|
||||
return
|
||||
elif cmessage == "off":
|
||||
functions_comsys.plr_chan_off(session, calias)
|
||||
return
|
||||
elif cmessage == "last":
|
||||
functions_comsys.msg_chan_hist(session, cname)
|
||||
return
|
||||
|
||||
second_arg = "%s=%s" % (cname, cmessage)
|
||||
parsed_input['splitted'] = ["@cemit/sendername", second_arg]
|
||||
parsed_input['root_chunk'] = ['@cemit', 'sendername', 'quiet']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue