nonebot-plugin-l4d2-server 1.2.0__tar.gz → 1.3.5__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.
Files changed (142) hide show
  1. {nonebot_plugin_l4d2_server-1.2.0 → nonebot_plugin_l4d2_server-1.3.5}/PKG-INFO +72 -25
  2. {nonebot_plugin_l4d2_server-1.2.0 → nonebot_plugin_l4d2_server-1.3.5}/README.md +59 -11
  3. {nonebot_plugin_l4d2_server-1.2.0 → nonebot_plugin_l4d2_server-1.3.5}/nonebot_plugin_l4d2_server/__init__.py +30 -8
  4. nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/api/__init__.py +22 -0
  5. nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/api/l4d2.py +394 -0
  6. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/utils → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server}/api/models.py +4 -1
  7. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/utils/api/api.py → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/api/sources.py +3 -4
  8. nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/commands/__init__.py +9 -0
  9. nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/commands/admin.py +104 -0
  10. nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/commands/ban.py +145 -0
  11. nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/commands/local.py +210 -0
  12. nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/commands/query.py +169 -0
  13. nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/config.py +102 -0
  14. nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/consts.py +31 -0
  15. nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/http_helpers.py +71 -0
  16. nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/messages.py +35 -0
  17. nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/registry.py +199 -0
  18. nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/__init__.py +18 -0
  19. nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/background.py +70 -0
  20. nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/fonts.py +15 -0
  21. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help}/Help.json +56 -15
  22. nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/textures/bg.jpg +0 -0
  23. nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help.py +204 -0
  24. nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/images.py +129 -0
  25. nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/server_card.py +276 -0
  26. nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/server_list.py +99 -0
  27. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image/img/template → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/templates}/github.svg +1 -1
  28. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image/img/template → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/templates}/l.svg +5 -5
  29. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image/img/template → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/templates}/m.svg +1 -1
  30. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image/img/template → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/templates}/normal.html +3 -4
  31. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image/img/template → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/templates}/normal_old.html +1 -1
  32. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image/img/template → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/templates}/style.css +5 -2
  33. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image/img/template → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/templates}/vue.css +1 -1
  34. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image/img/template → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/templates}/w.svg +1 -1
  35. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image/img/template → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/templates}/workshop.html +8 -8
  36. nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/workshop.py +75 -0
  37. nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/services/__init__.py +13 -0
  38. nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/services/filter.py +137 -0
  39. nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/services/local_server.py +190 -0
  40. nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/services/migrate.py +154 -0
  41. nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/services/server_query.py +155 -0
  42. nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/services/sourceban.py +51 -0
  43. nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/services/workshop.py +66 -0
  44. nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/store/__init__.py +5 -0
  45. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/utils/group_store.py → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/store/groups.py +36 -25
  46. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/utils/sb_sources.py → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/store/pages.py +23 -10
  47. nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/version.py +3 -0
  48. nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server.egg-info/PKG-INFO +252 -0
  49. nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server.egg-info/SOURCES.txt +99 -0
  50. nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server.egg-info/dependency_links.txt +1 -0
  51. nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server.egg-info/requires.txt +16 -0
  52. nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server.egg-info/top_level.txt +1 -0
  53. {nonebot_plugin_l4d2_server-1.2.0 → nonebot_plugin_l4d2_server-1.3.5}/pyproject.toml +27 -38
  54. nonebot_plugin_l4d2_server-1.3.5/setup.cfg +4 -0
  55. nonebot_plugin_l4d2_server-1.3.5/tests/test_migrate.py +123 -0
  56. nonebot_plugin_l4d2_server-1.3.5/tests/test_registry.py +134 -0
  57. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/__main__.py +0 -386
  58. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/commands/__init__.py +0 -1
  59. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/commands/server_groups.py +0 -0
  60. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/config.py +0 -159
  61. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/data/L4D2/l4d2/l4d2.json +0 -1
  62. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/data/L4D2/l4d2.json +0 -1
  63. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_ban/__init__.py +0 -166
  64. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_ban/utils.py +0 -11
  65. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/__init__.py +0 -55
  66. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/draw.py +0 -209
  67. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/texture2d/bg.jpg +0 -0
  68. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image/__init__.py +0 -16
  69. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image/convert.py +0 -108
  70. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image/html_img.py +0 -112
  71. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image/image_tools.py +0 -255
  72. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image/img/anne/anne.html +0 -60
  73. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image/img/anne/back.png +0 -0
  74. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image/img/anne/group_ip.html +0 -259
  75. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image/img/anne/ip.html +0 -55
  76. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image/img/head/head.png +0 -0
  77. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image/img/header/logo.png +0 -0
  78. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image/img/header/player1.jpg +0 -0
  79. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image/model.py +0 -15
  80. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_local/__init__.py +0 -231
  81. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_local/download.py +0 -39
  82. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_local/file.py +0 -148
  83. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_local/utils.py +0 -150
  84. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_request/__init__.py +0 -216
  85. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_request/draw_msg.py +0 -275
  86. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_request/tj.py +0 -73
  87. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_request/typing.py +0 -36
  88. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_request/utils.py +0 -348
  89. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/message.py +0 -26
  90. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/utils/api/request.py +0 -504
  91. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/utils/api/utils.py +0 -32
  92. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/utils/database/models.py +0 -18
  93. nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/utils/utils.py +0 -199
  94. nonebot_plugin_l4d2_server-1.2.0/tests/__init__.py +0 -0
  95. nonebot_plugin_l4d2_server-1.2.0/tests/conftest.py +0 -27
  96. nonebot_plugin_l4d2_server-1.2.0/tests/help.py +0 -52
  97. nonebot_plugin_l4d2_server-1.2.0/tests/todo.md +0 -29
  98. {nonebot_plugin_l4d2_server-1.2.0 → nonebot_plugin_l4d2_server-1.3.5}/LICENSE +0 -0
  99. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image/img/back_img → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/backgrounds}/background.jpg +0 -0
  100. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/data/font → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/fonts}/loli.ttf +0 -0
  101. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/icon → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/icons}//344/273/213/347/273/215.png" +0 -0
  102. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/icon → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/icons}//344/273/273/345/212/241.png" +0 -0
  103. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/icon → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/icons}//344/277/241/346/201/257.png" +0 -0
  104. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/icon → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/icons}//345/205/254/345/221/212.png" +0 -0
  105. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/icon → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/icons}//345/210/200/345/211/221.png" +0 -0
  106. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/icon → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/icons}//345/210/207/346/215/242.png" +0 -0
  107. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/icon → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/icons}//345/210/240/351/231/244.png" +0 -0
  108. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/icon → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/icons}//345/210/267/346/226/260.png" +0 -0
  109. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/icon → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/icons}//345/215/241/347/273/204.png" +0 -0
  110. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/icon → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/icons}//345/223/252/351/207/214.png" +0 -0
  111. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/icon → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/icons}//345/234/260/345/233/276.png" +0 -0
  112. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/icon → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/icons}//345/257/274/345/205/245.png" +0 -0
  113. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/icon → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/icons}//345/257/274/345/207/272.png" +0 -0
  114. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/icon → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/icons}//345/275/261.png" +0 -0
  115. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/icon → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/icons}//346/213/274/345/233/276.png" +0 -0
  116. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/icon → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/icons}//346/216/242/347/264/242.png" +0 -0
  117. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/icon → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/icons}//346/216/250/351/200/201.png" +0 -0
  118. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/icon → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/icons}//346/224/266/351/233/206.png" +0 -0
  119. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/icon → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/icons}//346/224/273/347/225/245.png" +0 -0
  120. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/icon → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/icons}//346/233/264/346/226/260.png" +0 -0
  121. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/icon → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/icons}//346/235/220/346/226/231.png" +0 -0
  122. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/icon → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/icons}//346/237/245/350/257/242.png" +0 -0
  123. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/icon → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/icons}//346/240/241/351/252/214.png" +0 -0
  124. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/icon → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/icons}//346/257/217/346/234/210.png" +0 -0
  125. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/icon → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/icons}//346/267/261/346/270/212.png" +0 -0
  126. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/icon → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/icons}//346/267/273/345/212/240.png" +0 -0
  127. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/icon → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/icons}//346/270/205/351/231/244.png" +0 -0
  128. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/icon → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/icons}//347/212/266/346/200/201.png" +0 -0
  129. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/icon → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/icons}//347/255/276/345/210/260.png" +0 -0
  130. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/icon → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/icons}//347/273/221/345/256/232.png" +0 -0
  131. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/icon → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/icons}//350/241/250.png" +0 -0
  132. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/icon → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/icons}//350/241/250/346/203/205.png" +0 -0
  133. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/icon → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/icons}//350/247/222/350/211/262.png" +0 -0
  134. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/icon → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/icons}//350/256/260/345/275/225.png" +0 -0
  135. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/icon → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/icons}//351/205/215/347/275/256.png" +0 -0
  136. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/icon → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/icons}//351/207/215/345/220/257.png" +0 -0
  137. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/texture2d → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/textures}/badge.png +0 -0
  138. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/texture2d → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/textures}/banner.png +0 -0
  139. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/texture2d → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/textures}/button.png +0 -0
  140. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_help/texture2d → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/help/textures}/icon.png +0 -0
  141. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image/img/template → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/templates}/vac.png +0 -0
  142. {nonebot_plugin_l4d2_server-1.2.0/nonebot_plugin_l4d2_server/l4_image/img/template → nonebot_plugin_l4d2_server-1.3.5/nonebot_plugin_l4d2_server/render/templates}/vac_white.png +0 -0
@@ -1,41 +1,40 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: nonebot-plugin-l4d2-server
3
- Version: 1.2.0
3
+ Version: 1.3.5
4
4
  Summary: L4D2 server related operations plugin for NoneBot2
5
- Keywords: steam,game,l4d2,nonebot2,plugin
6
- Author-Email: Agnes_Digital <Z735803792@163.com>
5
+ Author-email: Agnes_Digital <Z735803792@163.com>
7
6
  License: GPLv3
7
+ Project-URL: homepage, https://github.com/Agnes4m/nonebot_plugin_l4d2_server
8
+ Keywords: steam,game,l4d2,nonebot2,plugin
8
9
  Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
9
10
  Classifier: Programming Language :: Python
10
11
  Classifier: Programming Language :: Python :: 3
11
- Classifier: Programming Language :: Python :: 3.9
12
12
  Classifier: Programming Language :: Python :: 3.10
13
13
  Classifier: Programming Language :: Python :: 3.11
14
14
  Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Programming Language :: Python :: 3.14
15
17
  Classifier: Operating System :: OS Independent
16
- Project-URL: homepage, https://github.com/Agnes4m/nonebot_plugin_l4d2_server
17
- Requires-Python: <4.0,>=3.9
18
+ Requires-Python: <4.0,>=3.10
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
18
21
  Requires-Dist: nonebot2>=2.1.0
19
22
  Requires-Dist: nonebot2[fastapi]>=2.3.3
20
23
  Requires-Dist: nonebot-plugin-htmlrender>=0.3.0
21
24
  Requires-Dist: nonebot-adapter-onebot>=2.4.4
22
25
  Requires-Dist: nonebot-plugin-alconna>=0.50.0
23
- Requires-Dist: nonebot_plugin_datastore>=1.3.0
24
- Requires-Dist: nonebot-plugin-tortoise-orm>=0.1.4
25
26
  Requires-Dist: aiohttp>=3.8.4
26
27
  Requires-Dist: jinja2>=3.0.0
27
- Requires-Dist: srctools>=2.6.0
28
28
  Requires-Dist: httpx>=0.22.0
29
29
  Requires-Dist: python-a2s>=1.4.1
30
30
  Requires-Dist: ujson>=5.10.0
31
- Requires-Dist: rcon>=2.1.0
32
31
  Requires-Dist: pillow>10.0.0
33
- Requires-Dist: rarfile>=4.2
34
32
  Requires-Dist: pyunpack>=0.3
35
33
  Requires-Dist: aiofiles>=24.1.0
36
- Requires-Dist: bs4==0.0.2
34
+ Requires-Dist: beautifulsoup4>=4.12.0
37
35
  Requires-Dist: lxml>=6.0.2
38
- Description-Content-Type: text/markdown
36
+ Requires-Dist: playwright>=1.61.0
37
+ Dynamic: license-file
39
38
 
40
39
  <!-- markdownlint-disable MD026 MD031 MD033 MD036 MD041 MD046 MD051 -->
41
40
  <div align="center">
@@ -46,7 +45,7 @@ Description-Content-Type: text/markdown
46
45
 
47
46
  <div align="center">
48
47
 
49
- # nonebot_plugin_l4d2_server 1.1.6
48
+ # nonebot_plugin_l4d2_server 1.3.0
50
49
 
51
50
  _✨Nonebot & Left 4 Dead 2 server 操作 ✨_
52
51
 
@@ -87,14 +86,58 @@ _✨Nonebot & Left 4 Dead 2 server 操作 ✨_
87
86
  </a>
88
87
  </div>
89
88
 
90
- ## 指令
89
+ ## 功能
91
90
 
92
- - 在 json 文件设置的前缀指令,例如设置"云",则指令 云 输出组服务器,云 1 输出 1 号服务器
93
91
  - `l4d2帮助` 帮助指令
92
+
93
+ ### 自定义服务器
94
+
95
+ - 在 json 文件设置的前缀指令,例如设置"云",则指令 云 输出组服务器,云 1 输出 1 号服务器
96
+
97
+ ### SourceBans++
98
+
99
+ - 通过 [SourceBans++](https://sbpp.github.io/) 获取服务器的 ban 信息,自动导入ip
100
+
101
+ ### 配置管理
102
+
94
103
  - l4 图片开启/关闭 超管指令 可以修改输出单图是否为图片输出
95
104
  - l4 查找用户 在已知服务器中查找
96
105
  - l4 工坊下载 提供创意工坊 id 下载到服务器和群聊
97
106
 
107
+ ### 自定义服务器列表背景图片
108
+
109
+ `/云` 等组查询输出的服务器列表(HTML)图支持自定义背景。`/云1` 这类具体服查询**不受影响**,固定使用深蓝灰纯色背景。
110
+
111
+ ```
112
+ <l4_path>/custom_backgrounds/ ← 放任意张图即可;插件会随机抽一张
113
+ ```
114
+
115
+ `<l4_path>` 默认为 `data/L4D2`(即 `<l4_path>/custom_backgrounds/` = `data/L4D2/custom_backgrounds/`);如要换位置,在 `.env` 里改:
116
+
117
+ ```dotenv
118
+ L4_PATH=/path/to/your/data
119
+ ```
120
+
121
+ 使用步骤:
122
+
123
+ 1. 找到 `<l4_path>/custom_backgrounds/`(默认 `data/L4D2/custom_backgrounds/`,与 `云.json` 等组文件同级);
124
+ 2. 把你想要的背景图放入该目录,支持 `.jpg` / `.jpeg` / `.png` 格式,可放多张;
125
+ 3. 完成。下一次查询即会使用新背景。
126
+
127
+ > 目录会在插件启动时自动创建,无需手动建。
128
+
129
+ **查找顺序**:
130
+
131
+ - `/云`(服务器列表):从 `<l4_path>/custom_backgrounds/` 所有图片中**随机抽一张**;目录为空时回退到内置 `background.jpg`
132
+ - `/云1`(单服务器卡):固定使用深蓝灰纯色背景(`#496D89`),不加载任何图片
133
+
134
+ **选择规则**:
135
+
136
+ - 目录中有多张图时,每次查询**随机抽取**一张;
137
+ - 想只用某张图,把其余图片删掉或移走;
138
+ - 替换同名图片会按文件修改时间自动重新加载,无需重启;
139
+ - **建议尺寸**:宽幅横图(如 1920×1080),列表图会按高度铺满并横向平铺。
140
+
98
141
  ## 安装
99
142
 
100
143
  以下提到的方法 任选**其一** 即可
@@ -156,7 +199,9 @@ conda install nonebot-plugin-l4d2-server
156
199
 
157
200
  ## [数据结构](./docs/standand.md)
158
201
 
159
- 暂未更新
202
+ > 服务器组文件存放位置:`<l4_path>/<组名>.json`(默认 `data/L4D2/<组名>.json`),旧版 `<l4_path>/l4d2/` 子目录会在启动时自动迁移。
203
+ >
204
+ > 所有数据路径(组文件、sb_pages、自定义背景图、迁移脚本)都跟着 `l4_path` 配置走,CWD 在哪都无所谓。改 `l4_path` 一处生效。
160
205
 
161
206
  ## env 设置
162
207
 
@@ -168,7 +213,7 @@ conda install nonebot-plugin-l4d2-server
168
213
  l4_connect = True
169
214
  """是否在查服命令后加入connect ip"""
170
215
  l4_path = "data/L4D2"
171
- """插件数据路径"""
216
+ """插件数据根目录。组 JSON / sb_pages / 自定义背景图 / 迁移脚本都从这里派生。"""
172
217
  l4_players = 4
173
218
  """查询总图的时候展示的用户数量"""
174
219
  l4_style = "default"
@@ -178,15 +223,17 @@ conda install nonebot-plugin-l4d2-server
178
223
 
179
224
  ## 和 0.x.x 更改部分
180
225
 
181
- - 取消了网页控制台(没有卵用)
182
- - 取消了自动重启(与其他插件功能重复)
183
- - 取消了 git 拉取更新(nb 规范用 pypi)
184
- - 删除无用部分(依赖太多难以维护)
185
- - 删除了 anne 部分,已移植到[这里](https://github.com/Agnes4m/L4D2UID),通过 core 插件调用
226
+ - **服务器组指令(`云`、`云1` 等)规则层拒绝非数字后缀**:之前输入 `云云` 会被解析为「组 `云` + args=`云`」然后静默退出,现在直接在 nonebot 规则层拒绝,不会进入 handler,也不会被本插件拦截后续处理。`云1` / `云12` 仍正常触发单服查询;
227
+ - **单服务器查询(`云1`)合并图片与 `connect host:port` 文本**:图片和 `connect host:port` 文本作为一条合并消息发出(受 `l4_connect` 配置控制),方便直接点链接加入服务器;
228
+ - **单服务器卡(`云1`)长内容自动换行**:服务器名、地图名、connect IP 等超出 380px 卡片宽度时,会按像素宽度自动换行展示,图片高度随行数自动撑高;
229
+ - **服务器列表(`云`)地图名溢出处理**:`.map-name` CSS 增加 `text-overflow: ellipsis`,超长地图名以省略号截断,不再撑破卡片;
230
+ - **查服背景图按渲染类型拆分目录**(后续调整):`/云`(服务器列表)从 `<l4_path>/custom_backgrounds/` 根目录的所有图片中随机抽一张,目录为空时回退到内置 `background.jpg`;`/云1`(单服务器卡)固定使用深蓝灰纯色,不加载任何图片。详见「自定义服务器列表背景图片」;
231
+ - **数据路径统一从 `l4_path` 派生**:组文件、sb_pages、自定义背景图、迁移脚本都跟着 `l4_path` 配置走,不再各自写死相对路径。`.env` 里改 `L4_PATH` 一处即生效,不用再管 bot 启动 CWD。
186
232
 
187
233
  ## 其他
188
234
 
189
- - 本人技术很差,如果您有发现 BUG 或者更好的建议,欢迎提 Issue & Pr
235
+ - anne 部分,已移植到[这里](https://github.com/Agnes4m/L4D2UID),通过 core 插件调用
236
+ - 如果您有发现 BUG 或者更好的建议,欢迎提 Issue & Pr
190
237
  - 如果本插件对你有帮助,不要忘了点个 Star~
191
238
  - 本项目仅供学习使用,请勿用于商业用途
192
239
  - [更新日志](./docs/update.md)
@@ -7,7 +7,7 @@
7
7
 
8
8
  <div align="center">
9
9
 
10
- # nonebot_plugin_l4d2_server 1.1.6
10
+ # nonebot_plugin_l4d2_server 1.3.0
11
11
 
12
12
  _✨Nonebot & Left 4 Dead 2 server 操作 ✨_
13
13
 
@@ -48,14 +48,58 @@ _✨Nonebot & Left 4 Dead 2 server 操作 ✨_
48
48
  </a>
49
49
  </div>
50
50
 
51
- ## 指令
51
+ ## 功能
52
52
 
53
- - 在 json 文件设置的前缀指令,例如设置"云",则指令 云 输出组服务器,云 1 输出 1 号服务器
54
53
  - `l4d2帮助` 帮助指令
54
+
55
+ ### 自定义服务器
56
+
57
+ - 在 json 文件设置的前缀指令,例如设置"云",则指令 云 输出组服务器,云 1 输出 1 号服务器
58
+
59
+ ### SourceBans++
60
+
61
+ - 通过 [SourceBans++](https://sbpp.github.io/) 获取服务器的 ban 信息,自动导入ip
62
+
63
+ ### 配置管理
64
+
55
65
  - l4 图片开启/关闭 超管指令 可以修改输出单图是否为图片输出
56
66
  - l4 查找用户 在已知服务器中查找
57
67
  - l4 工坊下载 提供创意工坊 id 下载到服务器和群聊
58
68
 
69
+ ### 自定义服务器列表背景图片
70
+
71
+ `/云` 等组查询输出的服务器列表(HTML)图支持自定义背景。`/云1` 这类具体服查询**不受影响**,固定使用深蓝灰纯色背景。
72
+
73
+ ```
74
+ <l4_path>/custom_backgrounds/ ← 放任意张图即可;插件会随机抽一张
75
+ ```
76
+
77
+ `<l4_path>` 默认为 `data/L4D2`(即 `<l4_path>/custom_backgrounds/` = `data/L4D2/custom_backgrounds/`);如要换位置,在 `.env` 里改:
78
+
79
+ ```dotenv
80
+ L4_PATH=/path/to/your/data
81
+ ```
82
+
83
+ 使用步骤:
84
+
85
+ 1. 找到 `<l4_path>/custom_backgrounds/`(默认 `data/L4D2/custom_backgrounds/`,与 `云.json` 等组文件同级);
86
+ 2. 把你想要的背景图放入该目录,支持 `.jpg` / `.jpeg` / `.png` 格式,可放多张;
87
+ 3. 完成。下一次查询即会使用新背景。
88
+
89
+ > 目录会在插件启动时自动创建,无需手动建。
90
+
91
+ **查找顺序**:
92
+
93
+ - `/云`(服务器列表):从 `<l4_path>/custom_backgrounds/` 所有图片中**随机抽一张**;目录为空时回退到内置 `background.jpg`
94
+ - `/云1`(单服务器卡):固定使用深蓝灰纯色背景(`#496D89`),不加载任何图片
95
+
96
+ **选择规则**:
97
+
98
+ - 目录中有多张图时,每次查询**随机抽取**一张;
99
+ - 想只用某张图,把其余图片删掉或移走;
100
+ - 替换同名图片会按文件修改时间自动重新加载,无需重启;
101
+ - **建议尺寸**:宽幅横图(如 1920×1080),列表图会按高度铺满并横向平铺。
102
+
59
103
  ## 安装
60
104
 
61
105
  以下提到的方法 任选**其一** 即可
@@ -117,7 +161,9 @@ conda install nonebot-plugin-l4d2-server
117
161
 
118
162
  ## [数据结构](./docs/standand.md)
119
163
 
120
- 暂未更新
164
+ > 服务器组文件存放位置:`<l4_path>/<组名>.json`(默认 `data/L4D2/<组名>.json`),旧版 `<l4_path>/l4d2/` 子目录会在启动时自动迁移。
165
+ >
166
+ > 所有数据路径(组文件、sb_pages、自定义背景图、迁移脚本)都跟着 `l4_path` 配置走,CWD 在哪都无所谓。改 `l4_path` 一处生效。
121
167
 
122
168
  ## env 设置
123
169
 
@@ -129,7 +175,7 @@ conda install nonebot-plugin-l4d2-server
129
175
  l4_connect = True
130
176
  """是否在查服命令后加入connect ip"""
131
177
  l4_path = "data/L4D2"
132
- """插件数据路径"""
178
+ """插件数据根目录。组 JSON / sb_pages / 自定义背景图 / 迁移脚本都从这里派生。"""
133
179
  l4_players = 4
134
180
  """查询总图的时候展示的用户数量"""
135
181
  l4_style = "default"
@@ -139,15 +185,17 @@ conda install nonebot-plugin-l4d2-server
139
185
 
140
186
  ## 和 0.x.x 更改部分
141
187
 
142
- - 取消了网页控制台(没有卵用)
143
- - 取消了自动重启(与其他插件功能重复)
144
- - 取消了 git 拉取更新(nb 规范用 pypi)
145
- - 删除无用部分(依赖太多难以维护)
146
- - 删除了 anne 部分,已移植到[这里](https://github.com/Agnes4m/L4D2UID),通过 core 插件调用
188
+ - **服务器组指令(`云`、`云1` 等)规则层拒绝非数字后缀**:之前输入 `云云` 会被解析为「组 `云` + args=`云`」然后静默退出,现在直接在 nonebot 规则层拒绝,不会进入 handler,也不会被本插件拦截后续处理。`云1` / `云12` 仍正常触发单服查询;
189
+ - **单服务器查询(`云1`)合并图片与 `connect host:port` 文本**:图片和 `connect host:port` 文本作为一条合并消息发出(受 `l4_connect` 配置控制),方便直接点链接加入服务器;
190
+ - **单服务器卡(`云1`)长内容自动换行**:服务器名、地图名、connect IP 等超出 380px 卡片宽度时,会按像素宽度自动换行展示,图片高度随行数自动撑高;
191
+ - **服务器列表(`云`)地图名溢出处理**:`.map-name` CSS 增加 `text-overflow: ellipsis`,超长地图名以省略号截断,不再撑破卡片;
192
+ - **查服背景图按渲染类型拆分目录**(后续调整):`/云`(服务器列表)从 `<l4_path>/custom_backgrounds/` 根目录的所有图片中随机抽一张,目录为空时回退到内置 `background.jpg`;`/云1`(单服务器卡)固定使用深蓝灰纯色,不加载任何图片。详见「自定义服务器列表背景图片」;
193
+ - **数据路径统一从 `l4_path` 派生**:组文件、sb_pages、自定义背景图、迁移脚本都跟着 `l4_path` 配置走,不再各自写死相对路径。`.env` 里改 `L4_PATH` 一处即生效,不用再管 bot 启动 CWD。
147
194
 
148
195
  ## 其他
149
196
 
150
- - 本人技术很差,如果您有发现 BUG 或者更好的建议,欢迎提 Issue & Pr
197
+ - anne 部分,已移植到[这里](https://github.com/Agnes4m/L4D2UID),通过 core 插件调用
198
+ - 如果您有发现 BUG 或者更好的建议,欢迎提 Issue & Pr
151
199
  - 如果本插件对你有帮助,不要忘了点个 Star~
152
200
  - 本项目仅供学习使用,请勿用于商业用途
153
201
  - [更新日志](./docs/update.md)
@@ -1,7 +1,7 @@
1
1
  """
2
2
  * Copyright (c) 2023, Agnes Digital
3
3
  *
4
- * This program is free software: you can redistribute it and/or modify
4
+ * This program is free software: you can redistribute it and or modify
5
5
  * it under the terms of the GNU General Public License as published by
6
6
  * the Free Software Foundation, either version 3 of the License, or
7
7
  * (at your option) any later version.
@@ -16,20 +16,42 @@
16
16
  """
17
17
 
18
18
  from nonebot import get_driver, require
19
+ from nonebot.plugin import PluginMetadata, inherit_supported_adapters
19
20
 
20
- require("nonebot_plugin_htmlrender")
21
+ # 依赖插件声明 必须在导入其它插件模块之前执行
21
22
  require("nonebot_plugin_alconna")
22
- require("nonebot_plugin_tortoise_orm")
23
- require("nonebot_plugin_datastore")
24
-
25
- from nonebot.plugin import PluginMetadata, inherit_supported_adapters # noqa: E402
23
+ require("nonebot_plugin_htmlrender")
26
24
 
27
- from . import __main__ as __main__ # noqa: E402
25
+ from . import commands # noqa: E402, F401 (registers all commands)
28
26
  from .config import ConfigModel # noqa: E402
29
- from .l4_help import __version__ # noqa: E402
27
+ from .services import migrate, sourceban # noqa: E402
28
+ from .version import __version__ # noqa: E402
30
29
 
31
30
  driver = get_driver()
32
31
 
32
+ # Initial scan to populate command aliases before any rule refresh.
33
+ from .registry import registry as _registry # noqa: E402
34
+
35
+ _registry.scan_commands()
36
+
37
+
38
+ @driver.on_startup
39
+ async def _on_startup() -> None:
40
+ from .config import config
41
+ from .render.background import ensure_user_background_dir
42
+
43
+ # 确保 l4_path 指向的数据根目录存在;之后再做迁移 / 加载 / 后台目录建好。
44
+ config.data_dir.mkdir(parents=True, exist_ok=True)
45
+ migrate.migrate_legacy_layout()
46
+ # 只从磁盘 JSON 加载,避免每次启动都重新抓取所有 SourceBans 页面;
47
+ # 需要更新缓存时使用 l4刷新组 命令。
48
+ await sourceban.reload_registry()
49
+ sourceban.register_anne_alias()
50
+ from .commands.query import refresh_server_command_rule
51
+
52
+ refresh_server_command_rule()
53
+ ensure_user_background_dir()
54
+
33
55
 
34
56
  __plugin_meta__ = PluginMetadata(
35
57
  name="求生之路小助手",
@@ -0,0 +1,22 @@
1
+ """External API clients."""
2
+
3
+ from .l4d2 import L4API, L4D2Api
4
+ from .models import (
5
+ AllServer,
6
+ AnnePlayer2,
7
+ NserverOut,
8
+ OutServer,
9
+ SourceBansInfo,
10
+ WorksopInfo,
11
+ )
12
+
13
+ __all__ = [
14
+ "L4API",
15
+ "AllServer",
16
+ "AnnePlayer2",
17
+ "L4D2Api",
18
+ "NserverOut",
19
+ "OutServer",
20
+ "SourceBansInfo",
21
+ "WorksopInfo",
22
+ ]