feat: 更新权限系统
This commit is contained in:
@@ -8,15 +8,16 @@ import (
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"git.lxtend.com/qqbot/constants"
|
||||
"git.lxtend.com/qqbot/handler"
|
||||
"git.lxtend.com/qqbot/model"
|
||||
"git.lxtend.com/qqbot/util"
|
||||
)
|
||||
|
||||
func init() {
|
||||
handler.RegisterFrontMatchHandler("[CQ:json", cqJsonUrlParser)
|
||||
handler.RegisterFrontMatchHandler("http://", plainTextUrlParser)
|
||||
handler.RegisterFrontMatchHandler("https://", plainTextUrlParser)
|
||||
handler.RegisterFrontMatchHandler("[CQ:json", cqJsonUrlParser, constants.LEVEL_USER)
|
||||
handler.RegisterFrontMatchHandler("http://", plainTextUrlParser, constants.LEVEL_USER)
|
||||
handler.RegisterFrontMatchHandler("https://", plainTextUrlParser, constants.LEVEL_USER)
|
||||
}
|
||||
|
||||
func plainTextUrlParser(msg model.Message) (reply model.Reply) {
|
||||
|
||||
Reference in New Issue
Block a user