Fix traceback due to missing settings.CHANNEL_CONNECTINFO; added the missing setting (with a None value). Resolves #1177.

This commit is contained in:
Griatch 2017-01-28 09:46:37 +01:00
parent c6d9c0619e
commit 92ec6a5ae8
2 changed files with 5 additions and 2 deletions

View file

@ -304,9 +304,9 @@ class ServerSession(Session):
in addition to the server log. in addition to the server log.
""" """
if channel: cchan = channel and settings.CHANNEL_CONNECTINFO
if cchan:
try: try:
cchan = settings.CHANNEL_CONNECTINFO
cchan = ChannelDB.objects.get_channel(cchan[0]) cchan = ChannelDB.objects.get_channel(cchan[0])
cchan.msg("[%s]: %s" % (cchan.key, message)) cchan.msg("[%s]: %s" % (cchan.key, message))
except Exception: except Exception:

View file

@ -521,6 +521,9 @@ DEFAULT_CHANNELS = [
"desc": "Connection log", "desc": "Connection log",
"locks": "control:perm(Immortals);listen:perm(Wizards);send:false()"} "locks": "control:perm(Immortals);listen:perm(Wizards);send:false()"}
] ]
# Extra optional channel for receiving connection messages ("<player> has (dis)connected").
# While the MudInfo channel will also receieve this, this channel is meant for non-staffers.
CHANNEL_CONNECTINFO = None
###################################################################### ######################################################################
# External Channel connections # External Channel connections