Clean up send_cmessage() a bit. Changed noheader keyword arg to show_header and defaulted it to True. This should read a little better. Also updated some of the various function calls. More importantly, check to see if the channel argument is a string or unicode object and find the correct channel object as needed, which was the previous behavior. However, if it's not a string or unicode object, assume it's a CommChannel object and avoid querying for it again. This may be a performance win in some cases down the road.

This commit is contained in:
Greg Taylor 2009-04-30 03:13:46 +00:00
parent 70602efaa7
commit 76f14b4779
4 changed files with 42 additions and 34 deletions

View file

@ -219,5 +219,4 @@ class SessionProtocol(StatefulTelnetProtocol):
is MUDConnections.
"""
src.comsys.send_cmessage(settings.COMMCHAN_MUD_CONNECTIONS,
'Session: %s' % message,
noheader=False)
'Session: %s' % message)