feat: show irc network status in settings list

This commit is contained in:
Ludvig Lundgren 2022-01-08 21:18:38 +01:00
parent dcd1d458cf
commit f103dff221
6 changed files with 221 additions and 11 deletions

View file

@ -72,6 +72,24 @@ type IndexerIRC struct {
Settings []IndexerSetting `json:"settings"`
}
func (i IndexerIRC) ValidAnnouncer(announcer string) bool {
for _, a := range i.Announcers {
if a == announcer {
return true
}
}
return false
}
func (i IndexerIRC) ValidChannel(channel string) bool {
for _, a := range i.Channels {
if a == channel {
return true
}
}
return false
}
type IndexerParse struct {
Type string `json:"type"`
Lines []IndexerParseExtract `json:"lines"`