Handle warnings (receive only)
Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
parent
f1e04b1dc8
commit
8a066bb340
|
@ -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:
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue