diff --git a/rcon/source/proto.py b/rcon/source/proto.py index 4d88283..5201db5 100644 --- a/rcon/source/proto.py +++ b/rcon/source/proto.py @@ -91,6 +91,15 @@ class Packet(NamedTuple): if other is None: return self + if other.id != self.id: + raise ValueError('Can only add packages with same id.') + + if other.type != self.type: + raise ValueError('Can only add packages of same type.') + + if other.terminator != self.terminator: + raise ValueError('Can only add packages with same terminator.') + return Packet( self.id, self.type,