diff --git a/src/psu/psu_proto.erl b/src/psu/psu_proto.erl index f7b9c5c..d582219 100644 --- a/src/psu/psu_proto.erl +++ b/src/psu/psu_proto.erl @@ -346,6 +346,24 @@ parse(Size, 16#0226, Channel, Data) -> ?ASSERT_EQ(VarJ, 0), {system_motd_request, Page, language_integer_to_atom(Language)}; +%% @doc Whether the MOTD was accepted. Safely ignored. +parse(Size, 16#0227, Channel, Data) -> + << LID:16/little, VarA:16/little, VarB:32/little, VarC:32/little, VarD:32/little, VarE:32/little, VarF:32/little, + VarG:32/little, VarH:32/little, VarI:32/little, _AcceptMOTD:32/little >> = Data, + ?ASSERT_EQ(Size, 48), + ?ASSERT_EQ(Channel, 2), + ?ASSERT_EQ(LID, 16#ffff), + ?ASSERT_EQ(VarA, 0), + ?ASSERT_EQ(VarB, 0), + ?ASSERT_EQ(VarC, 0), + ?ASSERT_EQ(VarD, 0), + ?ASSERT_EQ(VarE, 0), + ?ASSERT_EQ(VarF, 0), + ?ASSERT_EQ(VarG, 0), + ?ASSERT_EQ(VarH, 0), + ?ASSERT_EQ(VarI, 0), + ignore; %% {system_motd_accept, true|false (AcceptMOTD)}; + %% @doc Seems to be exactly the same as 0226, except Channel, and that it's used for US clients. parse(Size, 16#023f, Channel, Data) -> << LID:16/little, VarA:16/little, VarB:32/little, VarC:32/little, VarD:32/little, VarE:32/little, VarF:32/little,