Handle warnings (receive only)

Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
Yohann D'ANELLO 2020-12-21 16:04:09 +01:00
parent f1e04b1dc8
commit 8a066bb340
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
1 changed files with 3 additions and 0 deletions

View File

@ -398,6 +398,9 @@ class WarningTLV(TLV):
self.length.to_bytes(1, "big") + \
self.message.encode("UTF-8")[:self.length]
def handle(self, squirrel: "Squirrel", sender: "Hazelnut") -> None:
squirrel.add_message(f"<warning> *A client warned you: {self.message}*")
class Packet:
"""