示例#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)