Compare commits
2 commits
4e0038506d
...
9fcab8e9e1
Author | SHA1 | Date | |
---|---|---|---|
ptrcnull | 9fcab8e9e1 | ||
ptrcnull | 7ce8dfc96d |
18
main.go
18
main.go
|
@ -25,7 +25,7 @@ func main() {
|
|||
},
|
||||
}
|
||||
|
||||
recent := make([]string, 20)
|
||||
recent := make([]string, 100)
|
||||
for i := range recent {
|
||||
recent[i] = ""
|
||||
}
|
||||
|
@ -47,20 +47,18 @@ func main() {
|
|||
tg.SendMessage(chatId, "failed getting domains: " + err.Error())
|
||||
}
|
||||
|
||||
polish := false
|
||||
ndc := false
|
||||
match := false
|
||||
for _, domain := range allDomains {
|
||||
if strings.HasSuffix(domain, ".pl") {
|
||||
polish = true
|
||||
for _, tld := range []string{".pl", ".app", ".dev", ".cloud"} {
|
||||
if strings.HasSuffix(domain, tld) {
|
||||
match = true
|
||||
}
|
||||
}
|
||||
if strings.HasSuffix(domain, "ndc.pl") {
|
||||
ndc = true
|
||||
match = false
|
||||
}
|
||||
}
|
||||
if !polish {
|
||||
continue
|
||||
}
|
||||
if ndc {
|
||||
if !match {
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue