fix 空pin
This commit is contained in:
parent
d1fd1bfd68
commit
f8b6a98623
@ -246,7 +246,7 @@ func CookieOK(ck *JdCookie) bool {
|
||||
//JdCookie{}.Push(fmt.Sprintf("自动转换wskey---%s", msg))
|
||||
//缺少错误判断
|
||||
if strings.Contains(msg, "错误") {
|
||||
//ck.Push(fmt.Sprintf("Wskey失效账号,%s", ck.PtPin))
|
||||
ck.Push(fmt.Sprintf("Wskey失效账号,%s", ck.PtPin))
|
||||
(&JdCookie{}).Push(fmt.Sprintf("Wskey失效,%s", ck.PtPin))
|
||||
} else {
|
||||
ptKey := FetchJdCookieValue("pt_key", msg)
|
||||
@ -268,11 +268,11 @@ func CookieOK(ck *JdCookie) bool {
|
||||
}
|
||||
|
||||
} else {
|
||||
//ck.Push(fmt.Sprintf("失效账号,%s", ck.PtPin))
|
||||
ck.Push(fmt.Sprintf("失效账号,%s", ck.PtPin))
|
||||
JdCookie{}.Push(fmt.Sprintf("失效账号,%s", ck.Nickname))
|
||||
}
|
||||
} else {
|
||||
//ck.Push(fmt.Sprintf("失效账号,%s", ck.PtPin))
|
||||
ck.Push(fmt.Sprintf("失效账号,%s", ck.PtPin))
|
||||
JdCookie{}.Push(fmt.Sprintf("失效账号,%s", ck.Nickname))
|
||||
}
|
||||
|
||||
|
||||
@ -263,42 +263,46 @@ var handleMessage = func(msgs ...interface{}) interface{} {
|
||||
PtKey: s[1],
|
||||
PtPin: s[2],
|
||||
}
|
||||
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)
|
||||
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)))
|
||||
}
|
||||
} else {
|
||||
sender.Reply(fmt.Sprintf("无效,互助值-1,余额%d", RemCoin(sender.UserID, 1)))
|
||||
}
|
||||
|
||||
}
|
||||
go func() {
|
||||
Save <- &JdCookie{}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user