Added patch for intros
This commit is contained in:
parent
f6549e17db
commit
adb2f4a833
28
patches/user-show-intros/user-show-intros.go
Normal file
28
patches/user-show-intros/user-show-intros.go
Normal file
@ -0,0 +1,28 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
|
||||
"github.com/animenotifier/arn"
|
||||
"github.com/fatih/color"
|
||||
)
|
||||
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user