Moving some of the login tasks out of sessions.py and into the BasicPlayer script parent. Also, added seconds to the 'time' command, which I apparently forgot.

This commit is contained in:
Greg Taylor 2008-06-15 21:29:27 +00:00
parent b12ba45cc7
commit cf18029be1
7 changed files with 69 additions and 23 deletions

View file

@ -198,6 +198,15 @@ def get_cwho_list(channel_name, return_muted=False):
"""
sess_list = session_mgr.get_session_list()
return [sess for sess in sess_list if plr_has_channel(sess, channel_name, return_muted)]
def load_object_channels(pobject):
"""
Parse JSON dict of a user's channel list from their CHANLIST attribute.
"""
chan_list = pobject.get_attribute_value("__CHANLIST")
if chan_list:
session = session_mgr.session_from_object(pobject)
session.channels_subscribed = simplejson.loads(chan_list)
def send_cmessage(channel_name, message):
"""