-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
97620d2
commit 65f8fad
Showing
5 changed files
with
104 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
from __future__ import annotations | ||
|
||
import re | ||
|
||
from opengsq.responses.quake2 import Player, Status | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from .status import Status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
from dataclasses import dataclass | ||
|
||
|
||
@dataclass | ||
class Status: | ||
""" | ||
Represents the response status of a server. | ||
""" | ||
|
||
ip: str | ||
"""The IP address of the server.""" | ||
|
||
port: int | ||
"""The port number of the server.""" | ||
|
||
name: str | ||
"""The name of the server.""" | ||
|
||
num_players: int | ||
"""The number of players currently connected to the server.""" | ||
|
||
max_players: int | ||
"""The maximum number of players that can connect to the server.""" | ||
|
||
time: int | ||
"""The server time.""" | ||
|
||
password: bool | ||
"""A value indicating whether a password is required to connect to the server.""" | ||
|
||
version: str | ||
"""The version of the server.""" |