add command prefix check

This commit is contained in:
root committed 2018-10-10 00:52:40 +08:00
1 parent 63a6856e45
commit 8e1b0c1ef6
2 files changed
+6 -2

No files matched your search

+2 -1
View File
@@ -33,7 +33,8 @@ func ParseLineMsg(txt, replyToken string, source *lineobj.SourceObject) {
return
}
if strings.HasPrefix(strs[0], "!") || strings.HasPrefix(strs[0], "!") {
firstNum := []rune(strs[0])[0]
if firstNum == 33 || firstNum == 65281 {
// nor cmd
cmd := strs[0][1:]
if len(cmd) == 0 {