mirror of
https://github.com/evennia/evennia.git
synced 2026-04-06 07:57:16 +02:00
As is in Penn (I think), we'll use two underscores to denote a hidden server attribute. Finished up moving the two hidden attributes that I know need to be hidden and read-only over to the double underscore names as per Issue 27.
This commit is contained in:
parent
131f6410d4
commit
82f35f3b84
3 changed files with 8 additions and 7 deletions
|
|
@ -30,10 +30,11 @@ NOSAVE_FLAGS = ["CONNECTED"]
|
|||
NOSET_FLAGS = ["CONNECTED"]
|
||||
|
||||
# These attribute names can't be modified by players.
|
||||
NOSET_ATTRIBS = ["MONEY", "ALIAS", "LASTPAGED", "CHANLIST", "LAST", "LASTSITE"]
|
||||
NOSET_ATTRIBS = ["MONEY", "ALIAS", "LASTPAGED", "__CHANLIST", "LAST",
|
||||
"__PARENT", "LASTSITE"]
|
||||
|
||||
# These attributes don't show up on objects when examined.
|
||||
HIDDEN_ATTRIBS = ["CHANLIST"]
|
||||
HIDDEN_ATTRIBS = ["__CHANLIST", "__PARENT"]
|
||||
|
||||
# Server version number.
|
||||
REVISION = '$Rev$'
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
"""
|
||||
Comsys functions.
|
||||
"""
|
||||
import time, datetime
|
||||
|
||||
from django.utils import simplejson
|
||||
|
|
@ -5,9 +8,6 @@ from django.utils import simplejson
|
|||
from apps.objects.models import CommChannel, CommChannelMessage
|
||||
import session_mgr
|
||||
import ansi
|
||||
"""
|
||||
Comsys functions.
|
||||
"""
|
||||
|
||||
def plr_get_cdict(session):
|
||||
"""
|
||||
|
|
@ -147,7 +147,7 @@ def plr_jsondump_channels(session):
|
|||
|
||||
session: (SessionProtocol) A reference to the player session.
|
||||
"""
|
||||
session.get_pobject().set_attribute("CHANLIST", simplejson.dumps(plr_get_cdict(session)))
|
||||
session.get_pobject().set_attribute("__CHANLIST", simplejson.dumps(plr_get_cdict(session)))
|
||||
|
||||
def plr_del_channel(session, alias):
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ class SessionProtocol(StatefulTelnetProtocol):
|
|||
"""
|
||||
Parse JSON dict of a user's channel list from their CHANLIST attribute.
|
||||
"""
|
||||
chan_list = self.get_pobject().get_attribute_value("CHANLIST")
|
||||
chan_list = self.get_pobject().get_attribute_value("__CHANLIST")
|
||||
if chan_list:
|
||||
self.channels_subscribed = simplejson.loads(chan_list)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue