nonebot-plugin-l4d2-server 1.0.3__py3-none-any.whl → 1.0.5__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nonebot-plugin-l4d2-server
3
- Version: 1.0.3
3
+ Version: 1.0.5
4
4
  Summary: L4D2 server related operations plugin for NoneBot2
5
5
  Keywords: steam,game,l4d2,nonebot2,plugin
6
6
  Author-Email: Agnes_Digital <Z735803792@163.com>
@@ -25,14 +25,14 @@ Requires-Dist: nonebot-plugin-tortoise-orm>=0.1.4
25
25
  Requires-Dist: aiohttp>=3.8.4
26
26
  Requires-Dist: jinja2>=3.0.0
27
27
  Requires-Dist: srctools>=2.3.9
28
- Requires-Dist: httpx<0.24.1,>=0.22.0
28
+ Requires-Dist: httpx>=0.22.0
29
29
  Requires-Dist: msgspec>=0.18.0
30
30
  Requires-Dist: python-a2s>=1.4.1
31
31
  Requires-Dist: ujson>=5.10.0
32
32
  Requires-Dist: lxml>=5.2.2
33
33
  Requires-Dist: rcon>=2.1.0
34
- Requires-Dist: pillow>10
35
- Requires-Dist: beautifulsoup4>=4.12.3
34
+ Requires-Dist: pillow>10.0.0
35
+ Requires-Dist: bs4>=0.0.2
36
36
  Requires-Dist: rarfile>=4.2
37
37
  Requires-Dist: pyunpack>=0.3
38
38
  Requires-Dist: aiofiles>=24.1.0
@@ -47,7 +47,7 @@ Description-Content-Type: text/markdown
47
47
 
48
48
  <div align="center">
49
49
 
50
- # nonebot_plugin_l4d2_server 1.0.0a1
50
+ # nonebot_plugin_l4d2_server 1.0.4
51
51
 
52
52
  _✨Nonebot & Left 4 Dead 2 server操作✨_
53
53
  <div align = "center">
@@ -77,15 +77,12 @@ _✨Nonebot & Left 4 Dead 2 server操作✨_
77
77
 
78
78
  ## 顶置公告(如果以前用0.x.x版本暂时别更新)
79
79
 
80
- - **版本** 1.x.x进行了破坏式更新,目前处于测试阶段,使用旧插件的不要更新
80
+ - **版本** 1.x.x进行了破坏式更新,使用旧插件的不要更新
81
81
 
82
- ## 更改部分
82
+ ## 指令
83
83
 
84
- - 取消了网页控制台(没有卵用)
85
- - 取消了自动重启(与其他插件功能重复)
86
- - 取消了git拉取更新(nb规范用pypi)
87
- - 增加pil和浏览器渲染做选择(可以选择pil以节省性能性能)
88
- - 删除无用部分(依赖太多难以维护)
84
+ - 在json文件设置的前缀指令,例如设置"云",则指令 云 输出组服务器,云1 输出1号服务器
85
+ - l4图片开启/关闭 超管指令 可以修改输出单图是否为图片输出
89
86
 
90
87
  ## 安装
91
88
 
@@ -142,8 +139,7 @@ conda install nonebot-plugin-l4d2-server
142
139
  ## 主要功能
143
140
 
144
141
  - [ ] 求生服务器-本地多路径操作(传地图等)
145
- - [ ] 批量查询指定ip服务器状态和玩家
146
- - [ ] [求生电信服anne](https://github.com/fantasylidong/CompetitiveWithAnne)[查询~](https://sb.trygek.com/l4d_stats/ranking/index.php)
142
+ - [x] 批量查询指定ip服务器状态和玩家
147
143
 
148
144
  ## [数据结构](./docs/standand.md)
149
145
 
@@ -152,8 +148,6 @@ conda install nonebot-plugin-l4d2-server
152
148
  ## env设置
153
149
 
154
150
  """bash
155
- l4_anne = False
156
- """是否启用anne电信服相关功能"""
157
151
  l4_enable = True
158
152
  """是否全局启用求生功能"""
159
153
  l4_image = False
@@ -172,6 +166,15 @@ conda install nonebot-plugin-l4d2-server
172
166
  - 缤纷彩虹
173
167
  """
174
168
 
169
+ ## 和0.x.x更改部分
170
+
171
+ - 取消了网页控制台(没有卵用)
172
+ - 取消了自动重启(与其他插件功能重复)
173
+ - 取消了git拉取更新(nb规范用pypi)
174
+ - 增加pil和浏览器渲染做选择(可以选择pil以节省性能性能)
175
+ - 删除无用部分(依赖太多难以维护)
176
+ - 删除了anne部分,已移植到[这里](https://github.com/Agnes4m/L4D2UID),通过core插件调用
177
+
175
178
  ## 其他
176
179
 
177
180
  - 本人技术很差,如果您有发现BUG或者更好的建议,欢迎提Issue & Pr
@@ -1,15 +1,13 @@
1
- nonebot_plugin_l4d2_server-1.0.3.dist-info/METADATA,sha256=po5LeZo-Nk7oQNuaxa5Ve_3AANnFc4RxG8fnBbcqeK0,6688
2
- nonebot_plugin_l4d2_server-1.0.3.dist-info/WHEEL,sha256=tSfRZzRHthuv7vxpI4aehrdN9scLjk-dCJkPLzkHxGg,90
3
- nonebot_plugin_l4d2_server-1.0.3.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
4
- nonebot_plugin_l4d2_server-1.0.3.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
1
+ nonebot_plugin_l4d2_server-1.0.5.dist-info/METADATA,sha256=mNiEoZYrh9LH6-yF6j6i-aqYzdkdurCCjkIITD1ajnc,6759
2
+ nonebot_plugin_l4d2_server-1.0.5.dist-info/WHEEL,sha256=tSfRZzRHthuv7vxpI4aehrdN9scLjk-dCJkPLzkHxGg,90
3
+ nonebot_plugin_l4d2_server-1.0.5.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
4
+ nonebot_plugin_l4d2_server-1.0.5.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
5
5
  nonebot_plugin_l4d2_server/__init__.py,sha256=PIufOk1bxOx-nYqdoinoB7BcntIETNFwfzqKnmu-teE,1624
6
- nonebot_plugin_l4d2_server/__main__.py,sha256=AGqPjt0O6dW_E3D93hcqehtsPsvzSRC1qEtx6HqEAGo,8455
7
- nonebot_plugin_l4d2_server/config.py,sha256=ZLYJr9lVs1Q5en1m4EA0wF7H366EVm8-6AnN8dcyy7c,1394
6
+ nonebot_plugin_l4d2_server/__main__.py,sha256=2o6EyUyig3iPqcKA2jQM5nxGS_MtTyf-4yDXjr7ga9w,9923
7
+ nonebot_plugin_l4d2_server/config.py,sha256=t4BYygrrLTcsl9oBnyce0-tDhMCCkMrkEPs4DX2t4KI,2682
8
8
  nonebot_plugin_l4d2_server/data/font/loli.ttf,sha256=Yrh-RPoCrn1-NG94DR0x20ASXYUt8g3Ep6BCt3CdOFk,11125812
9
- nonebot_plugin_l4d2_server/l4_anne/__init__.py,sha256=zX4kTu4LAsqm7_li0-GcihnbYI65SBPkfUCPTs79U8k,4124
10
- nonebot_plugin_l4d2_server/l4_anne/ranne.py,sha256=vtNQJ-74rJiwVI3IYS3ZgFk_LaCviKU1yxrGk3DFvQs,532
11
- nonebot_plugin_l4d2_server/l4_help/Help.json,sha256=hz_k-qmGmGJKwCa8wmkHTLzXu6C-G-E_g7xdK-t6fNk,2673
12
- nonebot_plugin_l4d2_server/l4_help/__init__.py,sha256=YNR3eob0XvRb_-4wIP9ZcSMey0RuFS4RlHMZ217Bn0E,1535
9
+ nonebot_plugin_l4d2_server/l4_help/Help.json,sha256=D0YmZYGW-imC7nVebkQ0_eODiqevQhL9aKj-cyBaqDY,1704
10
+ nonebot_plugin_l4d2_server/l4_help/__init__.py,sha256=98IylQg9pVRmyPfyZXpKORsyHu1K_O82onQ6qRUfGag,1479
13
11
  nonebot_plugin_l4d2_server/l4_help/draw.py,sha256=y6yDPUnoZFvwly8cf7g9HRpT1JXTxyA9DC1TuvUinTM,6448
14
12
  nonebot_plugin_l4d2_server/l4_help/icon/介绍.png,sha256=3QC6A38QC-7gDBxmtQSQdbsz7hsefU5LL-oZmJ41zTk,3806
15
13
  nonebot_plugin_l4d2_server/l4_help/icon/任务.png,sha256=nyZ4_kM21ZO95nwanCFnUfCGX-PkmJXYQf9OrJVKomY,3782
@@ -56,7 +54,7 @@ nonebot_plugin_l4d2_server/l4_image/__init__.py,sha256=-GWXUDv_z_cfJ-wyvx5J3wB9P
56
54
  nonebot_plugin_l4d2_server/l4_image/anne_pil.py,sha256=Q_PHRzB_OgPbRbnLg-asVduV477F1rQnau2DhPOzf5k,500
57
55
  nonebot_plugin_l4d2_server/l4_image/convert.py,sha256=MISJq2JFcmQJaYZz6dDjQ2UusVORQt7rLSoAY_CyyWY,3894
58
56
  nonebot_plugin_l4d2_server/l4_image/download.py,sha256=qRAo0Ggj5KV8RQN3LFJe547__wwC7Ww4QnT-v3pfe6w,3116
59
- nonebot_plugin_l4d2_server/l4_image/html_img.py,sha256=P4UJO-7Uf77ECePjM6bSWcOvYRrfZ0BBlG7PLARyrF8,3387
57
+ nonebot_plugin_l4d2_server/l4_image/html_img.py,sha256=T5yvRch4ckqOIRXMl4b5XG57bWaUFNdPhggLIkwF_WY,3394
60
58
  nonebot_plugin_l4d2_server/l4_image/image_tools.py,sha256=rooAmk_3QXSmteORtD-yAvsNXXWcNI9l-b1NBoKlnsI,14513
61
59
  nonebot_plugin_l4d2_server/l4_image/img/anne/anne.html,sha256=8JOUXoWdulhoP2Axy_omuSDafbduKDZ9Y8Rz2VZWTso,1590
62
60
  nonebot_plugin_l4d2_server/l4_image/img/anne/back.png,sha256=jnsYjnvd2BFcdkdsW8HgcSloWF0ZliPkqlWSIDnFUxw,245488
@@ -86,14 +84,15 @@ nonebot_plugin_l4d2_server/l4_image/img/template/vue.css,sha256=2sGjCFrR-3tFMB_x
86
84
  nonebot_plugin_l4d2_server/l4_image/img/template/w.svg,sha256=LnctC2mVwjdhRMiS9ffrjUX-9KGwqb6OMmpJXvVXl70,486
87
85
  nonebot_plugin_l4d2_server/l4_image/model.py,sha256=FGsCvf_BKbRNJUVy6I5BKnArMY-3JEIdqeX2gs93E5o,231
88
86
  nonebot_plugin_l4d2_server/l4_image/vtfs.py,sha256=He_7zzEIOip8MXP55TS7aWPbzo6ac0wPf602nN3GWZM,1461
89
- nonebot_plugin_l4d2_server/l4_local/__init__.py,sha256=nz9KUxmuvRrryHakQQ4B30oC9jeGWZ3sON1tCKb-lS0,3603
87
+ nonebot_plugin_l4d2_server/l4_local/__init__.py,sha256=B4E30jX4733M4eNCJvIQhsN4M0nlxLezSXMSwUYLRIk,3581
90
88
  nonebot_plugin_l4d2_server/l4_local/file.py,sha256=hew1Y8kV3uSZvUGplmi09EGKC89-sUJWsWV7SCEstI8,3067
91
- nonebot_plugin_l4d2_server/l4_request/__init__.py,sha256=ukb90pROfHtLbIRSya5pRAGSpzB9Bb5gPi3kAH2-41Y,9588
92
- nonebot_plugin_l4d2_server/l4_request/draw_msg.py,sha256=efmlEBqbbOozf50InPNqONGIZ0D2hI4xAGPDROIcHBY,2883
93
- nonebot_plugin_l4d2_server/l4_request/utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
89
+ nonebot_plugin_l4d2_server/l4_request/__init__.py,sha256=WXIIq8LZjAFl_DHs94mI-QfgPj2_hIb6R1khVx1giNY,6881
90
+ nonebot_plugin_l4d2_server/l4_request/draw_msg.py,sha256=KpSfl6ZLaxPbax0SgO07niJloeMARuQJ2T-F_XeH6uQ,8108
91
+ nonebot_plugin_l4d2_server/l4_request/utils.py,sha256=byhwj7JSI5B_42egwQOoMy15AUbtET0dTGRd8HvGfqU,5197
94
92
  nonebot_plugin_l4d2_server/utils/api/api.py,sha256=auvDicCEKwvnm6EJYeCxCtugFby61K-zAmmaRWWEwtM,296
95
- nonebot_plugin_l4d2_server/utils/api/models.py,sha256=EKAAM5RsFK-hV-a80tc4r35ToNRhnCWVuQ-7imwBjwE,2386
96
- nonebot_plugin_l4d2_server/utils/api/request.py,sha256=hugBaPBK-gUr5Xemyk7dSHP1JlzYrEZcXPinkNX0AuU,14987
93
+ nonebot_plugin_l4d2_server/utils/api/models.py,sha256=p-hoxPHwadTaMRb2hqwfbaQ3pvJySrV8VbBmhA0Oi-M,2391
94
+ nonebot_plugin_l4d2_server/utils/api/request.py,sha256=9cipv2M7nar3kmpmmEjgtzBQKan18uup1osmsVMYs10,15969
95
+ nonebot_plugin_l4d2_server/utils/api/utils.py,sha256=AnI9vwe3hqyh3GR4Xg2oOsVaXHo1xvnCCsVpGaIbpZ8,773
97
96
  nonebot_plugin_l4d2_server/utils/database/models.py,sha256=SLdcgwsn39r_ZkcBoqf4MLX1EfpCOjGBwWcR16u9Bqo,454
98
- nonebot_plugin_l4d2_server/utils/utils.py,sha256=C-QzwtUCbq7QXmHplpmo3OTKbRztE1W7V-IywvufDl0,5971
99
- nonebot_plugin_l4d2_server-1.0.3.dist-info/RECORD,,
97
+ nonebot_plugin_l4d2_server/utils/utils.py,sha256=TD3cUCxmmj2GPmK1sQwP7NtkIXNO2FpuXjymaUqBDYo,6141
98
+ nonebot_plugin_l4d2_server-1.0.5.dist-info/RECORD,,
@@ -1,125 +0,0 @@
1
- from nonebot import log as log
2
- from nonebot import on_command
3
- from nonebot.adapters import Event, Message
4
- from nonebot.log import logger
5
- from nonebot.params import CommandArg
6
- from nonebot_plugin_alconna import UniMessage
7
-
8
- from ..utils.api.request import L4API
9
- from ..utils.database.models import SteamUser
10
- from ..utils.utils import get_message_at
11
- from .ranne import get_anne_rank_out
12
-
13
- anne_bind = on_command("Banne", aliases={"l4绑定", "anne绑定"}, priority=5, block=True)
14
- anne_search = on_command("Sanne", aliases={"anne搜索"})
15
- anne_rank = on_command("Ranne", aliases={"anne成绩"}, block=True, priority=1)
16
-
17
- anne_del = on_command(
18
- "Danne",
19
- aliases={"l4删除", "anne删除", "l4解绑", "anne解绑"},
20
- priority=5,
21
- block=True,
22
- )
23
-
24
-
25
- @anne_search.handle()
26
- async def _(args: Message = CommandArg()):
27
- name: str = args.extract_plain_text().strip()
28
- print(name)
29
- user_list = await L4API.get_anne_steamid(name)
30
- if user_list is None:
31
- await UniMessage.text("未找到玩家").finish()
32
- msg = f"---有{len(user_list)}个玩家---"
33
- for index, user in enumerate(user_list, start=1):
34
- if index >= 10:
35
- break
36
- msg += f"""
37
- {index}. {user["name"]} | [{user["score"]}] | {user["play_time"]}
38
- {user["steamid"]}
39
- """
40
- if msg:
41
- await UniMessage.text("\n".join(msg.splitlines())).finish()
42
- else:
43
- await UniMessage.text("没有找到玩家").finish()
44
-
45
-
46
- @anne_bind.handle()
47
- async def _(ev: Event, args: Message = CommandArg()):
48
- arg: str = args.extract_plain_text()
49
- if not arg:
50
- await UniMessage.text("虚空绑定?").finish()
51
-
52
- user = await SteamUser.get_or_none(userid=int(ev.get_user_id()))
53
- if user is None:
54
- user = await SteamUser.create(userid=int(ev.get_user_id()))
55
-
56
- if len(arg) == 17:
57
- # steamid64
58
- logger.info(f"SteamID64:{arg}")
59
- user.SteamID64 = arg
60
- msg = "绑定steamid64"
61
-
62
- elif arg.startswith("STEAM_"):
63
- # steamid
64
- logger.info(f"SteamID:{arg}")
65
- user.SteamID = arg
66
- msg = "绑定steamid"
67
-
68
- else:
69
- # name
70
- logger.info(f"Name:{arg}")
71
- user.Name = arg
72
- msg = "绑定名字"
73
- await user.save()
74
-
75
- return await UniMessage.text(f"{msg}成功").finish()
76
-
77
-
78
- @anne_del.handle()
79
- async def _(ev: Event):
80
- if record := await SteamUser.get_or_none(userid=int(ev.get_user_id())):
81
- logger.info(f"删除用户:{record}")
82
- await record.delete()
83
- await record.save()
84
- return await UniMessage.text("删除成功").finish()
85
- return await UniMessage.text("没有绑定信息呢").finish()
86
-
87
-
88
- @anne_rank.handle()
89
- async def _(ev: Event, args: Message = CommandArg()):
90
- uid = await get_message_at(str(ev.json()))
91
- if uid is None:
92
- uid = int(int(ev.get_user_id()))
93
- steamid = ""
94
- arg: str = args.extract_plain_text().strip()
95
- logger.info(f"arg:{arg}")
96
- # 优先从数据库查询
97
- if not arg:
98
- msg = await SteamUser.get_or_none(userid=uid)
99
- if msg is not None:
100
- steamid = msg.SteamID
101
- if not steamid:
102
- name = msg.Name
103
- if not name:
104
- await UniMessage.text("未绑定名字/steamid").finish()
105
- msg_dict = await L4API.get_anne_steamid(name)
106
- if not msg_dict:
107
- await UniMessage.text("绑定的昵称找不到呢").finish()
108
- steamid = msg_dict[0]["steamid"]
109
- logger.info(f"steamid:{steamid}")
110
-
111
- # 再从arg中查找
112
- else:
113
- if arg.startswith("STEAM_"):
114
- steamid = arg
115
- else:
116
- arg_dict = await L4API.get_anne_steamid(arg)
117
- if not arg_dict:
118
- await UniMessage.text("未找到该昵称玩家").finish()
119
- steamid = arg_dict[0]["steamid"]
120
- if not steamid:
121
- await UniMessage.text("未找到玩家,请使用指令`l4搜索`查找").finish()
122
- out_msg = await get_anne_rank_out(steamid)
123
- if out_msg is None:
124
- await UniMessage.text("未找到玩家").finish()
125
- await UniMessage.text(out_msg).finish()
@@ -1,18 +0,0 @@
1
- # coding=utf-8
2
- # anne战绩查询
3
- from ..utils.api.request import L4API
4
-
5
-
6
- async def get_anne_rank_out(steamid: str):
7
- msg = await L4API.get_anne_playerdetail(steamid)
8
- if msg is None:
9
- return None
10
- return f"""电信anne查询结果:
11
- 昵称:{msg['info']['name']}
12
- 排名:{msg['detail']['rank']}
13
- 分数:{msg['detail']["source"]}
14
- 击杀:{msg['detail']["kills"]}
15
- 爆头率:{msg['detail']["avg_source"]}
16
- 时间:{msg['info']['playtime']}
17
- 上次:{msg['info']['lasttime']}
18
- """