修改:支持 timer 批量一次订阅
git-svn-id: svn://47.119.165.148/zhub@117 e63fbceb-bcc3-4977-ac22-735b83d8d0f4
This commit is contained in:
@@ -38,7 +38,7 @@ func msgAccept(v Message) {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
arr := []string{"subscribe", "unsubscribe", "delay", "groupid"}
|
arr := []string{"subscribe", "timer", "unsubscribe", "delay", "groupid"}
|
||||||
if startWithAny(rcmd[0], arr...) {
|
if startWithAny(rcmd[0], arr...) {
|
||||||
rcmd = strings.Split(rcmd[0], " ")
|
rcmd = strings.Split(rcmd[0], " ")
|
||||||
} else {
|
} else {
|
||||||
@@ -85,7 +85,9 @@ func msgAccept(v Message) {
|
|||||||
case "delay":
|
case "delay":
|
||||||
zsub.delay(rcmd, c)
|
zsub.delay(rcmd, c)
|
||||||
case "timer":
|
case "timer":
|
||||||
zsub.timer(rcmd, c)
|
for _, name := range rcmd[1:] {
|
||||||
|
zsub.timer([]string{"timer", name}, c)
|
||||||
|
}
|
||||||
case "cmd":
|
case "cmd":
|
||||||
if len(rcmd) == 1 {
|
if len(rcmd) == 1 {
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user