aboutsummaryrefslogtreecommitdiff
path: root/internal/behavior/types.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/behavior/types.go')
-rw-r--r--internal/behavior/types.go24
1 files changed, 0 insertions, 24 deletions
diff --git a/internal/behavior/types.go b/internal/behavior/types.go
index c59a95e..29e2631 100644
--- a/internal/behavior/types.go
+++ b/internal/behavior/types.go
@@ -1,10 +1,7 @@
package behavior
import (
- "math/rand"
"strings"
-
- "gopkg.in/yaml.v3"
)
func WordPrefixMatch(input, name string) bool {
@@ -224,24 +221,3 @@ type DropEntry struct {
type DropTableDef struct {
Drops []DropEntry `yaml:"drops"`
}
-
-type MessageList []string
-
-func (ml *MessageList) UnmarshalYAML(value *yaml.Node) error {
- if value.Kind == yaml.ScalarNode {
- var s string
- if err := value.Decode(&s); err != nil {
- return err
- }
- *ml = MessageList{s}
- return nil
- }
- return value.Decode((*[]string)(ml))
-}
-
-func (ml MessageList) Pick() string {
- if len(ml) == 0 {
- return ""
- }
- return ml[rand.Intn(len(ml))]
-}