worked on pipe addon's packet handling

Its really hard to test this code at the moment but it should be mostly
done.