'Method for grabbing all listeners that a message should be
sent to on this channel, and sending them a message.
Args:
msgobj (Msg or TempMsg): Message to distribute.
online (bool): Only send to receivers who are actually online
Notes:
This is also where logging happens, if enabled.'

def distribute_message(self, msgobj, online=False):

    if online:
        subs = self.subscriptions.online()
    else:
        subs = self.subscriptions.all()
    for entity in subs:
        if (entity in self.mutelist):
            continue
        try:
            entity.msg(msgobj.message, from_obj=msgobj.senders, options={'from_channel': self.id})
        except AttributeError as e:
            logger.log_trace(("%s\nCannot    send    msg    to    '%s'." % (e, entity)))
    if msgobj.keep_log:
        logger.log_file(msgobj.message, (self.attributes.get('log_file') or ('channel_%s.log' % self.key)))
