修改:支持 timer 批量一次订阅

git-svn-id: svn://47.119.165.148/zhub@117 e63fbceb-bcc3-4977-ac22-735b83d8d0f4
This commit is contained in:
lxy
2021-03-05 09:35:36 +00:00
parent bb3802f0aa
commit 716b36e864

View File

@@ -38,7 +38,7 @@ func msgAccept(v Message) {
return false
}
arr := []string{"subscribe", "unsubscribe", "delay", "groupid"}
arr := []string{"subscribe", "timer", "unsubscribe", "delay", "groupid"}
if startWithAny(rcmd[0], arr...) {
rcmd = strings.Split(rcmd[0], " ")
} else {
@@ -85,7 +85,9 @@ func msgAccept(v Message) {
case "delay":
zsub.delay(rcmd, c)
case "timer":
zsub.timer(rcmd, c)
for _, name := range rcmd[1:] {
zsub.timer([]string{"timer", name}, c)
}
case "cmd":
if len(rcmd) == 1 {
return