commit
82c2156d94
7 changed files with 37 additions and 8 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