plugin: add banwords plugin

This commit is contained in:
lanvent
2023-03-14 17:30:30 +08:00
parent 300b7b9687
commit 8915149d36
9 changed files with 338 additions and 1 deletions

View File

@@ -0,0 +1,4 @@
{
"password": "",
"admin_users": []
}

View File

@@ -273,9 +273,13 @@ class Godcmd(Plugin):
if isadmin:
return False,"管理员账号无需认证"
if len(self.password) == 0:
return False,"未设置口令,无法认证"
if len(args) != 1:
return False,"请提供口令"
password = args[0]
if password == self.password:
self.admin_users.append(userid)