nonebot-plugin-l4d2-server 0.3.4a2__tar.gz → 0.3.5a1__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.
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/PKG-INFO +4 -1
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/README.md +3 -0
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/nonebot_plugin_l4d2_server/__init__.py +50 -19
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/nonebot_plugin_l4d2_server/command.py +1 -1
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/nonebot_plugin_l4d2_server/config.py +5 -0
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/nonebot_plugin_l4d2_server/data/L4D2/image/template/anne.html +1 -1
- nonebot_plugin_l4d2_server-0.3.5a1/nonebot_plugin_l4d2_server/data/L4D2/image/template/back.png +0 -0
- nonebot_plugin_l4d2_server-0.3.5a1/nonebot_plugin_l4d2_server/data/L4D2/image/template/help - /345/211/257/346/234/254.html" +232 -0
- nonebot_plugin_l4d2_server-0.3.5a1/nonebot_plugin_l4d2_server/data/L4D2/image/template/help_dack.html +231 -0
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/nonebot_plugin_l4d2_server/data/L4D2/image/template/ip.html +1 -1
- nonebot_plugin_l4d2_server-0.3.5a1/nonebot_plugin_l4d2_server/data/L4D2/l4d2.json +99 -0
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/nonebot_plugin_l4d2_server/l4d2_anne/__init__.py +1 -1
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/nonebot_plugin_l4d2_server/l4d2_file/__init__.py +28 -2
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/nonebot_plugin_l4d2_server/l4d2_image/__init__.py +6 -10
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/nonebot_plugin_l4d2_server/l4d2_queries/__init__.py +4 -0
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/nonebot_plugin_l4d2_server/l4d2_server/workshop.py +24 -5
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/nonebot_plugin_l4d2_server/utils.py +5 -5
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/pyproject.toml +1 -1
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/setup.py +2 -2
- nonebot_plugin_l4d2_server-0.3.4a2/nonebot_plugin_l4d2_server/data/L4D2/image/template/back.png +0 -0
- nonebot_plugin_l4d2_server-0.3.4a2/nonebot_plugin_l4d2_server/data/L4D2/image/template/back2.jpg +0 -0
- nonebot_plugin_l4d2_server-0.3.4a2/nonebot_plugin_l4d2_server/data/L4D2/l4d2.json +0 -231
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/LICENSE +0 -0
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/nonebot_plugin_l4d2_server/data/L4D2/image/head/head.png +0 -0
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/nonebot_plugin_l4d2_server/data/L4D2/image/header/player1.jpg +0 -0
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/nonebot_plugin_l4d2_server/data/L4D2/image/template/fingerprint.svg +0 -0
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/nonebot_plugin_l4d2_server/data/L4D2/image/template/help.html +0 -0
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/nonebot_plugin_l4d2_server/data/L4D2/image/template/vue.css +0 -0
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/nonebot_plugin_l4d2_server/l4d2_anne/anne_telecom.py +0 -0
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/nonebot_plugin_l4d2_server/l4d2_anne/server.py +0 -0
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/nonebot_plugin_l4d2_server/l4d2_data/__init__.py +0 -0
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/nonebot_plugin_l4d2_server/l4d2_data/config.py +0 -0
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/nonebot_plugin_l4d2_server/l4d2_data/players.py +0 -0
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/nonebot_plugin_l4d2_server/l4d2_data/serverip.py +0 -0
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/nonebot_plugin_l4d2_server/l4d2_image/download.py +0 -0
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/nonebot_plugin_l4d2_server/l4d2_image/htmlimg.py +0 -0
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/nonebot_plugin_l4d2_server/l4d2_image/send_image_tool.py +0 -0
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/nonebot_plugin_l4d2_server/l4d2_image/steam.py +0 -0
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/nonebot_plugin_l4d2_server/l4d2_image/vtfs.py +0 -0
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/nonebot_plugin_l4d2_server/l4d2_queries/ohter.py +0 -0
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/nonebot_plugin_l4d2_server/l4d2_queries/qqgroup.py +0 -0
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/nonebot_plugin_l4d2_server/l4d2_server/__init__.py +0 -0
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/nonebot_plugin_l4d2_server/l4d2_server/rcon.py +0 -0
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/nonebot_plugin_l4d2_server/message.py +0 -0
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/nonebot_plugin_l4d2_server/seach.py +0 -0
- {nonebot_plugin_l4d2_server-0.3.4a2 → nonebot_plugin_l4d2_server-0.3.5a1}/nonebot_plugin_l4d2_server/txt_to_img.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: nonebot-plugin-l4d2-server
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.5a1
|
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
|
@@ -259,6 +259,8 @@ _✨Nonebot & Left 4 Dead 2 server操作✨_
|
|
259
259
|
| l4_image | 否 | True | 布尔值,是否显示图片 |
|
260
260
|
| l4_font | 否 | 'simsun.ttc' | str,确保在开启图片的时候,字体存在 |
|
261
261
|
| l4_only | 否 | False | 布尔值,如果不想在下载的时候阻碍其他指令可以开启,但是有不能下载超过200m地图的bug |
|
262
|
+
| l4_style | 否 | '' | str,图片风格,目前可选['balck'] |
|
263
|
+
|
262
264
|
|
263
265
|
</details>
|
264
266
|
|
@@ -490,6 +492,7 @@ ubuntu20.04 python3.10
|
|
490
492
|
- 2、~[自己写的求生之路查询库](https://github.com/Umamusume-Agnes-Digital/VSQ)~
|
491
493
|
- 3、[可爱小Q的帮助(太好看了tql)](https://github.com/MeetWq/mybot)
|
492
494
|
- 4、感谢petpet交流群各位大佬指点nonebot2事件处理api
|
495
|
+
- 5、ArcPav改的暗♂黑风格菜单
|
493
496
|
|
494
497
|
<h2 id="cx">服务器相关 </h2>
|
495
498
|
|
@@ -216,6 +216,8 @@ _✨Nonebot & Left 4 Dead 2 server操作✨_
|
|
216
216
|
| l4_image | 否 | True | 布尔值,是否显示图片 |
|
217
217
|
| l4_font | 否 | 'simsun.ttc' | str,确保在开启图片的时候,字体存在 |
|
218
218
|
| l4_only | 否 | False | 布尔值,如果不想在下载的时候阻碍其他指令可以开启,但是有不能下载超过200m地图的bug |
|
219
|
+
| l4_style | 否 | '' | str,图片风格,目前可选['balck'] |
|
220
|
+
|
219
221
|
|
220
222
|
</details>
|
221
223
|
|
@@ -447,6 +449,7 @@ ubuntu20.04 python3.10
|
|
447
449
|
- 2、~[自己写的求生之路查询库](https://github.com/Umamusume-Agnes-Digital/VSQ)~
|
448
450
|
- 3、[可爱小Q的帮助(太好看了tql)](https://github.com/MeetWq/mybot)
|
449
451
|
- 4、感谢petpet交流群各位大佬指点nonebot2事件处理api
|
452
|
+
- 5、ArcPav改的暗♂黑风格菜单
|
450
453
|
|
451
454
|
<h2 id="cx">服务器相关 </h2>
|
452
455
|
|
@@ -16,7 +16,7 @@
|
|
16
16
|
"""
|
17
17
|
from nonebot.matcher import Matcher
|
18
18
|
from nonebot.typing import T_State
|
19
|
-
from typing import Tuple
|
19
|
+
from typing import Tuple,Union,List
|
20
20
|
from time import sleep
|
21
21
|
from .config import *
|
22
22
|
from .utils import *
|
@@ -28,7 +28,7 @@ from nonebot import get_driver
|
|
28
28
|
from .l4d2_image.vtfs import img_to_vtf
|
29
29
|
from .l4d2_queries.ohter import load_josn
|
30
30
|
from .l4d2_queries.qqgroup import write_json,ip_anne_list
|
31
|
-
from .l4d2_file import updown_l4d2_vpk
|
31
|
+
from .l4d2_file import updown_l4d2_vpk,all_zip_to_one
|
32
32
|
from .txt_to_img import mode_txt_to_img
|
33
33
|
# from .l4d2_server import RCONClient
|
34
34
|
from nonebot import get_bot, require
|
@@ -37,7 +37,7 @@ scheduler = require("nonebot_plugin_apscheduler").scheduler
|
|
37
37
|
driver = get_driver()
|
38
38
|
|
39
39
|
|
40
|
-
__version__ = "0.3.
|
40
|
+
__version__ = "0.3.4"
|
41
41
|
__plugin_meta__ = PluginMetadata(
|
42
42
|
name="求生之路小助手",
|
43
43
|
description='群内对有关求生之路的查询和操作',
|
@@ -141,7 +141,6 @@ async def _(bot:Bot,event: MessageEvent):
|
|
141
141
|
msg = mes_list(msg,name_vpk).replace(" ","")
|
142
142
|
|
143
143
|
await find_vpk.finish(mode_txt_to_img(mes,msg))
|
144
|
-
# await find_vpk.finish(msg)
|
145
144
|
|
146
145
|
@del_vpk.handle()
|
147
146
|
async def _(matcher:Matcher,args:Message = CommandArg()):
|
@@ -312,25 +311,46 @@ async def _(state:T_State,tag:str = ArgPlainText("ip")):
|
|
312
311
|
msg = await workshop_msg(tag)
|
313
312
|
if not msg:
|
314
313
|
await up_workshop.finish('没有这个物品捏')
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
314
|
+
elif type(msg) == dict:
|
315
|
+
pic = await url_to_byte(msg['图片地址'])
|
316
|
+
message = ''
|
317
|
+
for item,value in msg.items():
|
318
|
+
if item in ['图片地址','下载地址','细节']:
|
319
|
+
continue
|
320
|
+
message += item + ':' + value + '\n'
|
321
|
+
state['dic'] = msg
|
322
|
+
await up_workshop.send(MessageSegment.image(pic) + Message(message))
|
323
|
+
elif type(msg) == list:
|
324
|
+
lenge = len(msg)
|
325
|
+
pic = await url_to_byte(msg[0]['图片地址'])
|
326
|
+
message = f'有{lenge}个文件\n'
|
327
|
+
for one in msg:
|
328
|
+
ones = []
|
329
|
+
for item,value in one.items():
|
330
|
+
if item in ['图片地址','下载地址','细节']:
|
331
|
+
continue
|
332
|
+
message += item + ':' + value + '\n'
|
333
|
+
ones.append(one)
|
334
|
+
state['dic'] = ones
|
323
335
|
|
324
336
|
@up_workshop.got("is_sure",prompt='如果需要上传,请发送 "yes"')
|
325
337
|
async def _(matcher: Matcher,bot:Bot,event:GroupMessageEvent,state:T_State):
|
326
338
|
is_sure = str(state["is_sure"])
|
327
339
|
if is_sure == 'yes':
|
328
|
-
data_dict:dict = state['dic']
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
340
|
+
data_dict:Union[dict,List[dict]] = state['dic']
|
341
|
+
if type(data_dict) == dict:
|
342
|
+
logger.info('开始上传')
|
343
|
+
data_file = await url_to_byte(data_dict['下载地址'])
|
344
|
+
file_name = data_dict['名字']+ '.vpk'
|
345
|
+
await up_workshop.send('获取地址成功,尝试上传')
|
346
|
+
await upload_file(bot, event, data_file, file_name)
|
347
|
+
else:
|
348
|
+
logger.info('开始上传')
|
349
|
+
for data_one in data_dict:
|
350
|
+
data_file = await url_to_byte(data_one['下载地址'])
|
351
|
+
await all_zip_to_one
|
352
|
+
file_name = data_one['名字']+ '.vpk'
|
353
|
+
await upload_file(bot, event, data_file, file_name)
|
334
354
|
else:
|
335
355
|
await up_workshop.finish('已取消上传')
|
336
356
|
|
@@ -418,10 +438,21 @@ async def _(event:MessageEvent):
|
|
418
438
|
|
419
439
|
@open_prison.handle()
|
420
440
|
async def _(event:MessageEvent):
|
421
|
-
|
441
|
+
|
422
442
|
msg = await get_tan_jian(ip_anne_list,3)
|
423
443
|
await tan_jian.finish(msg)
|
424
444
|
|
445
|
+
@smx_file.handle()
|
446
|
+
async def _():
|
447
|
+
smx_path = Path(l4_file[CHECK_FILE],"left4dead2/addons/sourcemod/plugins")
|
448
|
+
smx_list = []
|
449
|
+
name_smx = get_vpk(smx_list,smx_path,file_=".smx")
|
450
|
+
logger.info("获取文件列表成功")
|
451
|
+
mes = "当前服务器下有以下smx文件"
|
452
|
+
msg = ''
|
453
|
+
msg = mes_list(msg,name_smx).replace(" ","")
|
454
|
+
await find_vpk.finish(mode_txt_to_img(mes,msg))
|
455
|
+
|
425
456
|
@driver.on_shutdown
|
426
457
|
async def close_db():
|
427
458
|
"""关闭数据库"""
|
@@ -60,7 +60,7 @@ find_vpk = on_command("l4_map",aliases={"求生地图","查看求生地图"},pri
|
|
60
60
|
del_vpk = on_command("l4_del_map",aliases={"求生地图删除","地图删除"},priority=20,block=True,permission= Master)
|
61
61
|
rcon_to_server = on_command('rcon',aliases={"求生服务器指令","服务器指令","求生服务器控制台"},block=True,permission= Master)
|
62
62
|
check_path = on_command('l4_check',aliases={'求生路径'},priority=20,block=True,permission= Master)
|
63
|
-
|
63
|
+
smx_file = on_command('l4_smx',aliases={'求生插件'},priority=20,block=True,permission= Master)
|
64
64
|
|
65
65
|
# anne
|
66
66
|
anne_player = on_command('Ranne',aliases={"求生anne"},priority=25,block=True)
|
@@ -84,6 +84,11 @@ try:
|
|
84
84
|
except:
|
85
85
|
l4_proxies = ''
|
86
86
|
|
87
|
+
try:
|
88
|
+
l4_style:str = nonebot.get_driver().config.l4_style
|
89
|
+
except:
|
90
|
+
l4_style:str = ''
|
91
|
+
|
87
92
|
l4_list = [l4_file, l4_steamid, l4_host, l4_port, l4_rcon, l4_master]
|
88
93
|
l4_list = [ast.literal_eval(i) if isinstance(i, str) else i for i in l4_list]
|
89
94
|
l4_file, l4_steamid, l4_host, l4_port, l4_rcon, l4_master = l4_list
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<link rel="stylesheet" type="text/css" href="vue.css">
|
4
4
|
</head>
|
5
5
|
</br>
|
6
|
-
<body style="background-image: url('back.png');">
|
6
|
+
<body style="background-image: url('back.png'); background-size: cover;">
|
7
7
|
{% for item in data %}
|
8
8
|
<h1 ><center>求生药役anne电信服数据</center></h1>
|
9
9
|
<div class="scissors" style="border-top:1px dashed orange;">
|
nonebot_plugin_l4d2_server-0.3.5a1/nonebot_plugin_l4d2_server/data/L4D2/image/template/back.png
ADDED
Binary file
|
@@ -0,0 +1,232 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<style>
|
4
|
+
body {
|
5
|
+
margin: 0px;
|
6
|
+
zoom: 150%;
|
7
|
+
background-color: #F7D04B;
|
8
|
+
}
|
9
|
+
.image {
|
10
|
+
display: flex;
|
11
|
+
flex-direction: column;
|
12
|
+
overflow: scroll;
|
13
|
+
width: max-content;
|
14
|
+
padding: 20px;
|
15
|
+
}
|
16
|
+
.head {
|
17
|
+
display: flex;
|
18
|
+
flex-direction: row;
|
19
|
+
align-items: center;
|
20
|
+
justify-content: space-between;
|
21
|
+
background-color: #F5D76E;
|
22
|
+
padding-left: 20px;
|
23
|
+
padding-right: 20px;
|
24
|
+
padding-top: 10px;
|
25
|
+
padding-bottom: 10px;
|
26
|
+
border: 2px solid;
|
27
|
+
border-radius: 50px;
|
28
|
+
border-color: #F1C40F;
|
29
|
+
font-size: 16px;
|
30
|
+
margin-bottom: 20px;
|
31
|
+
}
|
32
|
+
|
33
|
+
.plugins {
|
34
|
+
display: grid;
|
35
|
+
grid-template-columns: auto auto auto;
|
36
|
+
row-gap: 20px;
|
37
|
+
column-gap: 20px;
|
38
|
+
margin-bottom: 20px;
|
39
|
+
}
|
40
|
+
.plugin {
|
41
|
+
display: flex;
|
42
|
+
padding: 5px;
|
43
|
+
border: 1px solid;
|
44
|
+
border-radius: 5px;
|
45
|
+
border-color: #F1C40F;
|
46
|
+
box-shadow: 0px 2px 6px 1px rgba(0, 0, 0, 0.2);
|
47
|
+
background-color: #F7D04B;
|
48
|
+
}
|
49
|
+
.plugin_meta {
|
50
|
+
display: flex;
|
51
|
+
flex-direction: column;
|
52
|
+
padding: 5px;
|
53
|
+
width: 250px;
|
54
|
+
justify-content: space-between;
|
55
|
+
}
|
56
|
+
.plugin_name {
|
57
|
+
font-size: 20px;
|
58
|
+
color: #F1C40F;
|
59
|
+
}
|
60
|
+
.plugin_description {
|
61
|
+
font-size: 15px;
|
62
|
+
color: gray;
|
63
|
+
margin-top: 5px;
|
64
|
+
margin-bottom: 5px;
|
65
|
+
}
|
66
|
+
.plugin_meta_line1 {
|
67
|
+
display: flex;
|
68
|
+
flex-direction: row;
|
69
|
+
align-items: center;
|
70
|
+
justify-content: space-between;
|
71
|
+
}
|
72
|
+
.plugin_meta_line3 {
|
73
|
+
display: flex;
|
74
|
+
flex-direction: row;
|
75
|
+
align-items: center;
|
76
|
+
}
|
77
|
+
.package_name_label {
|
78
|
+
background-image: url(./fingerprint.svg);
|
79
|
+
width: 13px;
|
80
|
+
height: 13px;
|
81
|
+
margin-right: 8px;
|
82
|
+
}
|
83
|
+
.package_name {
|
84
|
+
font-size: 13px;
|
85
|
+
color: gray;
|
86
|
+
}
|
87
|
+
.switch {
|
88
|
+
position: relative;
|
89
|
+
display: inline-block;
|
90
|
+
width: 40px;
|
91
|
+
height: 24px;
|
92
|
+
}
|
93
|
+
.slider {
|
94
|
+
position: absolute;
|
95
|
+
cursor: pointer;
|
96
|
+
top: 0;
|
97
|
+
left: 0;
|
98
|
+
right: 0;
|
99
|
+
bottom: 0;
|
100
|
+
background-color: #ccc;
|
101
|
+
}
|
102
|
+
.slider:before {
|
103
|
+
position: absolute;
|
104
|
+
content: "";
|
105
|
+
height: 16px;
|
106
|
+
width: 16px;
|
107
|
+
left: 4px;
|
108
|
+
bottom: 4px;
|
109
|
+
background-color: white;
|
110
|
+
}
|
111
|
+
.switch input {
|
112
|
+
display: none;
|
113
|
+
}
|
114
|
+
.switch input:checked + .slider {
|
115
|
+
background-color: rgba(86, 40, 238, 0.5);
|
116
|
+
}
|
117
|
+
.switch input:checked + .slider:before {
|
118
|
+
-webkit-transform: translateX(16px);
|
119
|
+
-ms-transform: translateX(16px);
|
120
|
+
transform: translateX(16px);
|
121
|
+
}
|
122
|
+
.slider.round {
|
123
|
+
border-radius: 24px;
|
124
|
+
}
|
125
|
+
.slider.round:before {
|
126
|
+
border-radius: 50%;
|
127
|
+
}
|
128
|
+
.checkbox {
|
129
|
+
visibility: hidden;
|
130
|
+
}
|
131
|
+
.slider.locked {
|
132
|
+
opacity: 0.5;
|
133
|
+
}
|
134
|
+
.switch input + span .lock {
|
135
|
+
width: 8px;
|
136
|
+
height: 7px;
|
137
|
+
background: #99a3ba;
|
138
|
+
position: absolute;
|
139
|
+
left: 8px;
|
140
|
+
bottom: 7px;
|
141
|
+
border-radius: 2px;
|
142
|
+
display: block;
|
143
|
+
z-index: 1;
|
144
|
+
transition: all 0.45s ease;
|
145
|
+
}
|
146
|
+
.switch input + span .lock:before {
|
147
|
+
content: "";
|
148
|
+
width: 2px;
|
149
|
+
height: 2px;
|
150
|
+
border-radius: 1px;
|
151
|
+
background: #fff;
|
152
|
+
position: absolute;
|
153
|
+
display: block;
|
154
|
+
left: 50%;
|
155
|
+
top: 50%;
|
156
|
+
margin: -1px 0 0 -1px;
|
157
|
+
}
|
158
|
+
.switch input + span .lock:after {
|
159
|
+
content: "";
|
160
|
+
border-top-left-radius: 4px;
|
161
|
+
border-top-right-radius: 4px;
|
162
|
+
border: 1px solid #99a3ba;
|
163
|
+
border-bottom: 0;
|
164
|
+
width: 4px;
|
165
|
+
height: 4px;
|
166
|
+
left: 1px;
|
167
|
+
bottom: 6px;
|
168
|
+
position: absolute;
|
169
|
+
z-index: 1;
|
170
|
+
-webkit-transform-origin: 0 100%;
|
171
|
+
transform-origin: 0 100%;
|
172
|
+
transition: all 0.45s ease;
|
173
|
+
}
|
174
|
+
.switch input:checked + span .lock {
|
175
|
+
background: #5628ee;
|
176
|
+
-webkit-transform: translateX(16px);
|
177
|
+
-ms-transform: translateX(16px);
|
178
|
+
transform: translateX(16px);
|
179
|
+
}
|
180
|
+
.lock {
|
181
|
+
visibility: hidden;
|
182
|
+
}
|
183
|
+
.lock.locked {
|
184
|
+
visibility: inherit;
|
185
|
+
}
|
186
|
+
</style>
|
187
|
+
</head>
|
188
|
+
<body>
|
189
|
+
<div class="image">
|
190
|
+
<div class="head">
|
191
|
+
<span><b>已加载服务器</b></span>
|
192
|
+
<span>发送 “<b>服务器昵称/序号</b>” 查看详情</span>
|
193
|
+
</div>
|
194
|
+
<div class="plugins">
|
195
|
+
{% for plugin in plugins %}
|
196
|
+
<div class="plugin">
|
197
|
+
<div class="plugin_meta">
|
198
|
+
<div class="plugin_meta_line1">
|
199
|
+
<div class="plugin_name">{{ plugin.number }}:{{ plugin.name }}</div>
|
200
|
+
<div class="plugin_status">
|
201
|
+
<label class="switch">
|
202
|
+
<input class="checkbox" type="checkbox" {% if plugin.enabled %} checked {% endif %} />
|
203
|
+
<span class="slider round {% if plugin.locked %} locked {% endif %}">
|
204
|
+
<span class="lock {% if plugin.locked %} locked {% endif %}"></span>
|
205
|
+
</span>
|
206
|
+
</label>
|
207
|
+
</div>
|
208
|
+
</div>
|
209
|
+
<div class="plugin_meta_line2">
|
210
|
+
<font color="blue">{{ plugin.map_ }}</font><br>
|
211
|
+
{% for Player in plugin.Players %}
|
212
|
+
<font color="green">{{ Player }}</font><br>
|
213
|
+
{% endfor %}
|
214
|
+
</div>
|
215
|
+
<div class="plugin_meta_line3">
|
216
|
+
<div class="package_name_label"></div>
|
217
|
+
<div class="package_name">{{ plugin.max_players }}</div>
|
218
|
+
</div>
|
219
|
+
</div>
|
220
|
+
</div>
|
221
|
+
{% endfor %}
|
222
|
+
</div>
|
223
|
+
<div class="head">
|
224
|
+
<span><b>©爱丽数码</b></span>
|
225
|
+
<span>https://github.com/Umamusume-Agnes-Digital/nonebot_plugin_l4d2_server</span>
|
226
|
+
</div>
|
227
|
+
</div>
|
228
|
+
</html>
|
229
|
+
</body>
|
230
|
+
|
231
|
+
|
232
|
+
|
@@ -0,0 +1,231 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<style>
|
4
|
+
body {
|
5
|
+
margin: 0px;
|
6
|
+
zoom: 150%;
|
7
|
+
background-color: #0D1117;
|
8
|
+
}
|
9
|
+
.image {
|
10
|
+
display: flex;
|
11
|
+
flex-direction: column;
|
12
|
+
overflow: scroll;
|
13
|
+
width: max-content;
|
14
|
+
padding: 20px;
|
15
|
+
}
|
16
|
+
.head {
|
17
|
+
display: flex;
|
18
|
+
flex-direction: row;
|
19
|
+
align-items: center;
|
20
|
+
justify-content: space-between;
|
21
|
+
background-color: #161B22;
|
22
|
+
padding-left: 20px;
|
23
|
+
padding-right: 20px;
|
24
|
+
padding-top: 10px;
|
25
|
+
padding-bottom: 10px;
|
26
|
+
border: 2px solid;
|
27
|
+
border-radius: 50px;
|
28
|
+
border-color: #1a1a1a;
|
29
|
+
font-size: 16px;
|
30
|
+
margin-bottom: 20px;
|
31
|
+
}
|
32
|
+
|
33
|
+
.plugins {
|
34
|
+
display: grid;
|
35
|
+
grid-template-columns: auto auto auto;
|
36
|
+
row-gap: 20px;
|
37
|
+
column-gap: 20px;
|
38
|
+
margin-bottom: 20px;
|
39
|
+
}
|
40
|
+
.plugin {
|
41
|
+
display: flex;
|
42
|
+
padding: 5px;
|
43
|
+
border: 1px solid;
|
44
|
+
border-radius: 5px;
|
45
|
+
border-color: #161B22;
|
46
|
+
box-shadow: 0px 2px 6px 1px rgba(0, 0, 0, 0.2);
|
47
|
+
background-color: #1a1a1a;
|
48
|
+
}
|
49
|
+
.plugin_meta {
|
50
|
+
display: flex;
|
51
|
+
flex-direction: column;
|
52
|
+
padding: 5px;
|
53
|
+
width: 250px;
|
54
|
+
justify-content: space-between;
|
55
|
+
}
|
56
|
+
.plugin_name {
|
57
|
+
font-size: 20px;
|
58
|
+
}
|
59
|
+
.plugin_description {
|
60
|
+
font-size: 15px;
|
61
|
+
color: gray;
|
62
|
+
margin-top: 5px;
|
63
|
+
margin-bottom: 5px;
|
64
|
+
}
|
65
|
+
.plugin_meta_line1 {
|
66
|
+
display: flex;
|
67
|
+
flex-direction: row;
|
68
|
+
align-items: center;
|
69
|
+
justify-content: space-between;
|
70
|
+
}
|
71
|
+
.plugin_meta_line3 {
|
72
|
+
display: flex;
|
73
|
+
flex-direction: row;
|
74
|
+
align-items: center;
|
75
|
+
}
|
76
|
+
.package_name_label {
|
77
|
+
background-image: url(./fingerprint.svg);
|
78
|
+
width: 13px;
|
79
|
+
height: 13px;
|
80
|
+
margin-right: 8px;
|
81
|
+
}
|
82
|
+
.package_name {
|
83
|
+
font-size: 13px;
|
84
|
+
color: gray;
|
85
|
+
}
|
86
|
+
.switch {
|
87
|
+
position: relative;
|
88
|
+
display: inline-block;
|
89
|
+
width: 40px;
|
90
|
+
height: 24px;
|
91
|
+
}
|
92
|
+
.slider {
|
93
|
+
position: absolute;
|
94
|
+
cursor: pointer;
|
95
|
+
top: 0;
|
96
|
+
left: 0;
|
97
|
+
right: 0;
|
98
|
+
bottom: 0;
|
99
|
+
background-color: #ccc;
|
100
|
+
}
|
101
|
+
.slider:before {
|
102
|
+
position: absolute;
|
103
|
+
content: "";
|
104
|
+
height: 16px;
|
105
|
+
width: 16px;
|
106
|
+
left: 4px;
|
107
|
+
bottom: 4px;
|
108
|
+
background-color: white;
|
109
|
+
}
|
110
|
+
.switch input {
|
111
|
+
display: none;
|
112
|
+
}
|
113
|
+
.switch input:checked + .slider {
|
114
|
+
background-color: rgba(46, 160, 67);
|
115
|
+
}
|
116
|
+
.switch input:checked + .slider:before {
|
117
|
+
-webkit-transform: translateX(16px);
|
118
|
+
-ms-transform: translateX(16px);
|
119
|
+
transform: translateX(16px);
|
120
|
+
}
|
121
|
+
.slider.round {
|
122
|
+
border-radius: 24px;
|
123
|
+
}
|
124
|
+
.slider.round:before {
|
125
|
+
border-radius: 50%;
|
126
|
+
}
|
127
|
+
.checkbox {
|
128
|
+
visibility: hidden;
|
129
|
+
}
|
130
|
+
.slider.locked {
|
131
|
+
opacity: 0.5;
|
132
|
+
}
|
133
|
+
.switch input + span .lock {
|
134
|
+
width: 8px;
|
135
|
+
height: 7px;
|
136
|
+
background: #99a3ba;
|
137
|
+
position: absolute;
|
138
|
+
left: 8px;
|
139
|
+
bottom: 7px;
|
140
|
+
border-radius: 2px;
|
141
|
+
display: block;
|
142
|
+
z-index: 1;
|
143
|
+
transition: all 0.45s ease;
|
144
|
+
}
|
145
|
+
.switch input + span .lock:before {
|
146
|
+
content: "";
|
147
|
+
width: 2px;
|
148
|
+
height: 2px;
|
149
|
+
border-radius: 1px;
|
150
|
+
background: #fff;
|
151
|
+
position: absolute;
|
152
|
+
display: block;
|
153
|
+
left: 50%;
|
154
|
+
top: 50%;
|
155
|
+
margin: -1px 0 0 -1px;
|
156
|
+
}
|
157
|
+
.switch input + span .lock:after {
|
158
|
+
content: "";
|
159
|
+
border-top-left-radius: 4px;
|
160
|
+
border-top-right-radius: 4px;
|
161
|
+
border: 1px solid #99a3ba;
|
162
|
+
border-bottom: 0;
|
163
|
+
width: 4px;
|
164
|
+
height: 4px;
|
165
|
+
left: 1px;
|
166
|
+
bottom: 6px;
|
167
|
+
position: absolute;
|
168
|
+
z-index: 1;
|
169
|
+
-webkit-transform-origin: 0 100%;
|
170
|
+
transform-origin: 0 100%;
|
171
|
+
transition: all 0.45s ease;
|
172
|
+
}
|
173
|
+
.switch input:checked + span .lock {
|
174
|
+
background: #5628ee;
|
175
|
+
-webkit-transform: translateX(16px);
|
176
|
+
-ms-transform: translateX(16px);
|
177
|
+
transform: translateX(16px);
|
178
|
+
}
|
179
|
+
.lock {
|
180
|
+
visibility: hidden;
|
181
|
+
}
|
182
|
+
.lock.locked {
|
183
|
+
visibility: inherit;
|
184
|
+
}
|
185
|
+
</style>
|
186
|
+
</head>
|
187
|
+
<body>
|
188
|
+
<div class="image">
|
189
|
+
<div class="head">
|
190
|
+
<span><b><font color="Silver">已加载服务器</font></b></span>
|
191
|
+
<span><font color="Silver">发送“<b>服务器昵称/序号</b>”查看详情</font></span>
|
192
|
+
</div>
|
193
|
+
<div class="plugins">
|
194
|
+
{% for plugin in plugins %}
|
195
|
+
<div class="plugin">
|
196
|
+
<div class="plugin_meta">
|
197
|
+
<div class="plugin_meta_line1">
|
198
|
+
<div class="plugin_name"><font color="DeepSkyBlue">{{ plugin.number }}:{{ plugin.name }}</font></div>
|
199
|
+
<div class="plugin_status">
|
200
|
+
<label class="switch">
|
201
|
+
<input class="checkbox" type="checkbox" {% if plugin.enabled %} checked {% endif %} />
|
202
|
+
<span class="slider round {% if plugin.locked %} locked {% endif %}">
|
203
|
+
<span class="lock {% if plugin.locked %} locked {% endif %}"></span>
|
204
|
+
</span>
|
205
|
+
</label>
|
206
|
+
</div>
|
207
|
+
</div>
|
208
|
+
<div class="plugin_meta_line2">
|
209
|
+
<font color="LightSkyBlue">{{ plugin.map_ }}</font><br>
|
210
|
+
{% for Player in plugin.Players %}
|
211
|
+
<font color="LightGray">{{ Player }}</font><br>
|
212
|
+
{% endfor %}
|
213
|
+
</div>
|
214
|
+
<div class="plugin_meta_line3">
|
215
|
+
<div class="package_name_label"></div>
|
216
|
+
<div class="package_name"><font color="LightGray">{{ plugin.max_players }}</font></div>
|
217
|
+
</div>
|
218
|
+
</div>
|
219
|
+
</div>
|
220
|
+
{% endfor %}
|
221
|
+
</div>
|
222
|
+
<div class="head">
|
223
|
+
<span><b><font color="Silver">©爱丽数码</font></b></span>
|
224
|
+
<span><font color="Silver">github*Umamusume-Agnes-Digital</font></span>
|
225
|
+
</div>
|
226
|
+
</div>
|
227
|
+
</body>
|
228
|
+
</html>
|
229
|
+
|
230
|
+
|
231
|
+
/*暗黑风格-ArcPav*/
|
@@ -33,7 +33,7 @@
|
|
33
33
|
{% for Player in data[j].Players %}
|
34
34
|
<font color="green">{{ Player }}</font><br>
|
35
35
|
{% endfor %}
|
36
|
-
<font color="yellow">{{ data[j].max_players }}</font>
|
36
|
+
<font color="yellow">{{ data[j].max_players }}{{data[j].ping}}</font>
|
37
37
|
</td>
|
38
38
|
{% endif %}
|
39
39
|
{% endfor %}
|