rustplus 6.1.2__tar.gz → 6.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. {rustplus-6.1.2/rustplus.egg-info → rustplus-6.2.0}/PKG-INFO +2 -2
  2. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/__init__.py +1 -1
  3. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/commands/command_options.py +1 -1
  4. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/events/chat_event.py +2 -4
  5. rustplus-6.2.0/rustplus/identification/__init__.py +2 -0
  6. rustplus-6.2.0/rustplus/identification/server_details.py +88 -0
  7. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/remote/camera/camera_manager.py +4 -4
  8. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/remote/camera/camera_parser.py +2 -2
  9. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/remote/ratelimiter/__init__.py +8 -10
  10. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/remote/rustplus_proto/rustplus.py +62 -56
  11. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/remote/websocket/ws.py +36 -39
  12. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/rust_api.py +53 -32
  13. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/structs/rust_chat_message.py +1 -2
  14. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/structs/rust_item.py +1 -2
  15. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/utils/grab_items.py +1 -3
  16. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/utils/utils.py +5 -3
  17. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/utils/yielding_event.py +2 -2
  18. {rustplus-6.1.2 → rustplus-6.2.0/rustplus.egg-info}/PKG-INFO +2 -2
  19. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus.egg-info/SOURCES.txt +0 -2
  20. {rustplus-6.1.2 → rustplus-6.2.0}/setup.py +1 -1
  21. rustplus-6.1.2/rustplus/identification/__init__.py +0 -2
  22. rustplus-6.1.2/rustplus/identification/server_details.py +0 -39
  23. rustplus-6.1.2/rustplus/remote/proxy/__init__.py +0 -1
  24. rustplus-6.1.2/rustplus/remote/proxy/proxy_value_grabber.py +0 -32
  25. {rustplus-6.1.2 → rustplus-6.2.0}/LICENSE +0 -0
  26. {rustplus-6.1.2 → rustplus-6.2.0}/MANIFEST.in +0 -0
  27. {rustplus-6.1.2 → rustplus-6.2.0}/README.md +0 -0
  28. {rustplus-6.1.2 → rustplus-6.2.0}/requirements.txt +0 -0
  29. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/annotations/__init__.py +0 -0
  30. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/annotations/chat_event.py +0 -0
  31. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/annotations/clan_event.py +0 -0
  32. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/annotations/command.py +0 -0
  33. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/annotations/entity_event.py +0 -0
  34. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/annotations/protobuf_event.py +0 -0
  35. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/annotations/team_event.py +0 -0
  36. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/commands/__init__.py +0 -0
  37. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/commands/chat_command.py +0 -0
  38. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/commands/chat_command_data.py +0 -0
  39. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/events/__init__.py +0 -0
  40. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/events/clan_info_event.py +0 -0
  41. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/events/entity_event.py +0 -0
  42. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/events/protobuf_event.py +0 -0
  43. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/events/team_event.py +0 -0
  44. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/exceptions/__init__.py +0 -0
  45. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/exceptions/exceptions.py +0 -0
  46. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/Airfield.svg +0 -0
  47. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/Apartments_Complex.svg +0 -0
  48. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/Arctic_Research_Base.svg +0 -0
  49. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/Bandit_Camp.svg +0 -0
  50. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/Dome.svg +0 -0
  51. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/Excavator.svg +0 -0
  52. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/Ferry_Terminal.svg +0 -0
  53. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/Fishing_Village.svg +0 -0
  54. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/Gas_Station.svg +0 -0
  55. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/HQM_Quarry.svg +0 -0
  56. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/Harbor.svg +0 -0
  57. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/Jungle_Ziggurat.svg +0 -0
  58. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/Junkyard.svg +0 -0
  59. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/Launch_Site.svg +0 -0
  60. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/Lighthouse.svg +0 -0
  61. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/Military_Base.svg +0 -0
  62. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/Military_Tunnels.svg +0 -0
  63. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/Mining_Outpost.svg +0 -0
  64. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/Missile_Silo.svg +0 -0
  65. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/Oil_Rig_Large.svg +0 -0
  66. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/Oil_Rig_Small.svg +0 -0
  67. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/Outpost.svg +0 -0
  68. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/Powerplant.svg +0 -0
  69. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/Radtown.svg +0 -0
  70. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/Satellite_Dish.svg +0 -0
  71. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/Sewer_Branch.svg +0 -0
  72. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/Stables.svg +0 -0
  73. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/Stone_Quarry.svg +0 -0
  74. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/Sulfur_Quarry.svg +0 -0
  75. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/Supermarket.svg +0 -0
  76. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/Swamp.svg +0 -0
  77. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/Trainyard.svg +0 -0
  78. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/Tunnel_Entrance.svg +0 -0
  79. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/Underwater_Lab.svg +0 -0
  80. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/Water_Treatment.svg +0 -0
  81. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/__init__.py +0 -0
  82. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/cargo.png +0 -0
  83. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/chinook.png +0 -0
  84. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/chinook_blades.png +0 -0
  85. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/crate.png +0 -0
  86. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/explosion.png +0 -0
  87. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/icon.png +0 -0
  88. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/patrol.png +0 -0
  89. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/icons/vending_machine.png +0 -0
  90. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/identification/handler_list.py +0 -0
  91. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/identification/registered_listener.py +0 -0
  92. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/remote/__init__.py +0 -0
  93. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/remote/camera/__init__.py +0 -0
  94. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/remote/camera/camera_constants.py +0 -0
  95. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/remote/camera/structures.py +0 -0
  96. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/remote/fcm/__init__.py +0 -0
  97. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/remote/fcm/fcm_listener.py +0 -0
  98. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/remote/nexus/__init__.py +0 -0
  99. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/remote/nexus/nexus_interface.py +0 -0
  100. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/remote/rustplus_proto/__init__.py +0 -0
  101. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/remote/websocket/__init__.py +0 -0
  102. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/structs/__init__.py +0 -0
  103. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/structs/clans/__init__.py +0 -0
  104. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/structs/clans/rust_clan_info.py +0 -0
  105. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/structs/clans/rust_clan_message.py +0 -0
  106. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/structs/rust_contents.py +0 -0
  107. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/structs/rust_entity_info.py +0 -0
  108. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/structs/rust_error.py +0 -0
  109. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/structs/rust_info.py +0 -0
  110. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/structs/rust_map.py +0 -0
  111. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/structs/rust_marker.py +0 -0
  112. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/structs/rust_team_info.py +0 -0
  113. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/structs/rust_time.py +0 -0
  114. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/structs/serialization.py +0 -0
  115. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/structs/util.py +0 -0
  116. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/utils/__init__.py +0 -0
  117. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/utils/deprecated.py +0 -0
  118. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/utils/emojis.py +0 -0
  119. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/utils/fonts/PermanentMarker.ttf +0 -0
  120. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus/utils/fonts/__init__.py +0 -0
  121. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus.egg-info/dependency_links.txt +0 -0
  122. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus.egg-info/requires.txt +0 -0
  123. {rustplus-6.1.2 → rustplus-6.2.0}/rustplus.egg-info/top_level.txt +0 -0
  124. {rustplus-6.1.2 → rustplus-6.2.0}/setup.cfg +0 -0
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rustplus
3
- Version: 6.1.2
3
+ Version: 6.2.0
4
4
  Summary: A python wrapper for the Rust Plus API
5
5
  Home-page: https://github.com/olijeffers0n/rustplus
6
6
  Author: olijeffers0n
7
7
  License: MIT
8
8
  Project-URL: Issue tracker, https://github.com/olijeffers0n/rustplus/issues
9
- Requires-Python: >=3.8.0
9
+ Requires-Python: >=3.10.0
10
10
  Description-Content-Type: text/markdown
11
11
  License-File: LICENSE
12
12
  Requires-Dist: websockets
@@ -22,5 +22,5 @@ from .structs import RustError, RustMarker, Vector
22
22
 
23
23
  __name__ = "rustplus"
24
24
  __author__ = "olijeffers0n"
25
- __version__ = "6.1.2"
25
+ __version__ = "6.2.0"
26
26
  __support__ = "Discord: https://discord.gg/nQqJe8qvP8"
@@ -2,7 +2,7 @@ from ..exceptions import PrefixNotDefinedError
2
2
 
3
3
 
4
4
  class CommandOptions:
5
- def __init__(self, prefix: str = None) -> None:
5
+ def __init__(self, prefix: str) -> None:
6
6
  if prefix is None:
7
7
  raise PrefixNotDefinedError("No prefix")
8
8
 
@@ -1,14 +1,12 @@
1
1
  from rustplus.identification.handler_list import HandlerList
2
2
  from ..structs import RustChatMessage
3
3
 
4
- from typing import Union
5
-
6
4
 
7
5
  class ChatEventPayload:
8
6
  HANDLER_LIST = HandlerList()
9
7
 
10
8
  def __init__(
11
- self, message: RustChatMessage, is_clan: bool, clan_id: Union[int, None]
9
+ self, message: RustChatMessage, is_clan: bool, clan_id: int | None
12
10
  ) -> None:
13
11
  self._message = message
14
12
  self._is_clan = is_clan
@@ -23,5 +21,5 @@ class ChatEventPayload:
23
21
  return self._is_clan
24
22
 
25
23
  @property
26
- def clan_id(self) -> Union[int, None]:
24
+ def clan_id(self) -> int | None:
27
25
  return self._clan_id
@@ -0,0 +1,2 @@
1
+ from .registered_listener import RegisteredListener
2
+ from .server_details import ServerDetails, DirectEndpoint, RelayEndpoint
@@ -0,0 +1,88 @@
1
+ import base64
2
+ import time
3
+ from dataclasses import dataclass, field
4
+
5
+ from websockets.typing import Subprotocol
6
+
7
+ from utils import deprecated
8
+
9
+
10
+ def _b64url(s: str) -> str:
11
+ return base64.urlsafe_b64encode(s.encode()).decode().rstrip("=")
12
+
13
+
14
+ @dataclass(frozen=True)
15
+ class DirectEndpoint:
16
+ ip: str
17
+ port: int | None = None
18
+ secure: bool = False
19
+
20
+ def id(self) -> str:
21
+ return f"{self.ip}:{self.port}" if self.port is not None else self.ip
22
+
23
+ def uri(self) -> str:
24
+ scheme = "wss" if self.secure else "ws"
25
+ host = self.ip if self.port is None else f"{self.ip}:{self.port}"
26
+ return f"{scheme}://{host}"
27
+
28
+ @staticmethod
29
+ def connect_kwargs() -> dict:
30
+ return {}
31
+
32
+
33
+ @dataclass(frozen=True)
34
+ class RelayEndpoint:
35
+ server_id: str
36
+ # secret and short-lived: excluded from repr, eq and hash
37
+ auth_token: str = field(repr=False, compare=False)
38
+ host: str = "companion-rust.facepunch.com"
39
+ version: int = int(time.time() * 1000)
40
+
41
+ def id(self) -> str:
42
+ return self.server_id
43
+
44
+ def uri(self) -> str:
45
+ return f"wss://{self.host}/socket/{self.server_id}?v={self.version}"
46
+
47
+ def connect_kwargs(self) -> dict:
48
+ return {
49
+ "subprotocols": [
50
+ Subprotocol("rustplus.auth.v1"),
51
+ Subprotocol(_b64url(self.auth_token)),
52
+ ],
53
+ "origin": "https://app.playrust.com",
54
+ }
55
+
56
+
57
+ Endpoint = DirectEndpoint | RelayEndpoint
58
+
59
+
60
+ @dataclass(frozen=True)
61
+ class ServerDetails:
62
+ endpoint: Endpoint
63
+ player_id: int
64
+ player_token: int = field(repr=False)
65
+
66
+ @classmethod
67
+ @deprecated
68
+ def direct(
69
+ cls,
70
+ ip: str,
71
+ port: int | None,
72
+ player_id: int,
73
+ player_token: int,
74
+ secure: bool = False,
75
+ ):
76
+ return cls(
77
+ DirectEndpoint(str(ip), int(port) if port else None, secure),
78
+ int(player_id),
79
+ int(player_token),
80
+ )
81
+
82
+ @classmethod
83
+ def facepunch(
84
+ cls, server_id: str, auth_token: str, player_id: int, player_token: int
85
+ ):
86
+ return cls(
87
+ RelayEndpoint(server_id, auth_token), int(player_id), int(player_token)
88
+ )
@@ -1,5 +1,5 @@
1
1
  import time
2
- from typing import Iterable, Union, List, Coroutine, Set, Callable
2
+ from typing import Iterable, List, Coroutine, Set, Callable
3
3
  from PIL import Image
4
4
 
5
5
  from .camera_parser import Parser
@@ -18,7 +18,7 @@ from .structures import CameraInfo, Entity, LimitedQueue
18
18
 
19
19
  class CameraManager:
20
20
 
21
- ACTIVE_INSTANCE: Union["CameraManager", None] = None
21
+ ACTIVE_INSTANCE: "CameraManager | None" = None
22
22
 
23
23
  def __init__(
24
24
  self, rust_socket, cam_id: str, cam_info_message: AppCameraInfo
@@ -60,7 +60,7 @@ class CameraManager:
60
60
  render_entities: bool = True,
61
61
  entity_render_distance: float | int = float("inf"),
62
62
  max_entity_amount: float | int = float("inf"),
63
- ) -> Union[Image.Image, None]:
63
+ ) -> Image.Image | None:
64
64
  if self._last_packets is None:
65
65
  return None
66
66
 
@@ -97,7 +97,7 @@ class CameraManager:
97
97
  render_entities: bool = True,
98
98
  entity_render_distance: float | int = float("inf"),
99
99
  max_entity_amount: float | int = float("inf"),
100
- ) -> Union[Image.Image, None]:
100
+ ) -> Image.Image | None:
101
101
  return await self._create_frame(
102
102
  render_entities, entity_render_distance, max_entity_amount
103
103
  )
@@ -2,7 +2,7 @@ import math
2
2
  from importlib import resources
3
3
  from math import radians, tan
4
4
  import random
5
- from typing import Union, Tuple, List, Any, Dict
5
+ from typing import Tuple, List, Any, Dict
6
6
  import numpy as np
7
7
  from scipy.spatial import ConvexHull
8
8
  from PIL import Image, ImageDraw, ImageFont
@@ -166,7 +166,7 @@ class Parser:
166
166
 
167
167
  return False
168
168
 
169
- def next_ray(self, ray_data) -> List[Union[float, int]]:
169
+ def next_ray(self, ray_data) -> List[float | int]:
170
170
  byte = ray_data[self.data_pointer]
171
171
  self.data_pointer += 1
172
172
 
@@ -64,8 +64,8 @@ class RateLimiter:
64
64
  self.socket_buckets[server_details] = TokenBucket(
65
65
  current, maximum, refresh_rate, refresh_amount
66
66
  )
67
- if server_details.get_server_string() not in self.server_buckets:
68
- self.server_buckets[server_details.get_server_string()] = TokenBucket(
67
+ if server_details.endpoint.id() not in self.server_buckets:
68
+ self.server_buckets[server_details.endpoint.id()] = TokenBucket(
69
69
  self.SERVER_LIMIT, self.SERVER_LIMIT, 1, self.SERVER_REFRESH_AMOUNT
70
70
  )
71
71
 
@@ -76,7 +76,7 @@ class RateLimiter:
76
76
  with self.lock:
77
77
  for bucket in [
78
78
  self.socket_buckets.get(server_details),
79
- self.server_buckets.get(server_details.get_server_string()),
79
+ self.server_buckets.get(server_details.endpoint.id()),
80
80
  ]:
81
81
  bucket.refresh()
82
82
  if not bucket.can_consume(amount):
@@ -90,14 +90,14 @@ class RateLimiter:
90
90
  with self.lock:
91
91
  for bucket in [
92
92
  self.socket_buckets.get(server_details),
93
- self.server_buckets.get(server_details.get_server_string()),
93
+ self.server_buckets.get(server_details.endpoint.id()),
94
94
  ]:
95
95
  bucket.refresh()
96
96
  if not bucket.can_consume(amount):
97
97
  raise RateLimitError("Not Enough Tokens")
98
98
  for bucket in [
99
99
  self.socket_buckets.get(server_details),
100
- self.server_buckets.get(server_details.get_server_string()),
100
+ self.server_buckets.get(server_details.endpoint.id()),
101
101
  ]:
102
102
  bucket.consume(amount)
103
103
 
@@ -112,7 +112,7 @@ class RateLimiter:
112
112
  delay = 0
113
113
  for bucket in [
114
114
  self.socket_buckets.get(server_details),
115
- self.server_buckets.get(server_details.get_server_string()),
115
+ self.server_buckets.get(server_details.endpoint.id()),
116
116
  ]:
117
117
  bucket.refresh()
118
118
  val = (
@@ -135,8 +135,6 @@ class RateLimiter:
135
135
  """
136
136
  with self.lock:
137
137
  del self.socket_buckets[server_details]
138
- server_str = server_details.get_server_string()
139
- if not any(
140
- d.get_server_string() == server_str for d in self.socket_buckets
141
- ):
138
+ server_str = server_details.endpoint.id()
139
+ if not any(d.endpoint.id() == server_str for d in self.socket_buckets):
142
140
  del self.server_buckets[server_str]
@@ -35,20 +35,20 @@ class AppCameraRaysEntityType(betterproto.Enum):
35
35
  Player = 2
36
36
 
37
37
 
38
- @dataclass
38
+ @dataclass(eq=False, repr=False)
39
39
  class Vector2(betterproto.Message):
40
40
  x: float = betterproto.float_field(1)
41
41
  y: float = betterproto.float_field(2)
42
42
 
43
43
 
44
- @dataclass
44
+ @dataclass(eq=False, repr=False)
45
45
  class Vector3(betterproto.Message):
46
46
  x: float = betterproto.float_field(1)
47
47
  y: float = betterproto.float_field(2)
48
48
  z: float = betterproto.float_field(3)
49
49
 
50
50
 
51
- @dataclass
51
+ @dataclass(eq=False, repr=False)
52
52
  class Vector4(betterproto.Message):
53
53
  x: float = betterproto.float_field(1)
54
54
  y: float = betterproto.float_field(2)
@@ -56,14 +56,14 @@ class Vector4(betterproto.Message):
56
56
  w: float = betterproto.float_field(4)
57
57
 
58
58
 
59
- @dataclass
59
+ @dataclass(eq=False, repr=False)
60
60
  class Half3(betterproto.Message):
61
61
  x: float = betterproto.float_field(1)
62
62
  y: float = betterproto.float_field(2)
63
63
  z: float = betterproto.float_field(3)
64
64
 
65
65
 
66
- @dataclass
66
+ @dataclass(eq=False, repr=False)
67
67
  class Color(betterproto.Message):
68
68
  r: float = betterproto.float_field(1)
69
69
  g: float = betterproto.float_field(2)
@@ -71,13 +71,13 @@ class Color(betterproto.Message):
71
71
  a: float = betterproto.float_field(4)
72
72
 
73
73
 
74
- @dataclass
74
+ @dataclass(eq=False, repr=False)
75
75
  class Ray(betterproto.Message):
76
76
  origin: "Vector3" = betterproto.message_field(1)
77
77
  direction: "Vector3" = betterproto.message_field(2)
78
78
 
79
79
 
80
- @dataclass
80
+ @dataclass(eq=False, repr=False)
81
81
  class ClanActionResult(betterproto.Message):
82
82
  request_id: int = betterproto.int32_field(1)
83
83
  result: int = betterproto.int32_field(2)
@@ -85,7 +85,7 @@ class ClanActionResult(betterproto.Message):
85
85
  clan_info: "ClanInfo" = betterproto.message_field(4)
86
86
 
87
87
 
88
- @dataclass
88
+ @dataclass(eq=False, repr=False)
89
89
  class ClanInfo(betterproto.Message):
90
90
  clan_id: int = betterproto.int64_field(1)
91
91
  name: str = betterproto.string_field(2)
@@ -102,7 +102,7 @@ class ClanInfo(betterproto.Message):
102
102
  max_member_count: int = betterproto.int32_field(13)
103
103
 
104
104
 
105
- @dataclass
105
+ @dataclass(eq=False, repr=False)
106
106
  class ClanInfoRole(betterproto.Message):
107
107
  role_id: int = betterproto.int32_field(1)
108
108
  rank: int = betterproto.int32_field(2)
@@ -117,7 +117,7 @@ class ClanInfoRole(betterproto.Message):
117
117
  can_access_logs: bool = betterproto.bool_field(11)
118
118
 
119
119
 
120
- @dataclass
120
+ @dataclass(eq=False, repr=False)
121
121
  class ClanInfoMember(betterproto.Message):
122
122
  steam_id: int = betterproto.uint64_field(1)
123
123
  role_id: int = betterproto.int32_field(2)
@@ -127,20 +127,20 @@ class ClanInfoMember(betterproto.Message):
127
127
  online: bool = betterproto.bool_field(6)
128
128
 
129
129
 
130
- @dataclass
130
+ @dataclass(eq=False, repr=False)
131
131
  class ClanInfoInvite(betterproto.Message):
132
132
  steam_id: int = betterproto.uint64_field(1)
133
133
  recruiter: int = betterproto.uint64_field(2)
134
134
  timestamp: int = betterproto.int64_field(3)
135
135
 
136
136
 
137
- @dataclass
137
+ @dataclass(eq=False, repr=False)
138
138
  class ClanLog(betterproto.Message):
139
139
  clan_id: int = betterproto.int64_field(1)
140
140
  log_entries: List["ClanLogEntry"] = betterproto.message_field(2)
141
141
 
142
142
 
143
- @dataclass
143
+ @dataclass(eq=False, repr=False)
144
144
  class ClanLogEntry(betterproto.Message):
145
145
  timestamp: int = betterproto.int64_field(1)
146
146
  event_key: str = betterproto.string_field(2)
@@ -150,19 +150,19 @@ class ClanLogEntry(betterproto.Message):
150
150
  arg4: str = betterproto.string_field(6)
151
151
 
152
152
 
153
- @dataclass
153
+ @dataclass(eq=False, repr=False)
154
154
  class ClanInvitations(betterproto.Message):
155
155
  invitations: List["ClanInvitationsInvitation"] = betterproto.message_field(1)
156
156
 
157
157
 
158
- @dataclass
158
+ @dataclass(eq=False, repr=False)
159
159
  class ClanInvitationsInvitation(betterproto.Message):
160
160
  clan_id: int = betterproto.int64_field(1)
161
161
  recruiter: int = betterproto.uint64_field(2)
162
162
  timestamp: int = betterproto.int64_field(3)
163
163
 
164
164
 
165
- @dataclass
165
+ @dataclass(eq=False, repr=False)
166
166
  class AppRequest(betterproto.Message):
167
167
  seq: int = betterproto.uint32_field(1)
168
168
  player_id: int = betterproto.uint64_field(2)
@@ -188,15 +188,16 @@ class AppRequest(betterproto.Message):
188
188
  camera_subscribe: "AppCameraSubscribe" = betterproto.message_field(30)
189
189
  camera_unsubscribe: "AppEmpty" = betterproto.message_field(31)
190
190
  camera_input: "AppCameraInput" = betterproto.message_field(32)
191
+ kick_from_team: "AppTeamKick" = betterproto.message_field(33)
191
192
 
192
193
 
193
- @dataclass
194
+ @dataclass(eq=False, repr=False)
194
195
  class AppMessage(betterproto.Message):
195
196
  response: "AppResponse" = betterproto.message_field(1)
196
197
  broadcast: "AppBroadcast" = betterproto.message_field(2)
197
198
 
198
199
 
199
- @dataclass
200
+ @dataclass(eq=False, repr=False)
200
201
  class AppResponse(betterproto.Message):
201
202
  seq: int = betterproto.uint32_field(1)
202
203
  success: "AppSuccess" = betterproto.message_field(4)
@@ -215,7 +216,7 @@ class AppResponse(betterproto.Message):
215
216
  camera_subscribe_info: "AppCameraInfo" = betterproto.message_field(20)
216
217
 
217
218
 
218
- @dataclass
219
+ @dataclass(eq=False, repr=False)
219
220
  class AppBroadcast(betterproto.Message):
220
221
  team_changed: "AppTeamChanged" = betterproto.message_field(4)
221
222
  team_message: "AppNewTeamMessage" = betterproto.message_field(5)
@@ -225,47 +226,52 @@ class AppBroadcast(betterproto.Message):
225
226
  camera_rays: "AppCameraRays" = betterproto.message_field(10)
226
227
 
227
228
 
228
- @dataclass
229
+ @dataclass(eq=False, repr=False)
229
230
  class AppEmpty(betterproto.Message):
230
231
  pass
231
232
 
232
233
 
233
- @dataclass
234
+ @dataclass(eq=False, repr=False)
234
235
  class AppSendMessage(betterproto.Message):
235
236
  message: str = betterproto.string_field(1)
236
237
 
237
238
 
238
- @dataclass
239
+ @dataclass(eq=False, repr=False)
239
240
  class AppSetEntityValue(betterproto.Message):
240
241
  value: bool = betterproto.bool_field(1)
241
242
 
242
243
 
243
- @dataclass
244
+ @dataclass(eq=False, repr=False)
244
245
  class AppPromoteToLeader(betterproto.Message):
245
246
  steam_id: int = betterproto.uint64_field(1)
246
247
 
247
248
 
248
- @dataclass
249
+ @dataclass(eq=False, repr=False)
250
+ class AppTeamKick(betterproto.Message):
251
+ steam_id: int = betterproto.uint64_field(1)
252
+
253
+
254
+ @dataclass(eq=False, repr=False)
249
255
  class AppGetNexusAuth(betterproto.Message):
250
256
  app_key: str = betterproto.string_field(1)
251
257
 
252
258
 
253
- @dataclass
259
+ @dataclass(eq=False, repr=False)
254
260
  class AppSuccess(betterproto.Message):
255
261
  pass
256
262
 
257
263
 
258
- @dataclass
264
+ @dataclass(eq=False, repr=False)
259
265
  class AppError(betterproto.Message):
260
266
  error: str = betterproto.string_field(1)
261
267
 
262
268
 
263
- @dataclass
269
+ @dataclass(eq=False, repr=False)
264
270
  class AppFlag(betterproto.Message):
265
271
  value: bool = betterproto.bool_field(1)
266
272
 
267
273
 
268
- @dataclass
274
+ @dataclass(eq=False, repr=False)
269
275
  class AppInfo(betterproto.Message):
270
276
  name: str = betterproto.string_field(1)
271
277
  header_image: str = betterproto.string_field(2)
@@ -285,7 +291,7 @@ class AppInfo(betterproto.Message):
285
291
  cameras_enabled: bool = betterproto.bool_field(16)
286
292
 
287
293
 
288
- @dataclass
294
+ @dataclass(eq=False, repr=False)
289
295
  class AppTime(betterproto.Message):
290
296
  day_length_minutes: float = betterproto.float_field(1)
291
297
  time_scale: float = betterproto.float_field(2)
@@ -294,7 +300,7 @@ class AppTime(betterproto.Message):
294
300
  time: float = betterproto.float_field(5)
295
301
 
296
302
 
297
- @dataclass
303
+ @dataclass(eq=False, repr=False)
298
304
  class AppMap(betterproto.Message):
299
305
  width: int = betterproto.uint32_field(1)
300
306
  height: int = betterproto.uint32_field(2)
@@ -304,20 +310,20 @@ class AppMap(betterproto.Message):
304
310
  background: str = betterproto.string_field(6)
305
311
 
306
312
 
307
- @dataclass
313
+ @dataclass(eq=False, repr=False)
308
314
  class AppMapMonument(betterproto.Message):
309
315
  token: str = betterproto.string_field(1)
310
316
  x: float = betterproto.float_field(2)
311
317
  y: float = betterproto.float_field(3)
312
318
 
313
319
 
314
- @dataclass
320
+ @dataclass(eq=False, repr=False)
315
321
  class AppEntityInfo(betterproto.Message):
316
322
  type: "AppEntityType" = betterproto.enum_field(1)
317
323
  payload: "AppEntityPayload" = betterproto.message_field(3)
318
324
 
319
325
 
320
- @dataclass
326
+ @dataclass(eq=False, repr=False)
321
327
  class AppEntityPayload(betterproto.Message):
322
328
  value: bool = betterproto.bool_field(1)
323
329
  items: List["AppEntityPayloadItem"] = betterproto.message_field(2)
@@ -326,14 +332,14 @@ class AppEntityPayload(betterproto.Message):
326
332
  protection_expiry: int = betterproto.uint32_field(5)
327
333
 
328
334
 
329
- @dataclass
335
+ @dataclass(eq=False, repr=False)
330
336
  class AppEntityPayloadItem(betterproto.Message):
331
337
  item_id: int = betterproto.int32_field(1)
332
338
  quantity: int = betterproto.int32_field(2)
333
339
  item_is_blueprint: bool = betterproto.bool_field(3)
334
340
 
335
341
 
336
- @dataclass
342
+ @dataclass(eq=False, repr=False)
337
343
  class AppTeamInfo(betterproto.Message):
338
344
  leader_steam_id: int = betterproto.uint64_field(1)
339
345
  members: List["AppTeamInfoMember"] = betterproto.message_field(2)
@@ -341,7 +347,7 @@ class AppTeamInfo(betterproto.Message):
341
347
  leader_map_notes: List["AppTeamInfoNote"] = betterproto.message_field(4)
342
348
 
343
349
 
344
- @dataclass
350
+ @dataclass(eq=False, repr=False)
345
351
  class AppTeamInfoMember(betterproto.Message):
346
352
  steam_id: int = betterproto.uint64_field(1)
347
353
  name: str = betterproto.string_field(2)
@@ -353,7 +359,7 @@ class AppTeamInfoMember(betterproto.Message):
353
359
  death_time: int = betterproto.uint32_field(8)
354
360
 
355
361
 
356
- @dataclass
362
+ @dataclass(eq=False, repr=False)
357
363
  class AppTeamInfoNote(betterproto.Message):
358
364
  type: int = betterproto.int32_field(2)
359
365
  x: float = betterproto.float_field(3)
@@ -363,7 +369,7 @@ class AppTeamInfoNote(betterproto.Message):
363
369
  label: str = betterproto.string_field(7)
364
370
 
365
371
 
366
- @dataclass
372
+ @dataclass(eq=False, repr=False)
367
373
  class AppTeamMessage(betterproto.Message):
368
374
  steam_id: int = betterproto.uint64_field(1)
369
375
  name: str = betterproto.string_field(2)
@@ -372,12 +378,12 @@ class AppTeamMessage(betterproto.Message):
372
378
  time: int = betterproto.uint32_field(5)
373
379
 
374
380
 
375
- @dataclass
381
+ @dataclass(eq=False, repr=False)
376
382
  class AppTeamChat(betterproto.Message):
377
383
  messages: List["AppTeamMessage"] = betterproto.message_field(1)
378
384
 
379
385
 
380
- @dataclass
386
+ @dataclass(eq=False, repr=False)
381
387
  class AppMarker(betterproto.Message):
382
388
  id: int = betterproto.uint32_field(1)
383
389
  type: "AppMarkerType" = betterproto.enum_field(2)
@@ -394,7 +400,7 @@ class AppMarker(betterproto.Message):
394
400
  sell_orders: List["AppMarkerSellOrder"] = betterproto.message_field(13)
395
401
 
396
402
 
397
- @dataclass
403
+ @dataclass(eq=False, repr=False)
398
404
  class AppMarkerSellOrder(betterproto.Message):
399
405
  item_id: int = betterproto.int32_field(1)
400
406
  quantity: int = betterproto.int32_field(2)
@@ -407,17 +413,17 @@ class AppMarkerSellOrder(betterproto.Message):
407
413
  item_condition_max: float = betterproto.float_field(9)
408
414
 
409
415
 
410
- @dataclass
416
+ @dataclass(eq=False, repr=False)
411
417
  class AppMapMarkers(betterproto.Message):
412
418
  markers: List["AppMarker"] = betterproto.message_field(1)
413
419
 
414
420
 
415
- @dataclass
421
+ @dataclass(eq=False, repr=False)
416
422
  class AppClanInfo(betterproto.Message):
417
423
  clan_info: "ClanInfo" = betterproto.message_field(1)
418
424
 
419
425
 
420
- @dataclass
426
+ @dataclass(eq=False, repr=False)
421
427
  class AppClanMessage(betterproto.Message):
422
428
  steam_id: int = betterproto.uint64_field(1)
423
429
  name: str = betterproto.string_field(2)
@@ -425,57 +431,57 @@ class AppClanMessage(betterproto.Message):
425
431
  time: int = betterproto.int64_field(4)
426
432
 
427
433
 
428
- @dataclass
434
+ @dataclass(eq=False, repr=False)
429
435
  class AppClanChat(betterproto.Message):
430
436
  messages: List["AppClanMessage"] = betterproto.message_field(1)
431
437
 
432
438
 
433
- @dataclass
439
+ @dataclass(eq=False, repr=False)
434
440
  class AppNexusAuth(betterproto.Message):
435
441
  server_id: str = betterproto.string_field(1)
436
442
  player_token: int = betterproto.int32_field(2)
437
443
 
438
444
 
439
- @dataclass
445
+ @dataclass(eq=False, repr=False)
440
446
  class AppTeamChanged(betterproto.Message):
441
447
  player_id: int = betterproto.uint64_field(1)
442
448
  team_info: "AppTeamInfo" = betterproto.message_field(2)
443
449
 
444
450
 
445
- @dataclass
451
+ @dataclass(eq=False, repr=False)
446
452
  class AppNewTeamMessage(betterproto.Message):
447
453
  message: "AppTeamMessage" = betterproto.message_field(1)
448
454
 
449
455
 
450
- @dataclass
456
+ @dataclass(eq=False, repr=False)
451
457
  class AppEntityChanged(betterproto.Message):
452
458
  entity_id: int = betterproto.uint32_field(1)
453
459
  payload: "AppEntityPayload" = betterproto.message_field(2)
454
460
 
455
461
 
456
- @dataclass
462
+ @dataclass(eq=False, repr=False)
457
463
  class AppClanChanged(betterproto.Message):
458
464
  clan_info: "ClanInfo" = betterproto.message_field(1)
459
465
 
460
466
 
461
- @dataclass
467
+ @dataclass(eq=False, repr=False)
462
468
  class AppNewClanMessage(betterproto.Message):
463
469
  clan_id: int = betterproto.int64_field(1)
464
470
  message: "AppClanMessage" = betterproto.message_field(2)
465
471
 
466
472
 
467
- @dataclass
473
+ @dataclass(eq=False, repr=False)
468
474
  class AppCameraSubscribe(betterproto.Message):
469
475
  camera_id: str = betterproto.string_field(1)
470
476
 
471
477
 
472
- @dataclass
478
+ @dataclass(eq=False, repr=False)
473
479
  class AppCameraInput(betterproto.Message):
474
480
  buttons: int = betterproto.int32_field(1)
475
481
  mouse_delta: "Vector2" = betterproto.message_field(2)
476
482
 
477
483
 
478
- @dataclass
484
+ @dataclass(eq=False, repr=False)
479
485
  class AppCameraInfo(betterproto.Message):
480
486
  width: int = betterproto.int32_field(1)
481
487
  height: int = betterproto.int32_field(2)
@@ -484,7 +490,7 @@ class AppCameraInfo(betterproto.Message):
484
490
  control_flags: int = betterproto.int32_field(5)
485
491
 
486
492
 
487
- @dataclass
493
+ @dataclass(eq=False, repr=False)
488
494
  class AppCameraRays(betterproto.Message):
489
495
  vertical_fov: float = betterproto.float_field(1)
490
496
  sample_offset: int = betterproto.int32_field(2)
@@ -494,7 +500,7 @@ class AppCameraRays(betterproto.Message):
494
500
  time_of_day: float = betterproto.float_field(6)
495
501
 
496
502
 
497
- @dataclass
503
+ @dataclass(eq=False, repr=False)
498
504
  class AppCameraRaysEntity(betterproto.Message):
499
505
  entity_id: int = betterproto.uint32_field(1)
500
506
  type: "AppCameraRaysEntityType" = betterproto.enum_field(2)