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
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
def raw_msg(h): if not flt.msg_flt(h): return '' return ru('msg/%s' % h)