OBS: You need to resync your database! The Nickname system is now a separate database model with the result that also channel nicks are more robust. Also nickname replacement has been adjusted to fix some exceptional circumstances. Fixed a host of issues in the channel and nick handlers and adjoining commands that caused the channel-syscommands to fail in some situations. Resolves issue131. Resolves issue 132. Resolves issue 134.
This commit is contained in:
parent
7ebcefae2e
commit
2bdaf034c8
17 changed files with 298 additions and 305 deletions
|
|
@ -331,7 +331,7 @@ def create_message(senderobj, message, channels=None,
|
|||
new_message.save()
|
||||
return new_message
|
||||
|
||||
def create_channel(key, aliases=None, description=None,
|
||||
def create_channel(key, aliases=None, desc=None,
|
||||
permissions=None, keep_log=True):
|
||||
"""
|
||||
Create A communication Channel. A Channel serves as a central
|
||||
|
|
@ -356,7 +356,7 @@ def create_channel(key, aliases=None, description=None,
|
|||
if not is_iter(aliases):
|
||||
aliases = [aliases]
|
||||
new_channel.aliases = ",".join([str(alias) for alias in aliases])
|
||||
new_channel.description = description
|
||||
new_channel.desc = desc
|
||||
new_channel.keep_log = keep_log
|
||||
except IntegrityError:
|
||||
string = "Could not add channel: key '%s' already exists." % key
|
||||
|
|
|
|||
|
|
@ -94,8 +94,8 @@ def reload_modules():
|
|||
|
||||
# clean out cache dictionary of typeclasses, exits and channe
|
||||
typeclassmodels.reset()
|
||||
exithandler.EXITHANDLER.reset()
|
||||
channelhandler.CHANNELHANDLER.reset()
|
||||
exithandler.EXITHANDLER.clear()
|
||||
channelhandler.CHANNELHANDLER.update()
|
||||
|
||||
def reload_scripts(scripts=None, obj=None, key=None,
|
||||
dbref=None, init_mode=False):
|
||||
|
|
@ -129,14 +129,17 @@ def cemit_info(message):
|
|||
Sends the info to a pre-set channel. This channel is
|
||||
set by CHANNEL_MUDINFO in settings.
|
||||
"""
|
||||
|
||||
logger.log_infomsg(message)
|
||||
try:
|
||||
infochan = settings.CHANNEL_MUDINFO
|
||||
infochan = Channel.objects.get_channel(infochan[0])
|
||||
except Exception:
|
||||
return
|
||||
pass
|
||||
if infochan:
|
||||
cname = infochan.key
|
||||
cmessage = "\n".join(["[%s]: %s" % (cname, line) for line in message.split('\n')])
|
||||
infochan.msg(cmessage)
|
||||
|
||||
else:
|
||||
cmessage = "\n".join(["[NO MUDINFO CHANNEL]: %s" % line for line in message.split('\n')])
|
||||
logger.log_infomsg(cmessage)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue