parent
62d2f9890b
commit
e861789bed
5 changed files with 27 additions and 4 deletions
@ -0,0 +1,16 @@ |
|||||||
|
package utils |
||||||
|
|
||||||
|
import "strings" |
||||||
|
|
||||||
|
// return true means not pass
|
||||||
|
func FilterCommands(cmd string, luaFilter bool) bool { |
||||||
|
if strings.EqualFold(cmd, "opinfo") { |
||||||
|
return true |
||||||
|
} |
||||||
|
|
||||||
|
if luaFilter && (strings.EqualFold(cmd, "eval") || strings.EqualFold(cmd, "script")) { |
||||||
|
return true |
||||||
|
} |
||||||
|
|
||||||
|
return false |
||||||
|
} |
Loading…
Reference in new issue