reimplement the hook binding mechanism in a saner way
remove unsafe lua_buff::setLength
bind ucharbuf::maxlen as a normal variable (feel free to shoot in your foot)