commit
1aede768f1
8 changed files with 38 additions and 9 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