MCPcopy Create free account
hub / github.com/Loping151/RoverSign / is_from_plugin

Function is_from_plugin

RoverSign/utils/plugin_checker.py:7–15  ·  view source on GitHub ↗

检查当前调用是否来自指定插件

(plugin_name: str = "RoverSign")

Source from the content-addressed store, hash-verified

5
6
7def is_from_plugin(plugin_name: str = "RoverSign") -> bool:
8 """检查当前调用是否来自指定插件"""
9 current_plugin = get_current_plugin()
10 result = current_plugin == plugin_name
11
12 if result:
13 logger.debug(f"[库洛签到·插件检查] 调用来自插件 {plugin_name}")
14
15 return result
16
17
18def get_current_plugin() -> Optional[str]:

Callers 1

is_from_rover_pluginFunction · 0.85

Calls 1

get_current_pluginFunction · 0.85

Tested by

no test coverage detected