nonebot-plugin-l4d2-server 0.3.1.2__py3-none-any.whl → 0.3.1.4__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.
- README.md +4 -1
- nonebot_plugin_l4d2_server/__init__.py +34 -28
- nonebot_plugin_l4d2_server/command.py +11 -7
- nonebot_plugin_l4d2_server/config.py +13 -13
- {nonebot_plugin_l4d2_server-0.3.1.2.dist-info → nonebot_plugin_l4d2_server-0.3.1.4.dist-info}/LICENSE +0 -0
- {nonebot_plugin_l4d2_server-0.3.1.2.dist-info → nonebot_plugin_l4d2_server-0.3.1.4.dist-info}/METADATA +5 -2
- {nonebot_plugin_l4d2_server-0.3.1.2.dist-info → nonebot_plugin_l4d2_server-0.3.1.4.dist-info}/RECORD +8 -8
- {nonebot_plugin_l4d2_server-0.3.1.2.dist-info → nonebot_plugin_l4d2_server-0.3.1.4.dist-info}/WHEEL +0 -0
README.md
CHANGED
@@ -145,7 +145,9 @@ _✨Nonebot & Left 4 Dead 2 server操作✨_
|
|
145
145
|
| 求生地图/查看求生地图 | 所有人 | 看图 | 获取当前路径下所有的vpk文件,并输出目录 |
|
146
146
|
| (求生)地图删除[number] | 群管/超管 | 删图 | 根据求生地图列出的序号,删除地图,[number]可以在第二条消息内输入 |
|
147
147
|
| 求生地图[number][改/改名][text] | 群管/超管 | 改图名 | [number]同上,text为更改后名称,如果没有.vpk后缀会自动加上 |
|
148
|
-
| 求生服务器指令[text] | 群管/超管 | 控制台 | rcon
|
148
|
+
| 求生服务器指令[text] | 群管/超管 | 控制台 | rcon连接求生服务器控制台,使用ip和passsword |
|
149
|
+
| 求生路径 | 群管/超管 | 查看路径 | 查看当前服务器路径 |
|
150
|
+
| 求生路径切换[number] | 群管/超管 | 切换路径 | 切换本地服务器路径 |
|
149
151
|
|
150
152
|
### anne(电信服)
|
151
153
|
|
@@ -292,6 +294,7 @@ anne:<br>
|
|
292
294
|
- 在win端成功测试,修复压缩包bug
|
293
295
|
- 新增开关协程异步env设置
|
294
296
|
- 测试rcon建立通讯
|
297
|
+
- 实现切换路径查看地图和使用rcon指令
|
295
298
|
|
296
299
|
### 0.3.0--2022.2.18
|
297
300
|
|
@@ -39,7 +39,7 @@ scheduler = require("nonebot_plugin_apscheduler").scheduler
|
|
39
39
|
driver = get_driver()
|
40
40
|
|
41
41
|
|
42
|
-
__version__ = "0.3.1.
|
42
|
+
__version__ = "0.3.1.4"
|
43
43
|
__plugin_meta__ = PluginMetadata(
|
44
44
|
name="求生之路小助手",
|
45
45
|
description='群内对有关求生之路的查询和操作',
|
@@ -57,38 +57,43 @@ __plugin_meta__ = PluginMetadata(
|
|
57
57
|
@up.handle()
|
58
58
|
async def _(matcher:Matcher,event: NoticeEvent):
|
59
59
|
args = event.dict()
|
60
|
-
|
60
|
+
map_path = Path(l4_file[CHECK_FILE],vpk_path)
|
61
|
+
if args['notice_type'] != 'offline_file':
|
62
|
+
matcher.set_arg('txt',args)
|
63
|
+
else:
|
61
64
|
# 检查下载路径是否存在
|
62
65
|
# logger.info('检查下载路径是否存在')
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
66
|
+
l4_file_path = l4_file[CHECK_FILE]
|
67
|
+
# 检查下载路径是否存在
|
68
|
+
logger.info(l4_file_path)
|
69
|
+
if not Path(l4_file_path).exists():
|
70
|
+
await up.finish("你填写的路径不存在辣")
|
71
|
+
if not Path(map_path).exists():
|
72
|
+
await up.finish("这个路径并不是求生服务器的路径,请再看看罢")
|
73
|
+
# args = event.dict()
|
74
|
+
# if args['notice_type'] != 'offline_file': # 群聊值响应超管
|
75
|
+
# return
|
76
|
+
url = args['file']['url']
|
77
|
+
name: str = args['file']['name']
|
78
|
+
# user_id = txt['user_id']
|
79
|
+
# 如果不符合格式则忽略
|
80
|
+
await up.send('已收到文件,开始下载')
|
81
|
+
sleep(1) # 等待一秒防止因为文件名获取出现BUG
|
82
|
+
vpk_files = await updown_l4d2_vpk(map_path,name,url)
|
83
|
+
if vpk_files:
|
84
|
+
logger.info('检查到新增文件')
|
85
|
+
mes = "解压成功,新增以下几个vpk文件"
|
86
|
+
else:
|
87
|
+
mes = "你可能上传了相同的文件,或者解压失败了捏"
|
88
|
+
|
89
|
+
await up.finish(mes_list(mes,vpk_files))
|
86
90
|
|
87
91
|
|
88
92
|
@up.got("is_sure",prompt="请选择上传位置(输入阿拉伯数字)")
|
89
93
|
async def _(matcher: Matcher):
|
90
94
|
logger.info(l4_file)
|
91
95
|
args = matcher.get_arg('txt')
|
96
|
+
map_path = Path(l4_file[CHECK_FILE],vpk_path)
|
92
97
|
sleep(1)
|
93
98
|
if not args:
|
94
99
|
await matcher.finish('获取文件出错辣,再试一次吧')
|
@@ -118,7 +123,7 @@ async def _(matcher: Matcher):
|
|
118
123
|
return
|
119
124
|
await up.send('已收到文件,开始下载')
|
120
125
|
sleep(1) # 等待一秒防止因为文件名获取出现BUG
|
121
|
-
vpk_files = await updown_l4d2_vpk(
|
126
|
+
vpk_files = await updown_l4d2_vpk(Path(l4_file_path,vpk_path),name,url)
|
122
127
|
if vpk_files:
|
123
128
|
logger.info('检查到新增文件')
|
124
129
|
mes = "解压成功,新增以下几个vpk文件"
|
@@ -131,6 +136,7 @@ async def _(matcher: Matcher):
|
|
131
136
|
@find_vpk.handle()
|
132
137
|
async def _(bot:Bot,event: MessageEvent):
|
133
138
|
name_vpk = []
|
139
|
+
map_path = Path(l4_file[CHECK_FILE],vpk_path)
|
134
140
|
name_vpk = get_vpk(name_vpk,map_path)
|
135
141
|
logger.info("获取文件列表成功")
|
136
142
|
mes = "当前服务器下有以下vpk文件"
|
@@ -148,12 +154,14 @@ async def _(matcher:Matcher,args:Message = CommandArg()):
|
|
148
154
|
|
149
155
|
@del_vpk.got("num",prompt="你要删除第几个序号的地图(阿拉伯数字)")
|
150
156
|
async def _(tag:int = ArgPlainText("num")):
|
157
|
+
map_path = Path(l4_file[CHECK_FILE],vpk_path)
|
151
158
|
vpk_name = del_map(tag,map_path)
|
152
159
|
await del_vpk.finish('已删除地图:' + vpk_name)
|
153
160
|
|
154
161
|
@rename_vpk.handle()
|
155
162
|
async def _(matched: Tuple[int,str, str] = RegexGroup(),):
|
156
163
|
num,useless,rename = matched
|
164
|
+
map_path = Path(l4_file[CHECK_FILE],vpk_path)
|
157
165
|
logger.info('检查是否名字是.vpk后缀')
|
158
166
|
if not rename.endswith('.vpk'):
|
159
167
|
rename = rename + '.vpk'
|
@@ -242,7 +250,6 @@ async def _(args:Message = CommandArg()):
|
|
242
250
|
else:
|
243
251
|
CHECK_FILE = msg_number - 1
|
244
252
|
now_path = l4_file[CHECK_FILE]
|
245
|
-
load_config()
|
246
253
|
await check_path.send(f'已经切换路径为\n{str(CHECK_FILE+1)}、{now_path}')
|
247
254
|
else:
|
248
255
|
now_path = l4_file[CHECK_FILE]
|
@@ -336,7 +343,6 @@ async def _(matcher: Matcher,bot:Bot,event:GroupMessageEvent,state:T_State):
|
|
336
343
|
async def _(args:Message = CommandArg()):
|
337
344
|
"""更新"""
|
338
345
|
msg = args.extract_plain_text()
|
339
|
-
load_config()
|
340
346
|
if not msg:
|
341
347
|
load_josn()
|
342
348
|
reload_ip()
|
@@ -15,7 +15,7 @@ from nonebot.adapters.onebot.v11 import (
|
|
15
15
|
PrivateMessageEvent
|
16
16
|
)
|
17
17
|
from .l4d2_anne.server import server_key,ANNE_IP
|
18
|
-
from .config import Master,ADMINISTRATOR,reMaster
|
18
|
+
from .config import Master,ADMINISTRATOR,reMaster,file_format
|
19
19
|
|
20
20
|
help_ = on_command('l4_help',aliases={'求生帮助'},priority=20,block=True)
|
21
21
|
|
@@ -27,14 +27,18 @@ help_ = on_command('l4_help',aliases={'求生帮助'},priority=20,block=True)
|
|
27
27
|
def wenjian(
|
28
28
|
event:NoticeEvent):
|
29
29
|
superuse = nonebot.get_driver().config.l4_master
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
30
|
+
args = event.dict()
|
31
|
+
name: str = args['file']['name']
|
32
|
+
if args['notice_type'] == 'offline_file':
|
33
|
+
if superuse:
|
34
|
+
return name.endswith(file_format) and args['user_id'] in superuse
|
35
|
+
else:
|
36
|
+
return name.endswith(file_format)
|
37
|
+
elif args['notice_type'] == 'group_upload':
|
34
38
|
if superuse:
|
35
|
-
return
|
39
|
+
return args['user_id'] in superuse and name.endswith(file_format)
|
36
40
|
else:
|
37
|
-
return
|
41
|
+
return name.endswith(file_format)
|
38
42
|
|
39
43
|
up = on_notice(rule=wenjian)
|
40
44
|
# up = on_command('upmap',aliases={'上传地图','上传'},priority=20,block=True,permission= reMaster,handlers=[l4_up()])
|
@@ -91,19 +91,19 @@ l4_file, l4_steamid, l4_host, l4_port, l4_rcon, l4_master = l4_list
|
|
91
91
|
地图路径
|
92
92
|
'''
|
93
93
|
vpk_path = "left4dead2/addons"
|
94
|
-
map_path = Path(l4_file[CHECK_FILE],vpk_path)
|
95
|
-
l4_file_one = l4_file[CHECK_FILE]
|
96
|
-
l4_host_one = l4_host[CHECK_FILE]
|
97
|
-
l4_port_one = int(l4_port[CHECK_FILE])
|
98
|
-
l4_rcon_one = l4_rcon[CHECK_FILE]
|
99
|
-
def load_config():
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
94
|
+
# map_path = Path(l4_file[CHECK_FILE],vpk_path)
|
95
|
+
# l4_file_one = l4_file[CHECK_FILE]
|
96
|
+
# l4_host_one = l4_host[CHECK_FILE]
|
97
|
+
# l4_port_one = int(l4_port[CHECK_FILE])
|
98
|
+
# l4_rcon_one = l4_rcon[CHECK_FILE]
|
99
|
+
# def load_config():
|
100
|
+
# # 文件路径
|
101
|
+
# global map_path,l4_file_one,l4_host_one,l4_port_one,l4_rcon_one
|
102
|
+
# map_path = Path(l4_file[CHECK_FILE],vpk_path)
|
103
|
+
# l4_file_one = l4_file[CHECK_FILE]
|
104
|
+
# l4_host_one = l4_host[CHECK_FILE]
|
105
|
+
# l4_port_one = int(l4_port[CHECK_FILE])
|
106
|
+
# l4_rcon_one = l4_rcon[CHECK_FILE]
|
107
107
|
|
108
108
|
|
109
109
|
PLAYERSDATA = Path() / "data/L4D2/image/players"
|
File without changes
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: nonebot-plugin-l4d2-server
|
3
|
-
Version: 0.3.1.
|
3
|
+
Version: 0.3.1.4
|
4
4
|
Summary: L4D2 server related operations plugin for NoneBot
|
5
5
|
Home-page: https://github.com/Umamusume-Agnes-Digital/nonebot_plugin_l4d2_server
|
6
6
|
License: MIT
|
@@ -187,7 +187,9 @@ _✨Nonebot & Left 4 Dead 2 server操作✨_
|
|
187
187
|
| 求生地图/查看求生地图 | 所有人 | 看图 | 获取当前路径下所有的vpk文件,并输出目录 |
|
188
188
|
| (求生)地图删除[number] | 群管/超管 | 删图 | 根据求生地图列出的序号,删除地图,[number]可以在第二条消息内输入 |
|
189
189
|
| 求生地图[number][改/改名][text] | 群管/超管 | 改图名 | [number]同上,text为更改后名称,如果没有.vpk后缀会自动加上 |
|
190
|
-
| 求生服务器指令[text] | 群管/超管 | 控制台 | rcon
|
190
|
+
| 求生服务器指令[text] | 群管/超管 | 控制台 | rcon连接求生服务器控制台,使用ip和passsword |
|
191
|
+
| 求生路径 | 群管/超管 | 查看路径 | 查看当前服务器路径 |
|
192
|
+
| 求生路径切换[number] | 群管/超管 | 切换路径 | 切换本地服务器路径 |
|
191
193
|
|
192
194
|
### anne(电信服)
|
193
195
|
|
@@ -334,6 +336,7 @@ anne:<br>
|
|
334
336
|
- 在win端成功测试,修复压缩包bug
|
335
337
|
- 新增开关协程异步env设置
|
336
338
|
- 测试rcon建立通讯
|
339
|
+
- 实现切换路径查看地图和使用rcon指令
|
337
340
|
|
338
341
|
### 0.3.0--2022.2.18
|
339
342
|
|
{nonebot_plugin_l4d2_server-0.3.1.2.dist-info → nonebot_plugin_l4d2_server-0.3.1.4.dist-info}/RECORD
RENAMED
@@ -1,7 +1,7 @@
|
|
1
1
|
LICENSE,sha256=IwGE9guuL-ryRPEKi6wFPI_zOhg7zDZbTYuHbSt_SAk,35823
|
2
|
-
nonebot_plugin_l4d2_server/__init__.py,sha256=
|
3
|
-
nonebot_plugin_l4d2_server/command.py,sha256=
|
4
|
-
nonebot_plugin_l4d2_server/config.py,sha256=
|
2
|
+
nonebot_plugin_l4d2_server/__init__.py,sha256=pMDYYZXvh3d1EzoDjN47MxS3y23VLGQqyhhhgwpc4Fs,16661
|
3
|
+
nonebot_plugin_l4d2_server/command.py,sha256=md0LK2N0OVxWNWf850AT4Iwk_CA2_b8TnioFhaEv4MI,4975
|
4
|
+
nonebot_plugin_l4d2_server/config.py,sha256=rty6HGFS3a5v04kKzSOkBO6lOya_e_HlSqD9TZ-rxDU,3819
|
5
5
|
nonebot_plugin_l4d2_server/data/L4D2/font.ttf,sha256=COzaRqdqO7vgO2IEKRko3ck9ZOdm7_iwOfbe72UATzE,2365520
|
6
6
|
nonebot_plugin_l4d2_server/data/L4D2/image/head/head.png,sha256=Z72PEvp7xF1DZcLDeuWlg2_g6JAfHxtisptWn6BYGN8,158357
|
7
7
|
nonebot_plugin_l4d2_server/data/L4D2/image/header/player1.jpg,sha256=2A_llIi9YVhJs9JOMuF36by7Ewc7P7qOgQS8t5jemNw,405369
|
@@ -35,8 +35,8 @@ nonebot_plugin_l4d2_server/message.py,sha256=7Dx3XLC3Ef2nS1JWNUsOph1mM-XZikGqMri
|
|
35
35
|
nonebot_plugin_l4d2_server/seach.py,sha256=_H21KaSBJ941U8wqE-SRdPuBIYTKE2ogbuUk55B3ME0,1053
|
36
36
|
nonebot_plugin_l4d2_server/txt_to_img.py,sha256=ZaxHYNu8aAZUH4fNALyE1Q_ET7KuWytEiMFZ9loZnqc,2188
|
37
37
|
nonebot_plugin_l4d2_server/utils.py,sha256=_GY9zstxi1iWqDnBxZWzdTqMM-7-eGrl6i_IAvhuA8E,8270
|
38
|
-
README.md,sha256=
|
39
|
-
nonebot_plugin_l4d2_server-0.3.1.
|
40
|
-
nonebot_plugin_l4d2_server-0.3.1.
|
41
|
-
nonebot_plugin_l4d2_server-0.3.1.
|
42
|
-
nonebot_plugin_l4d2_server-0.3.1.
|
38
|
+
README.md,sha256=MGFW2EG_8Y-OnMR-ebBuJwRHjZwNll_vH9Xg_pacXu0,15098
|
39
|
+
nonebot_plugin_l4d2_server-0.3.1.4.dist-info/LICENSE,sha256=IwGE9guuL-ryRPEKi6wFPI_zOhg7zDZbTYuHbSt_SAk,35823
|
40
|
+
nonebot_plugin_l4d2_server-0.3.1.4.dist-info/METADATA,sha256=fj0z0ZosBoMADtgcUaGGBvDEugmOX0zboeVI3FETsA0,16453
|
41
|
+
nonebot_plugin_l4d2_server-0.3.1.4.dist-info/WHEEL,sha256=vVCvjcmxuUltf8cYhJ0sJMRDLr1XsPuxEId8YDzbyCY,88
|
42
|
+
nonebot_plugin_l4d2_server-0.3.1.4.dist-info/RECORD,,
|
{nonebot_plugin_l4d2_server-0.3.1.2.dist-info → nonebot_plugin_l4d2_server-0.3.1.4.dist-info}/WHEEL
RENAMED
File without changes
|