Update parse_quit, now it returns MUser object and the reason.

This commit is contained in:
adator
2025-11-02 21:28:44 +01:00
parent 5a1432c1e6
commit 79c1b94a92
4 changed files with 28 additions and 22 deletions

View File

@@ -327,14 +327,14 @@ class IProtocol(ABC):
"""
@abstractmethod
def parse_quit(self, serverMsg: list[str]) -> dict[str, str]:
def parse_quit(self, serverMsg: list[str]) -> tuple[Optional['MUser'], str]:
"""Parse quit and return dictionary.
>>> [':97KAAAAAB', 'QUIT', ':Quit:', 'this', 'is', 'my', 'reason', 'to', 'quit']
Args:
serverMsg (list[str]): The server message to parse
Returns:
dict[str, str]: The response as dictionary.
tuple[MUser, str]: The User Who Quit Object and the reason.
"""
@abstractmethod