2018-11-21 12:05:20 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"regexp"
|
|
|
|
|
|
|
|
"github.com/animenotifier/arn"
|
2019-03-30 06:39:40 +00:00
|
|
|
"github.com/blitzprog/color"
|
2018-11-21 12:05:20 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
var flaggedWords = regexp.MustCompile("fuck|fucking|freaking|shit|bad|terrible|awful|wtf")
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
color.Yellow("Showing user intros")
|
|
|
|
|
|
|
|
defer color.Green("Finished.")
|
|
|
|
defer arn.Node.Close()
|
|
|
|
|
|
|
|
for user := range arn.StreamUsers() {
|
|
|
|
if user.Introduction == "" {
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
|
|
|
|
if flaggedWords.MatchString(user.Introduction) {
|
|
|
|
color.Cyan(user.Nick)
|
|
|
|
color.Red(user.Introduction)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|