Пример #1
0
def mkmsg(obj, rh=None):
    if not flt.echo_flt(obj.echoarea): return
    if rh and not flt.msg_flt(rh): return
    s = _out(obj).encode('utf-8')
    h = rh or sx.hsh(s)
    if len(s) < 65536:
        open('msg/%s' % h, 'wb').write(s)
        open('echo/%s' % obj.echoarea, 'ab').write(h + '\n')
        return h
Пример #2
0
def mkmsg(obj,rh=None):
    if not flt.echo_flt(obj.echoarea): return
    if rh and not flt.msg_flt(rh): return
    s = _out(obj).encode('utf-8')
    h = rh or sx.hsh(s)
    if len(s) < 65536:
        open('msg/%s' % h,'wb').write(s)
        open('echo/%s' % obj.echoarea,'ab').write(h + '\n')
        return h
Пример #3
0
def raw_msg(h):
    if not flt.msg_flt(h): return ''
    return ru('msg/%s' % h)
Пример #4
0
def raw_msg(h):
    if not flt.msg_flt(h): return ''
    return ru('msg/%s' % h)