fix 空pin可导入
This commit is contained in:
parent
0df1628e7f
commit
8c1a2e862e
@ -212,7 +212,7 @@ var handleMessage = func(msgs ...interface{}) interface{} {
|
||||
if strings.Contains(msg, "pt_key") {
|
||||
ptKey := FetchJdCookieValue("pt_key", msg)
|
||||
ptPin := FetchJdCookieValue("pt_pin", msg)
|
||||
if len(ptPin) > 0 || len(ptKey) > 0 {
|
||||
if len(ptPin) > 0 && len(ptKey) > 0 {
|
||||
ck := JdCookie{
|
||||
PtKey: ptKey,
|
||||
PtPin: ptPin,
|
||||
@ -260,64 +260,6 @@ var handleMessage = func(msgs ...interface{}) interface{} {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
{ //
|
||||
ss := regexp.MustCompile(`pt_key=([^;=\s]+);pt_pin=([^;=\s]+)`).FindAllStringSubmatch(msg, -1)
|
||||
|
||||
if len(ss) > 0 {
|
||||
|
||||
xyb := 0
|
||||
for _, s := range ss {
|
||||
ck := JdCookie{
|
||||
PtKey: s[1],
|
||||
PtPin: s[2],
|
||||
}
|
||||
if len(PtPin) > 0 {
|
||||
|
||||
if CookieOK(&ck) {
|
||||
xyb++
|
||||
if sender.IsQQ() {
|
||||
ck.QQ = sender.UserID
|
||||
} else if sender.IsTG() {
|
||||
ck.Telegram = sender.UserID
|
||||
}
|
||||
if HasKey(ck.PtKey) {
|
||||
sender.Reply(fmt.Sprintf("重复提交"))
|
||||
} else {
|
||||
if nck, err := GetJdCookie(ck.PtPin); err == nil {
|
||||
nck.InPool(ck.PtKey)
|
||||
msg := fmt.Sprintf("更新账号,%s", ck.PtPin)
|
||||
if sender.IsQQ() {
|
||||
ck.Update(QQ, ck.QQ)
|
||||
}
|
||||
sender.Reply(fmt.Sprintf(msg))
|
||||
(&JdCookie{}).Push(msg)
|
||||
logs.Info(msg)
|
||||
} else {
|
||||
if Cdle {
|
||||
ck.Hack = True
|
||||
}
|
||||
NewJdCookie(&ck)
|
||||
msg := fmt.Sprintf("添加账号,账号名:%s", ck.PtPin)
|
||||
if sender.IsQQ() {
|
||||
ck.Update(QQ, ck.QQ)
|
||||
}
|
||||
sender.Reply(fmt.Sprintf(msg))
|
||||
sender.Reply(ck.Query())
|
||||
logs.Info(msg)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
sender.Reply(fmt.Sprintf("无效,互助值-1,余额%d", RemCoin(sender.UserID, 1)))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
go func() {
|
||||
Save <- &JdCookie{}
|
||||
}()
|
||||
return nil
|
||||
}
|
||||
}
|
||||
{
|
||||
o := findShareCode(msg)
|
||||
if o != "" {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user