nonebot-plugin-l4d2-server 0.4.0b1__py3-none-any.whl → 0.4.0b2__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 +20 -6
- nonebot_plugin_l4d2_server/__init__.py +48 -30
- nonebot_plugin_l4d2_server/command.py +0 -1
- nonebot_plugin_l4d2_server/config.py +0 -16
- nonebot_plugin_l4d2_server/l4d2_queries/qqgroup.py +0 -9
- {nonebot_plugin_l4d2_server-0.4.0b1.dist-info → nonebot_plugin_l4d2_server-0.4.0b2.dist-info}/METADATA +21 -8
- {nonebot_plugin_l4d2_server-0.4.0b1.dist-info → nonebot_plugin_l4d2_server-0.4.0b2.dist-info}/RECORD +9 -9
- {nonebot_plugin_l4d2_server-0.4.0b1.dist-info → nonebot_plugin_l4d2_server-0.4.0b2.dist-info}/LICENSE +0 -0
- {nonebot_plugin_l4d2_server-0.4.0b1.dist-info → nonebot_plugin_l4d2_server-0.4.0b2.dist-info}/WHEEL +0 -0
README.md
CHANGED
@@ -42,6 +42,7 @@ _✨Nonebot & Left 4 Dead 2 server操作✨_
|
|
42
42
|
l4_port = ['20715']
|
43
43
|
l4_rcon = ['1145149191810']
|
44
44
|
l4_font = 'simsun.ttc'
|
45
|
+
l4_tag = ['呆呆']
|
45
46
|
l4_only = True
|
46
47
|
|
47
48
|
<h2 id="gn">主要功能</h2>
|
@@ -52,6 +53,14 @@ _✨Nonebot & Left 4 Dead 2 server操作✨_
|
|
52
53
|
- [求生电信服anne](https://github.com/fantasylidong/CompetitiveWithAnne)[查询~](https://sb.trygek.com/l4d_stats/ranking/index.php)
|
53
54
|
|
54
55
|
|
56
|
+
<h2 id="gn">如何获取key</h2>
|
57
|
+
|
58
|
+
为了使得ip不被滥用,我采取这种方式管理。
|
59
|
+
[点击这里加群](https://jq.qq.com/?_wv=1027&k=HdjoCcAe)
|
60
|
+
如果你只查询自己的服务器ip则可以忽略如下,并且更改env设置:
|
61
|
+
|
62
|
+
l4_tag = []
|
63
|
+
|
55
64
|
|
56
65
|
## 🔖 更新日志
|
57
66
|
|
@@ -237,12 +246,16 @@ _✨Nonebot & Left 4 Dead 2 server操作✨_
|
|
237
246
|
|
238
247
|
</details>
|
239
248
|
|
240
|
-
##
|
249
|
+
## 🙈 其他
|
241
250
|
|
242
|
-
|
251
|
+
+ 本人技术很差,如果您有发现BUG或者更好的建议,欢迎提Issue & Pr
|
252
|
+
+ 如果本插件对你有帮助,不要忘了点个Star~
|
253
|
+
+ 本项目仅供学习使用,请勿用于商业用途
|
254
|
+
+ [GPL-3.0 License](https://github.com/Umamusume-Agnes-Digital/nonebot_plugin_l4d2_server/blob/main/LICENSE) ©[@Umamusume-Agnes-Digital](https://github.com/Umamusume-Agnes-Digital)
|
255
|
+
|
243
256
|
|
244
257
|
|
245
|
-
<h2 id="ty"
|
258
|
+
<h2 id="ty">🌐 感谢</h2>
|
246
259
|
|
247
260
|
- [修仙](https://github.com/s52047qwas/nonebot_plugin_xiuxian) - 数据库的写法来自于他
|
248
261
|
- ~ [自己写的求生之路查询库](https://github.com/Umamusume-Agnes-Digital/VSQ) ~已弃用
|
@@ -252,14 +265,15 @@ _✨Nonebot & Left 4 Dead 2 server操作✨_
|
|
252
265
|
- [gsuid](https://github.com/KimigaiiWuyi/GenshinUID) - readme和wiki的格式参考
|
253
266
|
- 呆呆 - 提供三方地图的详细数据
|
254
267
|
|
255
|
-
|
268
|
+
<h2 id="ty">🌐 默认服务器</h2>
|
269
|
+
目前**已授权**的服务器查询,如果需要加入自己的ip可以进qq群私聊群主
|
256
270
|
|
257
271
|
| 指令 | 服务器 | op | 数量 |
|
258
272
|
|:-----:|:----:|:----:|:----:|
|
259
|
-
| 云 |
|
273
|
+
| 云 | anne电信服云服 | 东 | 22
|
260
274
|
| 呆呆 | 呆呆的小窝 | 提莫大魔王 | 15
|
261
275
|
| 橘 | 橘希实香的小窝 | 橘希实香 | 8
|
262
276
|
| 竹 | 竹烨 | 竹烨oО柠檬茶 | 9
|
263
277
|
| 音理 | 星空列车与白的旅行 | 音理 | 2
|
264
278
|
|
265
|
-
|
279
|
+
**如果提供了ip,那么我只能尽可能保证您的ipv4不会泄漏,如果无法承担风险则请勿提供ip**
|
@@ -31,7 +31,7 @@ from .l4d2_data import sq_L4D2
|
|
31
31
|
from nonebot import get_driver, require
|
32
32
|
from .l4d2_image.vtfs import img_to_vtf
|
33
33
|
from .l4d2_queries.ohter import load_josn
|
34
|
-
from .l4d2_queries.qqgroup import write_json
|
34
|
+
from .l4d2_queries.qqgroup import write_json
|
35
35
|
from .l4d2_file import updown_l4d2_vpk,all_zip_to_one
|
36
36
|
|
37
37
|
from .txt_to_img import mode_txt_to_img
|
@@ -375,18 +375,6 @@ async def _(args:Message = CommandArg()):
|
|
375
375
|
message = await write_json(msg)
|
376
376
|
await updata.finish(message)
|
377
377
|
|
378
|
-
@read_ip.handle()
|
379
|
-
async def _():
|
380
|
-
img = await qq_ip_queries_pic(ip_anne_list)
|
381
|
-
if img == None:
|
382
|
-
return "电信服的地址请加主群自行填写哦"
|
383
|
-
await read_ip.finish(MessageSegment.image(img))
|
384
|
-
|
385
|
-
@tan_jian.handle()
|
386
|
-
async def _(event:MessageEvent):
|
387
|
-
await tan_jian.send('正在寻找牢房...')
|
388
|
-
msg = await get_tan_jian(ip_anne_list,1)
|
389
|
-
await tan_jian.finish(msg)
|
390
378
|
|
391
379
|
|
392
380
|
@vtf_make.handle()
|
@@ -414,16 +402,6 @@ async def _(bot:Bot,event:MessageEvent,state:T_State,tag = Arg("image")):
|
|
414
402
|
await upload_file(bot, event, img_bytes, file_name)
|
415
403
|
|
416
404
|
|
417
|
-
@prison.handle()
|
418
|
-
async def _(event:MessageEvent):
|
419
|
-
msg = await get_tan_jian(ip_anne_list,2)
|
420
|
-
await tan_jian.finish(msg)
|
421
|
-
|
422
|
-
@open_prison.handle()
|
423
|
-
async def _(event:MessageEvent):
|
424
|
-
|
425
|
-
msg = await get_tan_jian(ip_anne_list,3)
|
426
|
-
await tan_jian.finish(msg)
|
427
405
|
|
428
406
|
@smx_file.handle()
|
429
407
|
async def _():
|
@@ -474,11 +452,35 @@ async def _(bot:Bot,event:GroupMessageEvent,state:T_State):
|
|
474
452
|
|
475
453
|
@driver.on_bot_connect
|
476
454
|
async def _():
|
477
|
-
|
455
|
+
global ALL_HOST
|
456
|
+
global ANNE_IP
|
457
|
+
ALL_HOST.update(await seach_map(l4_tag,l4_qq,l4_key,'ip'))
|
458
|
+
def count_ips(ip_dict:dict):
|
459
|
+
for key, value in ip_dict.items():
|
460
|
+
if key == 'error_':
|
461
|
+
continue
|
462
|
+
count = len(value)
|
463
|
+
logger.info(f'已加载:{key} | {count}个')
|
464
|
+
if key == '云':
|
465
|
+
ANNE_IP = {key:value}
|
466
|
+
count_ips(ALL_HOST)
|
467
|
+
|
468
|
+
ip_anne_list=[]
|
469
|
+
try:
|
470
|
+
ips = ALL_HOST['云']
|
471
|
+
ip_anne_list = []
|
472
|
+
for one_ip in ips:
|
473
|
+
host,port = split_maohao(one_ip['ip'])
|
474
|
+
ip_anne_list.append((one_ip['id'],host,port))
|
475
|
+
except KeyError:
|
476
|
+
pass
|
477
|
+
get_ip = on_command('anne',aliases=server_key(),priority=80,block=True)
|
478
478
|
@get_ip.handle()
|
479
|
-
async def _(command: str = RawCommand(),args:Message = CommandArg()):
|
480
|
-
if
|
481
|
-
command.replace(
|
479
|
+
async def _(start:str = CommandStart(),command: str = RawCommand(),args:Message = CommandArg(),):
|
480
|
+
if start:
|
481
|
+
command.replace(start,'')
|
482
|
+
if command == 'anne':
|
483
|
+
command = '云'
|
482
484
|
msg:str = args.extract_plain_text()
|
483
485
|
if not msg:
|
484
486
|
# 以图片输出全部当前
|
@@ -489,9 +491,9 @@ async def _():
|
|
489
491
|
ip_list.append((one_ip['id'],host,port))
|
490
492
|
img = await qq_ip_queries_pic(ip_list)
|
491
493
|
if img:
|
492
|
-
await
|
494
|
+
await get_ip.finish(MessageSegment.image(img))
|
493
495
|
else:
|
494
|
-
await
|
496
|
+
await get_ip.finish("服务器无响应")
|
495
497
|
else:
|
496
498
|
if not msg[0].isdigit():
|
497
499
|
if msg.startswith(gamemode_list):
|
@@ -509,10 +511,26 @@ async def _():
|
|
509
511
|
await get_ip.finish(msg)
|
510
512
|
except (OSError,asyncio.exceptions.TimeoutError):
|
511
513
|
await get_ip.finish('服务器无响应')
|
514
|
+
|
515
|
+
@tan_jian.handle()
|
516
|
+
async def _(event:MessageEvent):
|
517
|
+
await tan_jian.send('正在寻找牢房...')
|
518
|
+
msg = await get_tan_jian(ip_anne_list,1)
|
519
|
+
await tan_jian.finish(msg)
|
520
|
+
|
521
|
+
@prison.handle()
|
522
|
+
async def _(event:MessageEvent):
|
523
|
+
msg = await get_tan_jian(ip_anne_list,2)
|
524
|
+
await tan_jian.finish(msg)
|
525
|
+
|
526
|
+
@open_prison.handle()
|
527
|
+
async def _(event:MessageEvent):
|
512
528
|
|
529
|
+
msg = await get_tan_jian(ip_anne_list,3)
|
530
|
+
await tan_jian.finish(msg)
|
531
|
+
|
513
532
|
|
514
533
|
@driver.on_shutdown
|
515
534
|
async def close_db():
|
516
535
|
"""关闭数据库"""
|
517
536
|
sq_L4D2._close()
|
518
|
-
logger.info('已断开求生数据库')
|
@@ -66,7 +66,6 @@ smx_file = on_command('l4_smx',aliases={'求生插件'},priority=20,block=True,p
|
|
66
66
|
anne_player = on_command('Ranne',aliases={"求生anne"},priority=25,block=True)
|
67
67
|
anne_bind = on_command('Rbind',aliases={'steam绑定','求生绑定','anne绑定'},priority=20,block=True)
|
68
68
|
del_bind = on_command('del_bind',aliases={'steam解绑','求生解绑','anne解绑'},priority=20,block=True)
|
69
|
-
read_ip = on_command('anne',aliases={'求生云服'},priority=20,block=True)
|
70
69
|
prison = on_command('zl',aliases={'坐牢'},priority=20,block=True)
|
71
70
|
open_prison = on_command('kl',aliases={'开牢'},priority=20,block=True)
|
72
71
|
|
@@ -194,19 +194,3 @@ try:
|
|
194
194
|
os.remove(Path().parent.joinpath('data/L4D2/l4d2.yml'))
|
195
195
|
except:
|
196
196
|
pass
|
197
|
-
|
198
|
-
@driver.on_bot_connect
|
199
|
-
async def start_ip():
|
200
|
-
global ALL_HOST
|
201
|
-
global ANNE_IP
|
202
|
-
ALL_HOST.update(await seach_map(l4_tag,l4_qq,l4_key,'ip'))
|
203
|
-
def count_ips(ip_dict:dict):
|
204
|
-
for key, value in ip_dict.items():
|
205
|
-
if key == 'error_':
|
206
|
-
continue
|
207
|
-
count = len(value)
|
208
|
-
logger.info(f'已加载:{key} | {count}个')
|
209
|
-
if key == '云':
|
210
|
-
ANNE_IP = {key:value}
|
211
|
-
count_ips(ALL_HOST)
|
212
|
-
|
@@ -266,12 +266,3 @@ async def write_json(data_str:str):
|
|
266
266
|
return '删除成功喵'
|
267
267
|
return '序号不正确,请输入【求生更新 删除 腐竹 序号】'
|
268
268
|
return '腐竹名不存在,请输入【求生更新 删除 腐竹 序号】'
|
269
|
-
ip_anne_list=[]
|
270
|
-
try:
|
271
|
-
ips = ALL_HOST['云']
|
272
|
-
ip_anne_list = []
|
273
|
-
for one_ip in ips:
|
274
|
-
host,port = split_maohao(one_ip['ip'])
|
275
|
-
ip_anne_list.append((one_ip['id'],host,port))
|
276
|
-
except KeyError:
|
277
|
-
pass
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: nonebot-plugin-l4d2-server
|
3
|
-
Version: 0.4.
|
3
|
+
Version: 0.4.0b2
|
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
|
@@ -89,6 +89,7 @@ _✨Nonebot & Left 4 Dead 2 server操作✨_
|
|
89
89
|
l4_port = ['20715']
|
90
90
|
l4_rcon = ['1145149191810']
|
91
91
|
l4_font = 'simsun.ttc'
|
92
|
+
l4_tag = ['呆呆']
|
92
93
|
l4_only = True
|
93
94
|
|
94
95
|
<h2 id="gn">主要功能</h2>
|
@@ -99,6 +100,14 @@ _✨Nonebot & Left 4 Dead 2 server操作✨_
|
|
99
100
|
- [求生电信服anne](https://github.com/fantasylidong/CompetitiveWithAnne)[查询~](https://sb.trygek.com/l4d_stats/ranking/index.php)
|
100
101
|
|
101
102
|
|
103
|
+
<h2 id="gn">如何获取key</h2>
|
104
|
+
|
105
|
+
为了使得ip不被滥用,我采取这种方式管理。
|
106
|
+
[点击这里加群](https://jq.qq.com/?_wv=1027&k=HdjoCcAe)
|
107
|
+
如果你只查询自己的服务器ip则可以忽略如下,并且更改env设置:
|
108
|
+
|
109
|
+
l4_tag = []
|
110
|
+
|
102
111
|
|
103
112
|
## 🔖 更新日志
|
104
113
|
|
@@ -284,12 +293,16 @@ _✨Nonebot & Left 4 Dead 2 server操作✨_
|
|
284
293
|
|
285
294
|
</details>
|
286
295
|
|
287
|
-
##
|
296
|
+
## 🙈 其他
|
288
297
|
|
289
|
-
|
298
|
+
+ 本人技术很差,如果您有发现BUG或者更好的建议,欢迎提Issue & Pr
|
299
|
+
+ 如果本插件对你有帮助,不要忘了点个Star~
|
300
|
+
+ 本项目仅供学习使用,请勿用于商业用途
|
301
|
+
+ [GPL-3.0 License](https://github.com/Umamusume-Agnes-Digital/nonebot_plugin_l4d2_server/blob/main/LICENSE) ©[@Umamusume-Agnes-Digital](https://github.com/Umamusume-Agnes-Digital)
|
302
|
+
|
290
303
|
|
291
304
|
|
292
|
-
<h2 id="ty"
|
305
|
+
<h2 id="ty">🌐 感谢</h2>
|
293
306
|
|
294
307
|
- [修仙](https://github.com/s52047qwas/nonebot_plugin_xiuxian) - 数据库的写法来自于他
|
295
308
|
- ~ [自己写的求生之路查询库](https://github.com/Umamusume-Agnes-Digital/VSQ) ~已弃用
|
@@ -299,15 +312,15 @@ _✨Nonebot & Left 4 Dead 2 server操作✨_
|
|
299
312
|
- [gsuid](https://github.com/KimigaiiWuyi/GenshinUID) - readme和wiki的格式参考
|
300
313
|
- 呆呆 - 提供三方地图的详细数据
|
301
314
|
|
302
|
-
|
315
|
+
<h2 id="ty">🌐 默认服务器</h2>
|
316
|
+
目前**已授权**的服务器查询,如果需要加入自己的ip可以进qq群私聊群主
|
303
317
|
|
304
318
|
| 指令 | 服务器 | op | 数量 |
|
305
319
|
|:-----:|:----:|:----:|:----:|
|
306
|
-
| 云 |
|
320
|
+
| 云 | anne电信服云服 | 东 | 22
|
307
321
|
| 呆呆 | 呆呆的小窝 | 提莫大魔王 | 15
|
308
322
|
| 橘 | 橘希实香的小窝 | 橘希实香 | 8
|
309
323
|
| 竹 | 竹烨 | 竹烨oО柠檬茶 | 9
|
310
324
|
| 音理 | 星空列车与白的旅行 | 音理 | 2
|
311
325
|
|
312
|
-
|
313
|
-
|
326
|
+
**如果提供了ip,那么我只能尽可能保证您的ipv4不会泄漏,如果无法承担风险则请勿提供ip**
|
{nonebot_plugin_l4d2_server-0.4.0b1.dist-info → nonebot_plugin_l4d2_server-0.4.0b2.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=n4YRt1eNrAIuM3qUh2_ErCNFfXopR6nqbh_g45x1e20,19891
|
3
|
+
nonebot_plugin_l4d2_server/command.py,sha256=8QiN4mvPXjua9PFjhMLwTwRG583Jtsh0b6Op6KXzsjc,4897
|
4
|
+
nonebot_plugin_l4d2_server/config.py,sha256=WK02pNkzPv9ljaQQs9TNegER1J_vByu5n2MCXaRWkeI,4579
|
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
|
@@ -32,7 +32,7 @@ nonebot_plugin_l4d2_server/l4d2_image/vtfs.py,sha256=2WuXE_4_5eVNExzYCTgZnKZrcE6
|
|
32
32
|
nonebot_plugin_l4d2_server/l4d2_queries/__init__.py,sha256=gpF-IWOZPQqqd5qoU1XBfiAt4CR7EKnhkiGJnCPev6Q,3447
|
33
33
|
nonebot_plugin_l4d2_server/l4d2_queries/api.py,sha256=dEZWJq-HZ0G18I0ceZ2FO4KmiVOhAlS9QBZaIZ9JB8Q,1102
|
34
34
|
nonebot_plugin_l4d2_server/l4d2_queries/ohter.py,sha256=jhE4azdK_SmCSipH0tqUrhtHR2V7qqVL3fgtuTHzbLI,741
|
35
|
-
nonebot_plugin_l4d2_server/l4d2_queries/qqgroup.py,sha256=
|
35
|
+
nonebot_plugin_l4d2_server/l4d2_queries/qqgroup.py,sha256=CWRyXbvi-FrjW8NrVdJRgSM89kb7CRhVw72u1qCXhgs,10404
|
36
36
|
nonebot_plugin_l4d2_server/l4d2_server/__init__.py,sha256=mp3Za6jJ-V92ChXRhl3k4D1tMTY4dqHdXgMzdWutccc,1676
|
37
37
|
nonebot_plugin_l4d2_server/l4d2_server/rcon.py,sha256=aP2n-sq_vM-h6UjnNCmKK9_WW8oS9zFySgowPl5FXd4,1160
|
38
38
|
nonebot_plugin_l4d2_server/l4d2_server/workshop.py,sha256=ZpWnWJ7EABNpDu86Rzoqu3tWoABanprIEcmej1zUT1A,1409
|
@@ -43,8 +43,8 @@ nonebot_plugin_l4d2_server/message.py,sha256=x_ts0HaW3SNOma-baEG0oaeozKE5Nh_fybn
|
|
43
43
|
nonebot_plugin_l4d2_server/seach.py,sha256=dsusYogKH9pGeLxZz9BTheQwtJ3wAO3tfbePYdcaIuA,1025
|
44
44
|
nonebot_plugin_l4d2_server/txt_to_img.py,sha256=ZaxHYNu8aAZUH4fNALyE1Q_ET7KuWytEiMFZ9loZnqc,2188
|
45
45
|
nonebot_plugin_l4d2_server/utils.py,sha256=3GLxpTozac1tR3k364PPxjtIbb0zcRLxHgaBp7TDBcw,8803
|
46
|
-
README.md,sha256=
|
47
|
-
nonebot_plugin_l4d2_server-0.4.
|
48
|
-
nonebot_plugin_l4d2_server-0.4.
|
49
|
-
nonebot_plugin_l4d2_server-0.4.
|
50
|
-
nonebot_plugin_l4d2_server-0.4.
|
46
|
+
README.md,sha256=s7OIBydFWLmxfWaLGhJusb00lMnOLawHUhWgN35BDbQ,9732
|
47
|
+
nonebot_plugin_l4d2_server-0.4.0b2.dist-info/LICENSE,sha256=IwGE9guuL-ryRPEKi6wFPI_zOhg7zDZbTYuHbSt_SAk,35823
|
48
|
+
nonebot_plugin_l4d2_server-0.4.0b2.dist-info/METADATA,sha256=eaSiSsSP1ZP7-b1ZwmQCpfpGZJtgciJajECbvzx8w-Q,11464
|
49
|
+
nonebot_plugin_l4d2_server-0.4.0b2.dist-info/WHEEL,sha256=vVCvjcmxuUltf8cYhJ0sJMRDLr1XsPuxEId8YDzbyCY,88
|
50
|
+
nonebot_plugin_l4d2_server-0.4.0b2.dist-info/RECORD,,
|
File without changes
|
{nonebot_plugin_l4d2_server-0.4.0b1.dist-info → nonebot_plugin_l4d2_server-0.4.0b2.dist-info}/WHEEL
RENAMED
File without changes
|