nonebot-plugin-l4d2-server 0.6.5__py3-none-any.whl → 0.6.6__py3-none-any.whl
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.
- nonebot_plugin_l4d2_server/__init__.py +1 -2
- nonebot_plugin_l4d2_server/l4d2_file/__init__.py +1 -2
- nonebot_plugin_l4d2_server/l4d2_file/utils.py +1 -1
- nonebot_plugin_l4d2_server/l4d2_image/__init__.py +4 -3
- nonebot_plugin_l4d2_server/l4d2_image/images.py +4 -8
- nonebot_plugin_l4d2_server/l4d2_push/__init__.py +0 -1
- nonebot_plugin_l4d2_server/l4d2_update/__init__.py +3 -1
- nonebot_plugin_l4d2_server/l4d2_utils/config.py +7 -2
- nonebot_plugin_l4d2_server/l4d2_web/webUI.py +12 -4
- {nonebot_plugin_l4d2_server-0.6.5.dist-info → nonebot_plugin_l4d2_server-0.6.6.dist-info}/METADATA +2 -2
- {nonebot_plugin_l4d2_server-0.6.5.dist-info → nonebot_plugin_l4d2_server-0.6.6.dist-info}/RECORD +13 -13
- {nonebot_plugin_l4d2_server-0.6.5.dist-info → nonebot_plugin_l4d2_server-0.6.6.dist-info}/WHEEL +1 -1
- {nonebot_plugin_l4d2_server-0.6.5.dist-info → nonebot_plugin_l4d2_server-0.6.6.dist-info}/licenses/LICENSE +0 -0
@@ -15,7 +15,6 @@
|
|
15
15
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
16
16
|
"""
|
17
17
|
|
18
|
-
|
19
18
|
from nonebot import get_driver, require
|
20
19
|
|
21
20
|
require("nonebot_plugin_apscheduler") # noqa: F401
|
@@ -42,7 +41,7 @@ from .l4d2_web import web, webUI # noqa: F401
|
|
42
41
|
|
43
42
|
driver = get_driver()
|
44
43
|
|
45
|
-
__version__ = "0.6.
|
44
|
+
__version__ = "0.6.6"
|
46
45
|
__plugin_meta__ = PluginMetadata(
|
47
46
|
name="求生之路小助手",
|
48
47
|
description="可用于管理求生之路查服和本地管理",
|
@@ -66,7 +66,7 @@ def open_packet(name: str, down_file: Path) -> str:
|
|
66
66
|
".7z": unpack_7zfile,
|
67
67
|
".rar": unpack_rarfile,
|
68
68
|
}
|
69
|
-
unpack_func = unpack_funcs.get(ext
|
69
|
+
unpack_func = unpack_funcs.get(ext)
|
70
70
|
if not unpack_func:
|
71
71
|
raise ValueError(f"不支持的拓展名: {ext}")
|
72
72
|
unpack_func(down_file, down_path)
|
@@ -51,6 +51,7 @@ async def dict_to_html(usr_id, detail_map: dict):
|
|
51
51
|
detail_right["url"] = detail_map["个人资料"]
|
52
52
|
detail_right["one_msg"] = detail_map["一言"]
|
53
53
|
detail_right["last_one"] = detail_map["救援关"]
|
54
|
+
|
54
55
|
# html_text = soup.prettify()
|
55
56
|
# for key, value in detail_right.items():
|
56
57
|
# html_text = html_text.replace(key,value)
|
@@ -74,12 +75,12 @@ async def server_ip_pic(msg_list: List[ServerStatus]):
|
|
74
75
|
server_info.rank_players = f"{server_info.players}/{server_info.max_players}"
|
75
76
|
players_list: List[PlayerInfo] = []
|
76
77
|
# logger.info(server_info.name)
|
77
|
-
|
78
|
-
sorted_players = sorted(server_info.Players, key=lambda x: x.Score)[:
|
78
|
+
max_number = l4_config.l4_img_name
|
79
|
+
sorted_players = sorted(server_info.Players, key=lambda x: x.Score)[:max_number]
|
79
80
|
for player_info in sorted_players:
|
80
81
|
# player_str = f"{player_info.name} | {player_info.Duration}"
|
81
82
|
players_list.append(player_info)
|
82
|
-
while len(players_list) <
|
83
|
+
while len(players_list) < max_number:
|
83
84
|
players_list.append(PlayerInfo())
|
84
85
|
server_info.Players = players_list
|
85
86
|
# logger.info(server_info.Players)
|
@@ -48,23 +48,19 @@ bg_path = CU_BG_PATH if list(CU_BG_PATH.iterdir()) != [] else NM_BG_PATH
|
|
48
48
|
|
49
49
|
|
50
50
|
@overload
|
51
|
-
async def convert_img(img: Image.Image, is_base64: bool = False) -> bytes:
|
52
|
-
...
|
51
|
+
async def convert_img(img: Image.Image, is_base64: bool = False) -> bytes: ...
|
53
52
|
|
54
53
|
|
55
54
|
@overload
|
56
|
-
async def convert_img(img: Image.Image, is_base64: bool = True) -> str:
|
57
|
-
...
|
55
|
+
async def convert_img(img: Image.Image, is_base64: bool = True) -> str: ...
|
58
56
|
|
59
57
|
|
60
58
|
@overload
|
61
|
-
async def convert_img(img: bytes, is_base64: bool = False) -> str:
|
62
|
-
...
|
59
|
+
async def convert_img(img: bytes, is_base64: bool = False) -> str: ...
|
63
60
|
|
64
61
|
|
65
62
|
@overload
|
66
|
-
async def convert_img(img: Path, is_base64: bool = False) -> str:
|
67
|
-
...
|
63
|
+
async def convert_img(img: Path, is_base64: bool = False) -> str: ...
|
68
64
|
|
69
65
|
|
70
66
|
async def convert_img(
|
@@ -50,7 +50,9 @@ async def _():
|
|
50
50
|
"更新记录",
|
51
51
|
"更新记录",
|
52
52
|
"查看插件最近的更新记录",
|
53
|
-
detail_des=(
|
53
|
+
detail_des=(
|
54
|
+
"介绍:\n查看插件最近的有效Git更新记录\n \n指令:\n- <ft color=(238,120,0)>更新记录</ft>"
|
55
|
+
),
|
54
56
|
)
|
55
57
|
async def send_updatelog_msg(
|
56
58
|
matcher: Matcher,
|
@@ -55,6 +55,7 @@ class L4d2Config(BaseModel):
|
|
55
55
|
web_username: str = Field("l4d2", alias="后台管理用户名")
|
56
56
|
web_password: str = Field("admin", alias="后台管理密码")
|
57
57
|
l4_style: str = Field("standard", alias="图片风格")
|
58
|
+
l4_img_name: int = Field(4, alias="图片显示玩家数量")
|
58
59
|
l4_ipall: List[Dict[str, Any]] = Field(
|
59
60
|
[
|
60
61
|
{
|
@@ -93,8 +94,12 @@ class L4d2Config(BaseModel):
|
|
93
94
|
l4_push_interval: int = Field(default=3, alias="定时任务间隔")
|
94
95
|
l4_push_times: int = Field(default=10, alias="定时任务次数")
|
95
96
|
l4_connect: bool = Field(default=True, alias="是否在查服命令后加入connect ip")
|
96
|
-
l4_group_upload: bool = Field(
|
97
|
-
|
97
|
+
l4_group_upload: bool = Field(
|
98
|
+
default=False, alias="是否在群里传地图的时候,提示上传服务器"
|
99
|
+
)
|
100
|
+
group_config: Dict[int, L4d2GroupConfig] = Field(
|
101
|
+
default_factory=dict, alias="分群配置"
|
102
|
+
)
|
98
103
|
|
99
104
|
def update(self, **kwargs):
|
100
105
|
for key, value in kwargs.items():
|
@@ -98,7 +98,9 @@ global_config_form = Form(
|
|
98
98
|
label="后台管理用户名",
|
99
99
|
name="web_username",
|
100
100
|
value="${web_username}",
|
101
|
-
labelRemark=Remark(
|
101
|
+
labelRemark=Remark(
|
102
|
+
shape="circle", content="登录本后台管理所需要的用户名。"
|
103
|
+
), # noqa: E501
|
102
104
|
),
|
103
105
|
InputPassword(
|
104
106
|
label="后台管理密码",
|
@@ -119,7 +121,9 @@ global_config_form = Form(
|
|
119
121
|
label="字体",
|
120
122
|
name="l4_font",
|
121
123
|
value="${l4_font}",
|
122
|
-
labelRemark=Remark(
|
124
|
+
labelRemark=Remark(
|
125
|
+
shape="circle", content="机器人返回图片中文字的字体。"
|
126
|
+
), # noqa: E501
|
123
127
|
),
|
124
128
|
Switch(
|
125
129
|
label="是否图片发送单服务器查询",
|
@@ -197,7 +201,9 @@ global_config_form = Form(
|
|
197
201
|
visibleOn="${total_enable}",
|
198
202
|
joinValues=False,
|
199
203
|
extractValue=True,
|
200
|
-
labelRemark=Remark(
|
204
|
+
labelRemark=Remark(
|
205
|
+
shape="circle", content="在这里加入的用户,才能上传地图"
|
206
|
+
), # noqa: E501
|
201
207
|
),
|
202
208
|
InputTag(
|
203
209
|
label="坐牢三指令tag",
|
@@ -426,7 +432,9 @@ server_page = PageSchema(
|
|
426
432
|
Alert(
|
427
433
|
level=LevelEnum.info,
|
428
434
|
className="white-space-pre-wrap",
|
429
|
-
body=(
|
435
|
+
body=(
|
436
|
+
f"此数据库记录了{NICKNAME}所在服务器下的求生服务器。\n· 功能暂未完善"
|
437
|
+
), # noqa: E501
|
430
438
|
),
|
431
439
|
server_control,
|
432
440
|
server_ditail,
|
{nonebot_plugin_l4d2_server-0.6.5.dist-info → nonebot_plugin_l4d2_server-0.6.6.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: nonebot-plugin-l4d2-server
|
3
|
-
Version: 0.6.
|
3
|
+
Version: 0.6.6
|
4
4
|
Summary: L4D2 server related operations plugin for NoneBot2
|
5
5
|
Keywords: steam game l4d2 nonebot2 plugin
|
6
6
|
Home-page: https://github.com/Agnes4m/nonebot_plugin_l4d2_server
|
@@ -30,7 +30,7 @@ Requires-Dist: httpx>=0.22.0
|
|
30
30
|
Requires-Dist: rcon==2.1.0
|
31
31
|
Requires-Dist: pillow<10.0.0
|
32
32
|
Requires-Dist: pyunpack>=0.3.0
|
33
|
-
Requires-Dist: ruamel.yaml
|
33
|
+
Requires-Dist: ruamel.yaml==0.17.21
|
34
34
|
Requires-Dist: rarfile>=4.0
|
35
35
|
Requires-Dist: patool>=1.12
|
36
36
|
Requires-Dist: python-a2s>=1.3.0
|
{nonebot_plugin_l4d2_server-0.6.5.dist-info → nonebot_plugin_l4d2_server-0.6.6.dist-info}/RECORD
RENAMED
@@ -1,7 +1,7 @@
|
|
1
|
-
nonebot_plugin_l4d2_server-0.6.
|
2
|
-
nonebot_plugin_l4d2_server-0.6.
|
3
|
-
nonebot_plugin_l4d2_server-0.6.
|
4
|
-
nonebot_plugin_l4d2_server/__init__.py,sha256=
|
1
|
+
nonebot_plugin_l4d2_server-0.6.6.dist-info/METADATA,sha256=hOWgsfeQPRxxcSqhh8li9UNBlSZG0iZCQf2wwtCMyME,7938
|
2
|
+
nonebot_plugin_l4d2_server-0.6.6.dist-info/WHEEL,sha256=N2J68yzZqJh3mI_Wg92rwhw0rtJDFpZj9bwQIMJgaVg,90
|
3
|
+
nonebot_plugin_l4d2_server-0.6.6.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
4
|
+
nonebot_plugin_l4d2_server/__init__.py,sha256=DH9_eqAVxmEZicQPcmvkBVXjRSl2oI80SYMaAjv8XP4,4814
|
5
5
|
nonebot_plugin_l4d2_server/data/L4D2/image/head/head.png,sha256=Z72PEvp7xF1DZcLDeuWlg2_g6JAfHxtisptWn6BYGN8,158357
|
6
6
|
nonebot_plugin_l4d2_server/data/L4D2/image/header/logo.png,sha256=1KhQNsx7zsCKGHmyIZ65dP9npkKzo7Im-Aafyi5_lhc,631630
|
7
7
|
nonebot_plugin_l4d2_server/data/L4D2/image/header/player1.jpg,sha256=2A_llIi9YVhJs9JOMuF36by7Ewc7P7qOgQS8t5jemNw,405369
|
@@ -28,20 +28,20 @@ nonebot_plugin_l4d2_server/l4d2_data/config.py,sha256=j_Iq2fmJkCX9G-oscuibhCvozF
|
|
28
28
|
nonebot_plugin_l4d2_server/l4d2_data/database.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
29
29
|
nonebot_plugin_l4d2_server/l4d2_data/players.py,sha256=0c4OAEKC38ZBTcbvI-lBl2D0wRUqwm0Spccmi4KlhqQ,3368
|
30
30
|
nonebot_plugin_l4d2_server/l4d2_data/serverip.py,sha256=YnzPwjQaESgOQq8m_aJxZlhwTqzVbwPHD6-EWoIXq60,1293
|
31
|
-
nonebot_plugin_l4d2_server/l4d2_file/__init__.py,sha256=
|
31
|
+
nonebot_plugin_l4d2_server/l4d2_file/__init__.py,sha256=CnkhLLELWxj9VUeQx8xB_KehyyfB_c9UgyEAeE_54b4,7177
|
32
32
|
nonebot_plugin_l4d2_server/l4d2_file/ayromote.py,sha256=CND4LSKEYO86bSrd6_TGe9A5RvVJpy2_--tX9mROHIM,1868
|
33
33
|
nonebot_plugin_l4d2_server/l4d2_file/input_json.py,sha256=_S7NIUZhZlE63ueETnPyVcZMnBAAwIVZdmW3VBukccY,2347
|
34
34
|
nonebot_plugin_l4d2_server/l4d2_file/remote.py,sha256=vzW1RhqAUi7lMLjeoYOUvy_70NVHgGQS07oPkeWNxgk,3074
|
35
|
-
nonebot_plugin_l4d2_server/l4d2_file/utils.py,sha256
|
36
|
-
nonebot_plugin_l4d2_server/l4d2_image/__init__.py,sha256=
|
35
|
+
nonebot_plugin_l4d2_server/l4d2_file/utils.py,sha256=-L_upM6cmVh5GhLyL1NneyEW_ewNOmnT2lcliRAAqe0,3050
|
36
|
+
nonebot_plugin_l4d2_server/l4d2_image/__init__.py,sha256=Y2y1Viy3mbgV8JA8vHHM23Z7Oaxx5-TVudC1ONzf_a0,4545
|
37
37
|
nonebot_plugin_l4d2_server/l4d2_image/download.py,sha256=_ndH2KlehQ5L84hX0b3Lqz0GYQhAWXGy6XJZZODcGqM,4248
|
38
38
|
nonebot_plugin_l4d2_server/l4d2_image/htmlimg.py,sha256=7nVaLI89e8UXehCfBrxumYMj2wIR1V8UWRDueQW-lhQ,664
|
39
|
-
nonebot_plugin_l4d2_server/l4d2_image/images.py,sha256=
|
39
|
+
nonebot_plugin_l4d2_server/l4d2_image/images.py,sha256=wqtAuMfKPvFsgsvIGFYNsES2r1iCs5-yL0_zJo7PFjs,2785
|
40
40
|
nonebot_plugin_l4d2_server/l4d2_image/one.py,sha256=8rZ5GD-F3mp_tXVsbPRoFV4xFiSVDMxMYV2GsAc6TUI,1142
|
41
41
|
nonebot_plugin_l4d2_server/l4d2_image/send_image_tool.py,sha256=0qcce0wOI7liuwjsbUPbFhfMXG06hkrpoSpGlCbl3j4,922
|
42
42
|
nonebot_plugin_l4d2_server/l4d2_image/steam.py,sha256=4c428t9bkRxig4Hmj4XllaoKCSsY6fpIYIkq1DhHUiE,2203
|
43
43
|
nonebot_plugin_l4d2_server/l4d2_image/vtfs.py,sha256=AltoUKpMzWQHY_PSqmlSHQyomk2dZHHML4YN6rnP1s0,1415
|
44
|
-
nonebot_plugin_l4d2_server/l4d2_push/__init__.py,sha256=
|
44
|
+
nonebot_plugin_l4d2_server/l4d2_push/__init__.py,sha256=trCYaSVr6im6ggQk5gedZJ3kZiOGs5UO8V7fl-pYfs0,7686
|
45
45
|
nonebot_plugin_l4d2_server/l4d2_queries/__init__.py,sha256=BK5Rqf4gDCcEkpHPtIVQeLz-PtSW09HBsG8WFsHqNuE,10312
|
46
46
|
nonebot_plugin_l4d2_server/l4d2_queries/himi.py,sha256=iu34wD6P7yWXK_WtErpqmSlNLUjq2pwqO_wf_Rd3X8c,3547
|
47
47
|
nonebot_plugin_l4d2_server/l4d2_queries/local_ip.py,sha256=-wPvCx8mzl7KVh_OlC3j_EjYMf5IEIeLYkZNnknxITY,1281
|
@@ -52,19 +52,19 @@ nonebot_plugin_l4d2_server/l4d2_server/__init__.py,sha256=azvqgmH-SY2_AESIl8Uta9
|
|
52
52
|
nonebot_plugin_l4d2_server/l4d2_server/index.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
53
53
|
nonebot_plugin_l4d2_server/l4d2_server/rcon.py,sha256=1vz1CAZg0atqIk45d18273ubFd8rm8Y2iW2SK0F8s20,1669
|
54
54
|
nonebot_plugin_l4d2_server/l4d2_server/workshop.py,sha256=m-ZdzYGOWOIxK_cSPAJ8tTr9NA16KpsQgauQt0PTs-g,2846
|
55
|
-
nonebot_plugin_l4d2_server/l4d2_update/__init__.py,sha256=
|
55
|
+
nonebot_plugin_l4d2_server/l4d2_update/__init__.py,sha256=F--dU5arxQztldaH6pr5e-js5UYVksTk9i9mRq3VYGc,4043
|
56
56
|
nonebot_plugin_l4d2_server/l4d2_update/draw_update_log.py,sha256=-Tkn2GBIrDskHbwgAtrh05HflqX32z79vGjIBjR1GQo,1186
|
57
57
|
nonebot_plugin_l4d2_server/l4d2_update/restart.py,sha256=R4tSNgvbqtKCRTVdp41td2mkBNV96I35PfSetm9o5YU,2181
|
58
58
|
nonebot_plugin_l4d2_server/l4d2_update/update.py,sha256=h_YPzWWO6LY5v-m0Yg6fVUhHCvv4qOsdyk6vmotZETA,1465
|
59
59
|
nonebot_plugin_l4d2_server/l4d2_utils/classcal.py,sha256=WqI1pHnTdrgjQ_9YULhaFhERkUYZ-WhtvKBHHaT6_Sg,1226
|
60
60
|
nonebot_plugin_l4d2_server/l4d2_utils/command.py,sha256=cCflT3o5hvE4k56Bbg2TtY5avyEM-Z8nY9GNU3KtoXo,629
|
61
|
-
nonebot_plugin_l4d2_server/l4d2_utils/config.py,sha256=
|
61
|
+
nonebot_plugin_l4d2_server/l4d2_utils/config.py,sha256=4fz-VqAFLEIZw9O-08f52MzVqqzS_WIV2XIOno5Gw4w,6282
|
62
62
|
nonebot_plugin_l4d2_server/l4d2_utils/message.py,sha256=VzLtK9iPjJHPS1I7cmEIBCxiCivH0xaoBX-S_S9izZY,1631
|
63
63
|
nonebot_plugin_l4d2_server/l4d2_utils/rule.py,sha256=A_lC5i8hiQEZiTcCW_Pn2sldwuD5Pz3UdMHiozFqunc,1007
|
64
64
|
nonebot_plugin_l4d2_server/l4d2_utils/seach.py,sha256=ZAhwvS_xxSYg8AXIaRQTp9HzdAnSy2tHhxXrhR_YytQ,1230
|
65
65
|
nonebot_plugin_l4d2_server/l4d2_utils/txt_to_img.py,sha256=GNbveJi5sFlyqIpcBjHmyib2_of2kBs7lfq0VqLT83w,794
|
66
66
|
nonebot_plugin_l4d2_server/l4d2_utils/utils.py,sha256=S1MYcfD38Fcvz4y1jEuoKWhc5LYYT-Skk2K7iVCr7P0,5898
|
67
67
|
nonebot_plugin_l4d2_server/l4d2_web/web.py,sha256=YvEMxG0nDrjbm4-IK9GkZlV7MPF9Nedc3goCnCUk_LA,9799
|
68
|
-
nonebot_plugin_l4d2_server/l4d2_web/webUI.py,sha256=
|
68
|
+
nonebot_plugin_l4d2_server/l4d2_web/webUI.py,sha256=sk0rcF3EnwLr2yTvLAu-BKmAixZTLLPZ1vvE54ym1tc,16345
|
69
69
|
nonebot_plugin_l4d2_server/l4d2_web/webUI_s.py,sha256=Y8PxkarJPsF9OvUVWCJ3SyhWYlYU5VQNnRGKG72KwFc,3339
|
70
|
-
nonebot_plugin_l4d2_server-0.6.
|
70
|
+
nonebot_plugin_l4d2_server-0.6.6.dist-info/RECORD,,
|
File without changes
|