x
This commit is contained in:
parent
6dc0242397
commit
0aa9ad1286
@ -254,58 +254,6 @@ var handleMessage = func(msgs ...interface{}) interface{} {
|
||||
}
|
||||
cks := GetJdCookies()
|
||||
a := s[2]
|
||||
// {
|
||||
// if s := strings.Split(a, "-"); len(s) == 2 {
|
||||
// for i, ck := range cks {
|
||||
// if i+1 >= Int(s[0]) && i+1 <= Int(s[1]) {
|
||||
// switch tp {
|
||||
// case "tg":
|
||||
// tgBotNotify(ck.Query())
|
||||
// case "qq":
|
||||
// if id == ck.QQ {
|
||||
// SendQQ(int64(id), ck.Query())
|
||||
// } else {
|
||||
// SendQQ(Config.QQID, ck.Query())
|
||||
// }
|
||||
// case "qqg":
|
||||
// uid := msgs[3].(int)
|
||||
// if uid == ck.QQ || uid == int(Config.QQID) {
|
||||
// SendQQGroup(int64(id), int64(msgs[3].(int)), ck.Query())
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return nil
|
||||
// }
|
||||
// }
|
||||
// {
|
||||
// if x := regexp.MustCompile(`^[\s\d,]+$`).FindString(a); x != "" {
|
||||
// xx := regexp.MustCompile(`(\d+)`).FindAllStringSubmatch(a, -1)
|
||||
// for i, ck := range cks {
|
||||
// for _, x := range xx {
|
||||
// if fmt.Sprint(i+1) == x[1] {
|
||||
// switch tp {
|
||||
// case "tg":
|
||||
// tgBotNotify(ck.Query())
|
||||
// case "qq":
|
||||
// if id == ck.QQ {
|
||||
// SendQQ(int64(id), ck.Query())
|
||||
// } else {
|
||||
// SendQQ(Config.QQID, ck.Query())
|
||||
// }
|
||||
// case "qqg":
|
||||
// uid := msgs[3].(int)
|
||||
// if uid == ck.QQ || uid == int(Config.QQID) {
|
||||
// SendQQGroup(int64(id), int64(msgs[3].(int)), ck.Query())
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// }
|
||||
// return nil
|
||||
// }
|
||||
// }
|
||||
{
|
||||
a = strings.Replace(a, " ", "", -1)
|
||||
pins := ""
|
||||
@ -314,13 +262,15 @@ var handleMessage = func(msgs ...interface{}) interface{} {
|
||||
pins += ck.PtPin
|
||||
}
|
||||
}
|
||||
if pins == "" {
|
||||
return "找不到匹配的账号"
|
||||
}
|
||||
for _, task := range Config.Tasks {
|
||||
if task.Word == "查询" {
|
||||
task.Envs = []Env{{
|
||||
Name: "pins",
|
||||
Value: pins,
|
||||
}}
|
||||
task.Ykq = false
|
||||
runTask(&task, msgs...)
|
||||
break
|
||||
}
|
||||
|
||||
@ -53,6 +53,13 @@ func createTask(task *Task) {
|
||||
}
|
||||
|
||||
func runTask(task *Task, msgs ...interface{}) string {
|
||||
if len(msgs) > 0 {
|
||||
if msgs[1].(string) == "tg" {
|
||||
task.Ykq = false
|
||||
} else {
|
||||
task.Ykq = true
|
||||
}
|
||||
}
|
||||
msg := ""
|
||||
if task.Name == "" {
|
||||
slice := strings.Split(task.Path, "/")
|
||||
@ -112,14 +119,13 @@ func runTask(task *Task, msgs ...interface{}) string {
|
||||
if err2 != nil || io.EOF == err2 {
|
||||
break
|
||||
}
|
||||
if task.Ykq {
|
||||
msg += line
|
||||
} else {
|
||||
sendAdminMessagee(line, msgs...)
|
||||
msg += line
|
||||
if !task.Ykq {
|
||||
sendMessagee(line, msgs...)
|
||||
}
|
||||
}
|
||||
if task.Ykq {
|
||||
sendAdminMessagee(msg, msgs...)
|
||||
sendMessagee(msg, msgs...)
|
||||
}
|
||||
err = cmd.Wait()
|
||||
return msg
|
||||
|
||||
Loading…
Reference in New Issue
Block a user