Browse Source

add all channel filter

Joyit 1 month ago
parent
commit
a817e5d80d
1 changed files with 7 additions and 0 deletions
  1. 7 0
      filter.go

+ 7 - 0
filter.go

@@ -5,6 +5,13 @@ import (
 	"strings"
 )
 
+// 匹配所有的频道
+func AllChannelFilter() FilterFunc {
+	return func(conn *Line) (ok bool) {
+		return true
+	}
+}
+
 // 正则频道过滤器
 func RegChannelFilter(channel *regexp.Regexp) FilterFunc {
 	return func(conn *Line) (ok bool) {