-
Notifications
You must be signed in to change notification settings - Fork 1
/
KitFox-AuthMe.sk
75 lines (70 loc) · 3.76 KB
/
KitFox-AuthMe.sk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# KitFox-AuthMe.sk
# 依赖:
# KitFox-CORE.sk
# AuthMe等注册插件
# FastLogin(可选,用于设置是否在线登录)
#
# 本skript由SwallowMC团队编写并由SinanGentoo主要维护;
# 如果你在使用本脚本时遇到了问题,请联系我们或者在我们的Github
# 仓库里发issue或pr!
# --------------------------------------------
on server start:
FOX_registerCommand("reg","FOX_AUTHME_REG","注册账号")
FOX_registerCommand("unreg","FOX_AUTHME_UNREG","注销账号")
FOX_registerCommand("cp","FOX_AUTHME_CP","更改密码")
FOX_registerCommand("lm","FOX_AUTHME_LOGINMODE","更改登录方式(需要FastLogin)")
function FOX_AUTHME_REG(type: text, groupcode: text, peoplecode: text, content: text):
set {_silent} to FOX_getConfigValue("silent-mode")
set {_argument::*} to {_content} split by " " # 指令分割
if FOX_isInList({_configPath},"%{_peoplecode}%","helper") is true:# 检测指令发送者是否有执行权限
command "/authme register %{_argument::3}% %{_argument::4}%" by console
if {_silent} is "false":
if {_type} is "friend":
FOX_sendMessage("friend","%{_peoplecode}%","注册指令已发送至控制台!")
else:
FOX_sendMessage("group","%{_groupcode}%","注册指令已发送至控制台!")
function FOX_AUTHME_UNREG(type: text, groupcode: text, peoplecode: text, content: text):
set {_silent} to FOX_getConfigValue("silent-mode")
set {_argument::*} to {_content} split by " " # 指令分割
if FOX_isInList({_configPath},"%{_peoplecode}%","helper") is true:# 检测指令发送者是否有执行权限
command "/authme unregister %{_argument::3}%" by console
if {_silent} is "false":
if {_type} is "friend":
FOX_sendMessage("friend","%{_peoplecode}%","注销指令已发送至控制台!")
else:
FOX_sendMessage("group","%{_groupcode}%","注销指令已发送至控制台!")
function FOX_AUTHME_CP(type: text, groupcode: text, peoplecode: text, content: text):
set {_silent} to FOX_getConfigValue("silent-mode")
set {_argument::*} to {_content} split by " " # 指令分割
if FOX_isInList({_configPath},"%{_peoplecode}%","helper") is true:# 检测指令发送者是否有执行权限
command "/authme changepassword %{_argument::3}% %{_argument::4}%" by console
if {_silent} is "false":
if {_type} is "friend":
FOX_sendMessage("friend","%{_peoplecode}%","更改密码指令已发送至控制台!")
else:
FOX_sendMessage("group","%{_code:: group}%","更改密码指令已发送至控制台!")
else:
if {_silent} is "false":
if {_type} is "friend":
FOX_sendMessage("friend","%{_peoplecode}%","抱歉,您并没有权限!")
else:
FOX_sendMessage("group","%{_groupcode}%","抱歉,您并没有权限!")
function FOX_AUTHME_LOGINMODE(type: text, groupcode: text, peoplecode: text, content: text):
set {_silent} to FOX_getConfigValue("silent-mode")
set {_argument::*} to {_content} split by " " # 指令分割
if FOX_isInList({_configPath},"%{_peoplecode}%","helper") is true:# 检测指令发送者是否有执行权限
if {argument::4} is "offline":
command "/ cracked %{_argument::3}%" by console
else:
command "/premium %{_argument::3}%" by console
if {_silent} is "false":
if {_type} is "friend":
FOX_sendMessage("friend","%{_peoplecode}%","修改登录方式指令已发送至控制台!")
else:
FOX_sendMessage("group","%{_groupcode}%","修改登录方式指令已发送至控制台!")
else:
if {_silent} is "false":
if {_type} is "friend":
FOX_sendMessage("friend","%{_peoplecode}%","抱歉,您并没有权限!")
else:
FOX_sendMessage("group","%{_groupcode}%","抱歉,您并没有权限!")