update
This commit is contained in:
@@ -50,6 +50,9 @@ func AddCommand(prefix string, cmds []Function) {
|
|||||||
cmds[j].Rules[i] = strings.Replace(cmds[j].Rules[i], "raw ", "", -1)
|
cmds[j].Rules[i] = strings.Replace(cmds[j].Rules[i], "raw ", "", -1)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if strings.Contains(cmds[j].Rules[i], "$") {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if prefix != "" {
|
if prefix != "" {
|
||||||
cmds[j].Rules[i] = prefix + `\s+` + cmds[j].Rules[i]
|
cmds[j].Rules[i] = prefix + `\s+` + cmds[j].Rules[i]
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-1
@@ -169,11 +169,13 @@ func init() {
|
|||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
logs.Warn("回复:%s添加成功", jr)
|
logs.Warn("回复:%s添加成功", jr)
|
||||||
functions = append(functions, Function{
|
AddCommand("", []Function{
|
||||||
|
{
|
||||||
Handle: handler,
|
Handle: handler,
|
||||||
Rules: rules,
|
Rules: rules,
|
||||||
Cron: cron,
|
Cron: cron,
|
||||||
Admin: admin,
|
Admin: admin,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user